Stuart Henderson <s...@spacehopper.org> wrote: > On 2025/06/19 22:29, Janne Johansson wrote: > > > > > > I'm trying to compile gcl-2.7.1 on OpenBSD 7.7 with gcc-11. Configure > > > seems to > > > be stopping on this particular error: > > > > > > configure:7102: egcc -o conftest -fsigned-char -pipe -fcommon > > > -fno-builtin- > > > malloc -fno-builtin-free -std=gnu17 -Wall -Wno-empty-body > > > -Wno-unused-but-set- > > > variable -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -no-pie -Werror -Z > > > conftest.c >&5 > > > ld: error: unknown argument '-Z' > > > > > > I'm not all that strong on the compiler tooling, but it appears that this > > > -Z > > > argument is either being erroneously passed to the linker, or it's > > > expecting > > > ln to have a -Z option. > > > > > > To add some additional context I did substitute the gcl config.guess with > > > the > > > one distributed by OpenBSD. Any suggestions of where to look next? Is > > > there > > > some linker version that does have a -Z option? > > > > ld.bfd should have it. > > ...if on an architecture which has ld.bfd (aarch64 doesn't), and if it > works - it still does on i386; I'm not so sure about amd64, I just tried > some simple cases with ports-gcc and base-clang by adding -fuse-ld=bfd > to the command line when using the compiler to link, and ld.bfd is > segfaulting while trying to print an "unresolvable %s relocation > against symbol `%s'" error. >
I tried it with clang: $ export CC="clang -fuse-ld=bfd" $ export CXX="clang++ -fuse-ld=bfd" $ ./configure Configure ended with: checking whether we are cross compiling... configure: error: in '/srv/project/rbc/src/gcl-2.7.1': configure: error: cannot run C compiled programs. If you meant to cross compile, use '--host'. See 'config.log' for more details Here's an excerpt from config.log: configure:5086: clang -fuse-ld=bfd -o conftest conftest.c >&5 /usr/bin/ld.bfd: /tmp/conftest-a86d93.o(.text+0x51): unresolvable <F3>^O^^<FA>L<8B>^]<B5><F0>^D relocation against symbol `__isthreaded' configure:5090: $? = 0 configure:5097: ./conftest Segmentation fault (core dumped) configure:5101: $? = 139 configure:5108: error: in '/srv/project/rbc/src/gcl-2.7.1': configure:5110: error: cannot run C compiled programs. If you meant to cross compile, use '--host'. This is an amd64 host.