This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix setting of objc_libgcc_s_path


Every call to objc_init does:

    global objc_libgcc_s_path
    ...
    lappend objc_libgcc_s_path [gcc-set-multilib-library-path $OBJC_UNDER_TEST]

so objc_libgcc_s_path gets longer with each new *.exp file.
With a 3-ABI mips64-linux-gnu run, LD_LIBRARY_PATH was getting
too long during the 3rd run.

Fixed by changing the lappend to a set, just as treelang.exp does.
Bootstrapped & regression-tested on x86_64-linux-gnu and
regression-tested on mips64-linux-gnu.  Installed as obvious.

Richard

  [ Just for the record, in case anyone's wondering:

      if { $objc_initialized == 1 } { return; }

    seems to be dead code, as nothing ever sets objc_initialized.
    The code build by:

      objc_maybe_build_wrapper "${tmpdir}/objc-testglue.o"

    depends on the multilib being tested, so a simple 0/1 guard
    would be (and was presumably found to be) too simplistic. ]


gcc/testsuite/
	* lib/objc.exp (objc_libgcc_s_path): Set objc_libgcc_s_path
	instead of appending to it.

Index: gcc/testsuite/lib/objc.exp
===================================================================
--- gcc/testsuite/lib/objc.exp	2007-12-28 15:02:12.000000000 +0000
+++ gcc/testsuite/lib/objc.exp	2007-12-28 15:02:17.000000000 +0000
@@ -115,7 +115,7 @@ proc objc_init { args } {
 
     objc_maybe_build_wrapper "${tmpdir}/objc-testglue.o"
 
-    append objc_libgcc_s_path [gcc-set-multilib-library-path $OBJC_UNDER_TEST]
+    set objc_libgcc_s_path [gcc-set-multilib-library-path $OBJC_UNDER_TEST]
 }
 
 proc objc_target_compile { source dest type options } {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]