This is the mail archive of the
mailing list for the binutils project.
Re: finding libraries from linker via $ORIGIN
- From: John Reiser <jreiser at bitwagon dot com>
- To: binutils at sourceware dot org
- Date: Wed, 10 Apr 2013 11:13:33 -0700
- Subject: Re: finding libraries from linker via $ORIGIN
- References: <19133 dot 1365611488 at thecus dot kiddle dot eu>
> 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_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.