Re: [libvirt] PATCH: configure.in should use 'ld' from $PATH for checking version-script syntax, not hardcode /usr/bin/ld

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/16/2009 11:42 PM, Daniel Veillard wrote:
that won't differentiate ld in $PATH from /usr/bin/ld which
is the actual command launched by gcc (or rather collect2) ... so
unfortunately that's still gcc only and even then incomplete:-)

If --print-prog-name gives only "ld" that means collect2 will walk the $PATH. But if gcc was configured with --with-ld=something, or if a -B option is included in $CC, then --print-prog-name will print a full path.

Example (PATH includes ~/bin):

$ cat ~/bin/ld
#! /bin/sh
echo hello from "$0" > /dev/tty
exec /usr/bin/ld "$@"

$ gcc --print-prog-name=ld
ld
$ gcc f.c
hello from /home/pbonzini/bin/ld

$ gcc -B$HOME/bin --print-prog-name=ld
/home/pbonzini/bin/ld
$ gcc -B$HOME/bin f.c
hello from /home/pbonzini/bin/ld

$ gcc -B$HOME/./bin --print-prog-name=ld
/home/pbonzini/./bin/ld
$ gcc -B$HOME/./bin f.c
hello from /home/pbonzini/./bin/ld

HTH,

Paolo

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]