On 02/16/2015 05:19 PM, Thiago Farina wrote:
> What could be causing the following?
>
> /usr/bin/ld.gold: warning: ignoring --threads: /usr/bin/ld.gold was
> compiled without thread support
>
> Somehow it seems to be using ld.gold rather than my /usr/bin/gold.
On many linux systems, /usr/bin/gold is just a symlink to
/usr/bin/ld.gold (or ld.bfd). And for some reason, threaded support for
gold is off by default last time I checked.
> Has anyone encountered this too?
Not for a while. Is this the gyp build or gn? Can you paste the
failing link command? (I suspect gyp, since it looks like the gn build
doesn't use gold's --threads flag yet.)
IIRC the compiler has a default linker name and set of paths to find it
compiled in, and that can be modified with -fuse-ld=gold or -fuse-ld=bfd
to pick one of the predefined linkers, or -B<path to binutils dir> to
use a custom ld executable inside.
There are a few gyp settings to play with: linux_use_bundled_gold and
linux_use_bundled_binutils to use the included binutils or just gold. I
would recommend this unless you're cross compiling and need to use a
specific toolchain.
linux_use_gold_flags will toggle whether or not to use gold-specific
flags like --threads. I would recommend this if you specifically want
to use your system's native linker.
-Mostyn.
--
Mostyn Bramley-Moore
TV and Connected Devices
Opera Software ASA
mos...@opera.com