Bug#161615: gcc: -print-file-name sometimes fails
Package: gcc
Version: 2:3.2-0pre3
Severity: normal
For some libraries (ie libc.so libstdc++.so libgcc.a) it produces ugly name
relative to some gcc directory.
ie /usr/lib/gcc-lib/i386-gnu/3.2/../../../libpaper.la
For a library in [/usr]/local/lib (usr is a link to /) I had to link it to
/lib for gcc to print its full (/usr/lib/...) path. Without the link
-print-file-name just echoes the given name and returns successfully.
hramrach@hurd:~$ touch empty.c
hramrach@hurd:~$ gcc -c empty.c -o empty.o
hramrach@hurd:~$ ld -nostdlibs empty.o -u oskit_version -loskit_kern -o empty -M | grep liboskit_kern
ld: warning: cannot find entry symbol _start; defaulting to 08048074
/usr/local/lib/liboskit_kern.a(version.o)
LOAD /usr/local/lib/liboskit_kern.a
0x08048074 0x9 /usr/local/lib/liboskit_kern.a(version.o)
... (some section info here) ...
hramrach@hurd:~$ gcc -print-file-name=libc.so
/usr/lib/gcc-lib/i386-gnu/3.2/../../../libc.so
hramrach@hurd:~$ gcc -print-file-name=liboskit_kern.a
liboskit_kern.a
--
Michal Suchanek
hramrach@centrum.cz
-- System Information
Debian Release: testing/unstable
Kernel Version: GNU hurd 0.3 GNUmach-1.90/Hurd-0.3 i686-AT386 unknown unknown GNU
Versions of the packages gcc depends on:
ri cpp 3.2-0pre3 The GNU C preprocessor.
ri cpp-3.2 3.2-0pre3 The GNU C preprocessor.
ri gcc-3.2 3.2-0pre3 The GNU C compiler.
Reply to: