libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HEAD link-order.at fails when hardcode_direct=yes


From: Albert Chin
Subject: HEAD link-order.at fails when hardcode_direct=yes
Date: Tue, 25 Apr 2006 14:55:09 -0500
User-agent: Mutt/1.5.6i

On systems with hardcode_direct=yes, the following section in
tests/link-order.at will fail:
  AT_CHECK([if $EGREP relinking stderr; then
              $EGREP ' -L.*\/new\/lib -lb -L.*\/old\/lib -lcee' stdout
            else :; fi], [0], [ignore], [], [echo "wrong link order"])

Why? Because "-L.*\/new\/lib -lb" will be converted to
.*\/new\/lib/liblb$shrext_cmds.

Patch attached. Note, the new RE doesn't fully address what you
intended. The original libtool output:
  libtool: install: warning: relinking `src/liba.la'
  stdout:
  libtool: install: (cd /opt/build/libtool/tests/testsuite.dir/14; /bin/sh 
/opt/build/libtool/libtool  --mode=relink cc -z +O2 +Olit=all +Onofltacc 
+Oentrysched +Odataprefetch +Onolimit -no-undefined -o src/liba.la src/a.lo 
src/libb.la -L/opt/build/libtool/tests/testsuite.dir/14/old/lib -lcee -rpath 
/opt/build/libtool/tests/testsuite.dir/14/new/lib )
  libtool: relink: cc -b -Wl,+h -Wl,liba.sl.0 -Wl,+b 
-Wl,/opt/build/libtool/tests/testsuite.dir/14/new/lib -o src/.libs/liba.sl.0.0  
src/.libs/a.o   /opt/build/libtool/tests/testsuite.dir/14/new/lib/libb.sl 
-L/opt/build/libtool/tests/testsuite.dir/14/old/lib 
/opt/build/libtool/tests/testsuite.dir/14/old/lib/libcee.sl -lc     

Note the link order above is:
  /opt/build/libtool/tests/testsuite.dir/14/new/lib/libb.sl
  -L/opt/build/libtool/tests/testsuite.dir/14/old/lib
  /opt/build/libtool/tests/testsuite.dir/14/old/lib/libcee.sl
rather than what you probably want:
  /opt/build/libtool/tests/testsuite.dir/14/new/lib/libb.sl
  /opt/build/libtool/tests/testsuite.dir/14/old/lib/libcee.sl

But the ".*" pattern sucks up the
"-L/opt/build/libtool/tests/testsuite.dir/14/old/lib".


2006-05-25  Albert Chin-A-Young  <address@hidden>

        * tests/link-order.at: Take hardcode_direct into consideration
        when testing link order.

-- 
albert chin (address@hidden)

Attachment: a
Description: tests/link-order.at patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]