This is the mail archive of the gcc@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]

Nit: False 'file path prefix never used' warning


While debugging a linker problem, I noticed this annoying little
behavior:

drow:~$ ls -lu /usr/local/binutils/bin/ld
-rwxr-xr-x   2 root     staff     1681610 Jul 29 19:12 /usr/local/binutils/bin/ld*

drow:~$ c++ -fPIC -shared segvtest.o
collect2: ld terminated with signal 11 [Segmentation fault], core dumped

drow:~$ c++ -fPIC -shared segvtest.o -B/usr/local/binutils/bin
c++: file path prefix `/usr/local/binutils/bin' never used

drow:~$ ls -lu /usr/local/binutils/bin/ld
-rwxr-xr-x   2 root     staff     1681610 Jul 29 19:19 /usr/local/binutils/bin/ld*


Obviously, collect2 did call a different linker, via the COMPILER_PATH
variable it was given, but I can see no easy way for collect2 to
indicate whether it did use a given prefix.  Perhaps gcc.c should
check, if it knows it is using collect2 and the name of the linker
collect2 will invoke, if that linker is in a -B path?

Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
|   Debian GNU/Linux Developer    __    Carnegie Mellon University   |
|         dan@debian.org         |  |       dmj+@andrew.cmu.edu      |
\--------------------------------/  \--------------------------------/


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