finding libraries from linker via $ORIGIN
John Reiser
jreiser@bitwagon.com
Wed Apr 10 18:12:00 GMT 2013
> Is there a way to force gcc to use a different linker that I can control
> from a Makefile (such as via an environment variable). Or is my only
> option to make sure that the ld found via the PATH is gold and not the
> old linker?
The gcc mechanism is called "spec files". Hints are shown by:
$ gcc --verbose hello.c
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
Consult the gcc documentation "info gcc" node "* Spec Files::"
Changing and debugging a spec file can be tedious.
--
More information about the Binutils
mailing list