-Wl,-rpath seems to be broken when this option is used several times.
If I configure MPFR with:
./configure --prefix=/tmp CC=tcc LD=tcc CFLAGS=-O2
I get things like:
libtool: link: tcc -O2 -o ty1 ty1.o -L../src/.libs ./.libs/libfrtests.a -lm
../src/.libs/libmpfr.so -lgmp -Wl,-rpath
-Wl,/home/vlefevre/software/mpfr/src/.libs -Wl,-rpath -Wl,/tmp/lib
but then I get failures:
$ ./ty1
./ty1: symbol lookup error: ./ty1: undefined symbol: mpfr_free_cache2
$ ldd ty1 | grep mpfr
libmpfr.so => /usr/lib/x86_64-linux-gnu/libmpfr.so (0x00007f3a575ce000)
while without --prefix=/tmp, everything is fine, as tcc links against
the correct MPFR library:
$ ldd ty1 | grep mpfr
libmpfr.so => /home/vlefevre/software/mpfr/src/.libs/libmpfr.so
(0x00007f6f3cc03000)
So, it seems that above, the first -Wl,-rpath is ignored.
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel