[lld] r286378 - [ELF] - Add separate form for -R alias.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 00:35:46 PST 2016


> This is a bug in the invocation. If anything, it should be:
>   cc -Wl,-R -Wl,/usr/local/lib -o prog prog.c

>I think this is a typo of the commit message. 

Not sure if that is a bug, but there is no typo in my commit message.
Here is copy of log from building the devel/chrpath:

===>  Building for chrpath-0.16
gmake[1]: Entering directory '/wrkdirs/usr/ports/devel/chrpath/work/chrpath-0.16'
gmake  all-recursive
gmake[2]: Entering directory '/wrkdirs/usr/ports/devel/chrpath/work/chrpath-0.16'
Making all in testsuite
gmake[3]: Entering directory '/wrkdirs/usr/ports/devel/chrpath/work/chrpath-0.16/testsuite'
cc -Wl,-R /usr/local/lib -o prog prog.c
/usr/bin/ld: error: line 1: unknown directive: 

I think they have problem in configuration here:
 LDRPATH= -R 
at this line LDRPATH contains leading whitespace.

But returning to an issue, when I test helloworld with clang using the same invocation it passes " -R /usr/local/lib" correctly I think:
umb at ubuntu:~/tests/155cpio$ clang -Wl,-R /usr/local/lib -v main.c -o temp
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
....
 "/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o temp /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../.. -L/usr/lib/llvm-3.8/bin/../lib -L/lib -L/usr/lib -R /usr/local/lib /tmp/main-b52c26.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/6.2.0/../../../x86_64-linux-gnu/crtn.o

George.


More information about the llvm-commits mailing list