X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=SConstruct;h=0630cbd79bc78fadd11f9b0c37872f578766b3f9;hb=06c39a154c4dc8fedcf9fbf77bbcf26f176c469c;hp=06e1c3f16392598617dd4c87b7ab622c800e9ff8;hpb=821dfc12892ee841916d9aab411f2db7937ba7c4;p=gem5.git diff --git a/SConstruct b/SConstruct index 06e1c3f16..0630cbd79 100755 --- a/SConstruct +++ b/SConstruct @@ -487,6 +487,7 @@ if main['GCC']: # Note CCVERSION doesn't work here because it is run with the CC # before we override it from the command line gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False) + main['GCC_VERSION'] = gcc_version if not compareVersions(gcc_version, '4.4.1') or \ not compareVersions(gcc_version, '4.4.2'): print 'Info: Tree vectorizer in GCC 4.4.1 & 4.4.2 is buggy, disabling.' @@ -662,10 +663,14 @@ if not py_getvar('Py_ENABLE_SHARED'): py_libs = [] for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split(): - assert lib.startswith('-l') - lib = lib[2:] - if lib not in py_libs: - py_libs.append(lib) + if not lib.startswith('-l'): + # Python requires some special flags to link (e.g. -framework + # common on OS X systems), assume appending preserves order + main.Append(LINKFLAGS=[lib]) + else: + lib = lib[2:] + if lib not in py_libs: + py_libs.append(lib) py_libs.append(py_version) main.Append(CPPPATH=py_includes)