Gary Oberbrunner avatar Gary Oberbrunner committed f80be60

Fix #1644: LINKFLAGS and RPATH conflict. Moved RPATH into LINKCOM.

Comments (0)

Files changed (6)

 
 RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
 
-  From Gary Oberbrunner:
-    - Fix precompiled headers on Windows when variant dir name has spaces.
-
   From Gary Oberbrunner and Sohail Somani:
     - new construction variable WINDOWS_EMBED_MANIFEST to automatically
       embed manifests in Windows EXEs and DLLs.
 
   From Gary Oberbrunner:
+    - Put RPATH in LINKCOM rather than LINKFLAGS so resetting
+      LINKFLAGS doesn't kill RPATH
+    - Fix precompiled headers on Windows when variant dir name has spaces.
     - Adding None to an Action no longer fails (just returns original action)
-
-  From Gary Oberbrunner:
     - New --debug=prepare option to show each target as it's being
       prepared, whether or not anything needs to be done for it.
-
-  From Gary Oberbrunner:
     - New debug option --debug=duplicate to print a line for each
       unlink/relink (or copy) of a variant file from its source file.
+    - Improve error message for EnumVariables to show legal values.
+    - Fix Intel compiler to sort versions >9 correctly (esp. on Linux)
+    - Fix Install() when the source and target are directories and the
+      target directory exists.
     
   From David Garcia Garzon:
     - Fix Delete to be able to delete broken symlinks and dir
       properly. Previously the generated files would include 
       the whitespace.
 
-  From Gary Oberbrunner:
-    - Improve error message for EnumVariables to show legal values.
-
-  From Gary Oberbrunner:
-    - Fix Intel compiler to sort versions >9 correctly (esp. on Linux)
-
   From Dmitry R.:
     - Handle Environment in case __semi_deepcopy is None
 
 
     - Much improved support for Windows UNC paths (\\SERVERNAME).
 
-  From Gary Oberbrunner:
-
-    - Fix Install() when the source and target are directories and the
-      target directory exists.
-
   From Jean-Baptiste Lab:
 
     - Fix problems with appending CPPDEFINES that contain
 
   FIXES
 
+    - RPATH is now in LINKCOM rather than LINKFLAGS, so resetting
+      LINKFLAGS doesn't kill RPATH
     - Precompiled headers on Windows no longer break when used with
       variant dirs containing spaces.
     - Delete can now delete symlinks to directories and broken symlinks

src/engine/SCons/Tool/gnulink.py

 
     # __RPATH is set to $_RPATH in the platform specification if that
     # platform supports it.
-    env.Append(LINKFLAGS=['$__RPATH'])
     env['RPATHPREFIX'] = '-Wl,-rpath='
     env['RPATHSUFFIX'] = ''
     env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'

src/engine/SCons/Tool/link.py

 
     env['SHLINK']      = '$LINK'
     env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
-    env['SHLINKCOM']   = '$SHLINK -o $TARGET $SHLINKFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+    env['SHLINKCOM']   = '$SHLINK -o $TARGET $SHLINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
     # don't set up the emitter, cause AppendUnique will generate a list
     # starting with None :-(
     env.Append(SHLIBEMITTER = [shlib_emitter])
     env['SMARTLINK']   = smart_link
     env['LINK']        = "$SMARTLINK"
     env['LINKFLAGS']   = SCons.Util.CLVar('')
-    env['LINKCOM']     = '$LINK -o $TARGET $LINKFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+    # __RPATH is only set to something ($_RPATH typically) on platforms that support it.
+    env['LINKCOM']     = '$LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
     env['LIBDIRPREFIX']='-L'
     env['LIBDIRSUFFIX']=''
     env['_LIBFLAGS']='${_stripixes(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, LIBPREFIXES, LIBSUFFIXES, __env__)}'
     env['LDMODULEPREFIX'] = '$SHLIBPREFIX' 
     env['LDMODULESUFFIX'] = '$SHLIBSUFFIX' 
     env['LDMODULEFLAGS'] = '$SHLINKFLAGS'
-    env['LDMODULECOM'] = '$LDMODULE -o $TARGET $LDMODULEFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
+    env['LDMODULECOM'] = '$LDMODULE -o $TARGET $LDMODULEFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS'
 
 
 

src/engine/SCons/Tool/sgilink.py

 
     # __RPATH is set to $_RPATH in the platform specification if that
     # platform supports it.
-    env.Append(LINKFLAGS=['$__RPATH'])
     env['RPATHPREFIX'] = '-rpath '
     env['RPATHSUFFIX'] = ''
     env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'

src/engine/SCons/Tool/sunlink.py

     
     env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -G')
 
-    env.Append(LINKFLAGS=['$__RPATH'])
     env['RPATHPREFIX'] = '-R'
     env['RPATHSUFFIX'] = ''
     env['_RPATH'] = '${_concat(RPATHPREFIX, RPATH, RPATHSUFFIX, __env__)}'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.