diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-08-01 16:27:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 16:27:28 (GMT) |
commit | 4307e4fda25631bc533e3536b623894e5bab6074 (patch) | |
tree | 19f08b539ab240a7ab9a289f8f8dec4a11604510 | |
parent | e7f2089ab5e0aa30ea6d054ea8edefd776b48445 (diff) | |
parent | 2b4e05d0f38b1115e0909f53f06b6f52ed0ef3d4 (diff) | |
download | SCons-4307e4fda25631bc533e3536b623894e5bab6074.zip SCons-4307e4fda25631bc533e3536b623894e5bab6074.tar.gz SCons-4307e4fda25631bc533e3536b623894e5bab6074.tar.bz2 |
Merge pull request #3417 from breed/master
add -fmerge-all-constants flag to LINKFLAGS
-rwxr-xr-x | src/CHANGES.txt | 7 | ||||
-rw-r--r-- | src/engine/SCons/Environment.py | 1 | ||||
-rw-r--r-- | src/engine/SCons/Environment.xml | 51 | ||||
-rw-r--r-- | src/engine/SCons/EnvironmentTests.py | 10 |
4 files changed, 39 insertions, 30 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 662e6f5..e33aa6a 100755 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -7,15 +7,15 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From William Deegan: - - Remove obsoleted references to DeciderNeedsNode which could cause crash when using --debug=explain From Jason Kenny - - Add Fix and test for regression in 3.1.0 when using Decider('MD5-timestamp') and --debug=explain - From Mathew Robinson: + From Ben Reed: + - Added -fmerge-all-constants to flags that get included in both CCFLAGS and LINKFLAGS. + From Mathew Robinson: - Fix issue #3415 - Update remaining usages of EnvironmentError to SConsEnvironmentError this patch fixes issues introduced in 3.1.0 where any of the following would cause SCons to error and exit: @@ -23,6 +23,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - JSON encoding errors for CacheDir config - JSON decoding errors for CacheDir config + RELEASE 3.1.0 - Mon, 20 Jul 2019 16:59:23 -0700 From Joseph Brill: diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 8d06af7..5faa2d0 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -783,6 +783,7 @@ class SubstitutionEnvironment(object): elif arg in ['-mno-cygwin', '-pthread', '-openmp', + '-fmerge-all-constants', '-fopenmp']: dict['CCFLAGS'].append(arg) dict['LINKFLAGS'].append(arg) diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml index 1b0a04c..46a00d2 100644 --- a/src/engine/SCons/Environment.xml +++ b/src/engine/SCons/Environment.xml @@ -2301,30 +2301,33 @@ and added to the following construction variables: </para> <example_commands> --arch CCFLAGS, LINKFLAGS --D CPPDEFINES --framework FRAMEWORKS --frameworkdir= FRAMEWORKPATH --include CCFLAGS --isysroot CCFLAGS, LINKFLAGS --isystem CCFLAGS --iquote CCFLAGS --idirafter CCFLAGS --I CPPPATH --l LIBS --L LIBPATH --mno-cygwin CCFLAGS, LINKFLAGS --mwindows LINKFLAGS --pthread CCFLAGS, LINKFLAGS --std= CFLAGS --Wa, ASFLAGS, CCFLAGS --Wl,-rpath= RPATH --Wl,-R, RPATH --Wl,-R RPATH --Wl, LINKFLAGS --Wp, CPPFLAGS -- CCFLAGS -+ CCFLAGS, LINKFLAGS +-arch CCFLAGS, LINKFLAGS +-D CPPDEFINES +-framework FRAMEWORKS +-frameworkdir= FRAMEWORKPATH +-fmerge-all-constants CCFLAGS, LINKFLAGS +-fopenmp CCFLAGS, LINKFLAGS +-include CCFLAGS +-isysroot CCFLAGS, LINKFLAGS +-isystem CCFLAGS +-iquote CCFLAGS +-idirafter CCFLAGS +-I CPPPATH +-l LIBS +-L LIBPATH +-mno-cygwin CCFLAGS, LINKFLAGS +-mwindows LINKFLAGS +-openmp CCFLAGS, LINKFLAGS +-pthread CCFLAGS, LINKFLAGS +-std= CFLAGS +-Wa, ASFLAGS, CCFLAGS +-Wl,-rpath= RPATH +-Wl,-R, RPATH +-Wl,-R RPATH +-Wl, LINKFLAGS +-Wp, CPPFLAGS +- CCFLAGS ++ CCFLAGS, LINKFLAGS </example_commands> <para> diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 834cfd1..70e1a37 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -797,6 +797,7 @@ sys.exit(0) "-F fwd3 " + \ "-dylib_file foo-dylib " + \ "-pthread " + \ + "-fmerge-all-constants " +\ "-fopenmp " + \ "-mno-cygwin -mwindows " + \ "-arch i386 -isysroot /tmp " + \ @@ -811,7 +812,8 @@ sys.exit(0) assert d['ASFLAGS'] == ['-as'], d['ASFLAGS'] assert d['CFLAGS'] == ['-std=c99'] assert d['CCFLAGS'] == ['-X', '-Wa,-as', - '-pthread', '-fopenmp', '-mno-cygwin', + '-pthread', '-fmerge-all-constants', + '-fopenmp', '-mno-cygwin', ('-arch', 'i386'), ('-isysroot', '/tmp'), ('-iquote', '/usr/include/foo1'), ('-isystem', '/usr/include/foo2'), @@ -832,7 +834,7 @@ sys.exit(0) assert LIBS == ['xxx', 'yyy', 'ascend'], (d['LIBS'], LIBS) assert d['LINKFLAGS'] == ['-Wl,-link', '-dylib_file', 'foo-dylib', - '-pthread', '-fopenmp', + '-pthread', '-fmerge-all-constants', '-fopenmp', '-mno-cygwin', '-mwindows', ('-arch', 'i386'), ('-isysroot', '/tmp'), @@ -2024,6 +2026,7 @@ def generate(env): "-Ffwd2 " + \ "-F fwd3 " + \ "-pthread " + \ + "-fmerge-all-constants " + \ "-mno-cygwin -mwindows " + \ "-arch i386 -isysroot /tmp " + \ "-iquote /usr/include/foo1 " + \ @@ -2035,7 +2038,7 @@ def generate(env): assert save_command == ['fake command'], save_command assert env['ASFLAGS'] == ['assembler', '-as'], env['ASFLAGS'] assert env['CCFLAGS'] == ['', '-X', '-Wa,-as', - '-pthread', '-mno-cygwin', + '-pthread', '-fmerge-all-constants', '-mno-cygwin', ('-arch', 'i386'), ('-isysroot', '/tmp'), ('-iquote', '/usr/include/foo1'), ('-isystem', '/usr/include/foo2'), @@ -2049,6 +2052,7 @@ def generate(env): assert env['LIBPATH'] == ['list', '/usr/fax', 'foo'], env['LIBPATH'] assert env['LIBS'] == ['xxx', 'yyy', env.File('abc')], env['LIBS'] assert env['LINKFLAGS'] == ['', '-Wl,-link', '-pthread', + '-fmerge-all-constants', '-mno-cygwin', '-mwindows', ('-arch', 'i386'), ('-isysroot', '/tmp'), |