https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69757
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
CC| |tschwinge at gcc dot gnu.org
Keywords| |build
Last reconfirmed| |2026-07-03
--- Comment #9 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Ten years later, this problem still exists. I'm trying to build GCC on
cfarm220 (see <https://portal.cfarm.net/machines/list/>), which is amd64,
OpenBSD 7.9.
By default, we've got:
$ type -p as && as --version
/usr/bin/as
GNU assembler 2.17
[...]
$ type -p ld && ld --version
/usr/bin/ld
LLD 19.1.7 (compatible with GNU linkers)
..., and I manage to get 'all-gcc' built, but when it attempts to
'configure-target-libatomic', we run into:
ld: error: relocation R_X86_64_32 cannot be used against local symbol;
recompile with -fPIC
For the record, '--with-ld=/usr/bin/ld.bfd':
$ ld.bfd --version
GNU ld version 2.17
[...]
... also doesn't help:
/usr/bin/ld.bfd: /tmp//ccJMnqsz.o: relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC