Summary: | gold can't find a scripted INPUT when both script and input are in a subdirectory | ||
---|---|---|---|
Product: | binutils | Reporter: | Rohan Hart <rohan.hart17> |
Component: | gold | Assignee: | Cary Coutant <ccoutant> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | bug-binutils, ccoutant, gideon, Ralf.Wildenhues |
Priority: | P2 | ||
Version: | 2.20 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | patch to remove path of INPUT'd file names |
Description
Rohan Hart
2010-01-19 00:59:06 UTC
Created attachment 4542 [details]
patch to remove path of INPUT'd file names
This issue occurs frequently with libtool when command lines are long, on systems where the command line length limit is low. The scripts usually look like this (taken from the libtool pdemo tests): $ cat .libs/libhello.la.lnkscript INPUT ( .libs/longer_file_name_hello.o .libs/longer_file_name_foo.o .libs/longer_file_name_foo2.o ) $ ls .libs libhello.la.lnkscript longer_file_name_foo2.o longer_file_name_foo.o longer_file_name_hello.o $ /bin/sh ./libtool --tag=CC --mode=link gcc -flto -O2 -no-undefined -version-info 3:12:1 -o libhello.la -rpath /tmp/libtool/build/_inst-pdemo/lib longer_file_name_hello.lo longer_file_name_foo.lo longer_file_name_foo2.lo -lm -ldl libtool: link: gcc -shared -fPIC -DPIC .libs/libhello.la.lnkscript -lm -ldl -flto -O2 -Wl,-soname -Wl,libhello.so.2 -o .libs/libhello.so.2.1.12 /opt/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/bin/ld: error: cannot find .libs/longer_file_name_hello.o /opt/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/bin/ld: error: cannot find .libs/longer_file_name_foo.o /opt/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../x86_64-unknown-linux-gnu/bin/ld: error: cannot find .libs/longer_file_name_foo2.o collect2: ld returned 1 exit status make[5]: *** [libhello.la] Error 1 Now, my on-topic question: do you expect this issue to be fixed, and addressed soonish? I'm trying to gauge whether libtool should work around this by treating BFD ld and gold differently (which would add a couple more configure tests again). Thanks. I expect that I or somebody will fix this fairly soon but I don't know exactly when. Obviously if anybody wants to send a patch, that would be great. (In reply to comment #3) > Obviously if anybody wants to send a patch, that would be great. FWIW, the patch from comment #1 strips all directory parts, whereas BFD ld only strips the version script name part; i.e., with cat >sub/ld.script <<\EOF INPUT(sub2/file.o) EOF BFD ld looks at sub2/file.o but not at file.o nor at sub/sub2/file.o. |