diff options
author | Jack Lloyd <[email protected]> | 2017-12-23 16:07:26 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-23 16:07:26 -0500 |
commit | bf28de2cd2c9abd3db940fcbedeb540eaed0686b (patch) | |
tree | 3651d2dac6c598bff9c641b391bfc352adf9316f | |
parent | ebeae68aba0d3384a00fddde77a561bb0cd88102 (diff) |
Add exceptions to mach_abi_linking groups
Allows avoiding -pthread on Haiku which doesn't support that flag.
(Even though it has pthreads, go figure...)
-rwxr-xr-x | configure.py | 18 | ||||
-rw-r--r-- | src/build-data/cc/clang.txt | 2 | ||||
-rw-r--r-- | src/build-data/cc/gcc.txt | 2 |
3 files changed, 16 insertions, 6 deletions
diff --git a/configure.py b/configure.py index dbc42d24f..a3247bcb2 100755 --- a/configure.py +++ b/configure.py @@ -1135,13 +1135,23 @@ class CompilerInfo(InfoObject): # pylint: disable=too-many-instance-attributes if with_debug_info is None: with_debug_info = options.with_debug_info - def all_group(): + def mach_abi_groups(): if with_debug_info and 'all-debug' in self.mach_abi_linking: - return 'all-debug' - return 'all' + yield 'all-debug' + elif 'all' in self.mach_abi_linking: + yield 'all' + + for all_except in [s for s in self.mach_abi_linking.keys() if s.startswith('all!')]: + exceptions = all_except[4:].split(',') + if options.os not in exceptions and options.arch not in exceptions: + yield all_except + + yield options.os + yield options.arch + yield options.cpu abi_link = list() - for what in [all_group(), options.os, options.arch, options.cpu]: + for what in mach_abi_groups(): flag = self.mach_abi_linking.get(what) if flag != None and flag != '' and flag not in abi_link: abi_link.append(flag) diff --git a/src/build-data/cc/clang.txt b/src/build-data/cc/clang.txt index aaef4357a..c4bfe1961 100644 --- a/src/build-data/cc/clang.txt +++ b/src/build-data/cc/clang.txt @@ -62,7 +62,7 @@ ivybridge -> "-march=core-avx-i" </mach_opt> <mach_abi_linking> -all -> "-pthread" +all!haiku -> "-pthread" openmp -> "-fopenmp" diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index ce1f47ae0..4a1b1e913 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -112,7 +112,7 @@ all_x86_64 -> "-momit-leaf-frame-pointer" # Flags set here are included at compile and link time <mach_abi_linking> -all -> "-pthread" +all!haiku -> "-pthread" openmp -> "-fopenmp" |