diff mbox

PATCH: PR target/60590: Can't recreate the same executable in testsuite

Message ID 20140319154127.GA22142@intel.com
State New
Headers show

Commit Message

H.J. Lu March 19, 2014, 3:41 p.m. UTC
GNU linker sets DT_RPATH from the environment variable LD_RUN_PATH.
set_ld_library_path_env_vars sets a few environment variables including
LD_RUN_PATH.  This patch logs all environment variables set by
set_ld_library_path_env_vars so that one can recreate the same
executable as "make check" run.  OK to install?

Thanks.

H.J.
---
2014-03-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/60590
	* lib/target-libpath.exp (set_ld_library_path_env_vars): Log
	LD_LIBRARY_PATH, LD_RUN_PATH, SHLIB_PATH, LD_LIBRARY_PATH_32,
	LD_LIBRARY_PATH_64 and DYLD_LIBRARY_PATH.

Comments

Mike Stump March 19, 2014, 4:49 p.m. UTC | #1
On Mar 19, 2014, at 8:41 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> GNU linker sets DT_RPATH from the environment variable LD_RUN_PATH.
> set_ld_library_path_env_vars sets a few environment variables including
> LD_RUN_PATH.  This patch logs all environment variables set by
> set_ld_library_path_env_vars so that one can recreate the same
> executable as "make check" run.  OK to install?

Ok.  If someone complains about the log size clutter, we can consider bumping it up to higher verbosity.
diff mbox

Patch

diff --git a/gcc/testsuite/lib/target-libpath.exp b/gcc/testsuite/lib/target-libpath.exp
index 603ed8a..1891088 100644
--- a/gcc/testsuite/lib/target-libpath.exp
+++ b/gcc/testsuite/lib/target-libpath.exp
@@ -155,7 +155,12 @@  proc set_ld_library_path_env_vars { } {
     setenv DYLD_LIBRARY_PATH "$ld_library_path"
   }
 
-  verbose -log "set_ld_library_path_env_vars: ld_library_path=$ld_library_path"
+  verbose -log "LD_LIBRARY_PATH=[getenv LD_LIBRARY_PATH]"
+  verbose -log "LD_RUN_PATH=[getenv LD_RUN_PATH]"
+  verbose -log "SHLIB_PATH=[getenv SHLIB_PATH]"
+  verbose -log "LD_LIBRARY_PATH_32=[getenv LD_LIBRARY_PATH_32]"
+  verbose -log "LD_LIBRARY_PATH_64=[getenv LD_LIBRARY_PATH_64]"
+  verbose -log "DYLD_LIBRARY_PATH=[getenv DYLD_LIBRARY_PATH]"
 }
 
 #######################################