On Fri, 28 Aug 2026 03:48:08 +0200, Brad Smith <brad@comstyle.com> wrote: > > Something has changed between LLVM 13 and 22 and the GCC ports now > build just fine on i386 with LLD. > Two remarks: 1. Only gcc-16 is alive, 15 and 11 is unbind and can be skipt 2. As soon as we switched gcc to LLD instead of BFD, gcc will use LLD for everything. I saw similar error recently on i386 VM when tried make test at ffmpeg, and it exists on both ffmpeg-8 and ffmpeg-9, the error was: ld: error: relocation R_386_32 cannot be used against local symbol; recompile with -fPIC >>> defined in libavcodec/libavcodec.a(xvididct.o) >>> referenced by x86inc.asm:1508 (src//libavutil/x86/x86inc.asm:1508) >>> xvididct.o:(.text+0x1ac) in archive libavcodec/libavcodec.a So, I a bit afraid to switch gcc generally to lld in 386 without full bulk which confirms that it is safe. > > Index: 11/Makefile > =================================================================== > RCS file: /cvs/ports/lang/gcc/11/Makefile,v > retrieving revision 1.71 > diff -u -p -u -p -r1.71 Makefile > --- 11/Makefile 8 Aug 2026 10:46:16 -0000 1.71 > +++ 11/Makefile 28 Aug 2026 01:43:25 -0000 > @@ -120,9 +120,6 @@ MAKE_ENV += ${EXTRA_ENV} > # .sdata.DW.ref.__gxx_personality_v0 > USE_LLD = No > CONFIGURE_ENV += LDFLAGS="-Wl,--relax" > -.elif ${MACHINE_ARCH:Mi386} > -USE_LLD = No > -# ld.lld: error: relocation R_386_PC32 cannot be used against symbol 'hash_set<nofree_string_hash, false, default_hash_traits<nofree_string_hash>>::hash_set(unsigned long, bool)'; recompile with -fPIC, etc. > .endif > > # Note: the configure target passes CFLAGS to the configure script anyways. > Index: 15/Makefile > =================================================================== > RCS file: /cvs/ports/lang/gcc/15/Makefile,v > retrieving revision 1.26 > diff -u -p -u -p -r1.26 Makefile > --- 15/Makefile 23 Jul 2026 21:09:51 -0000 1.26 > +++ 15/Makefile 28 Aug 2026 01:43:25 -0000 > @@ -122,9 +122,6 @@ MAKE_ENV += ${EXTRA_ENV} > # .sdata.DW.ref.__gxx_personality_v0 > USE_LLD = No > CONFIGURE_ENV += LDFLAGS="-Wl,--relax" > -.elif ${MACHINE_ARCH:Mi386} > -USE_LLD = No > -# ld.lld: error: relocation R_386_PC32 cannot be used against symbol 'hash_set<nofree_string_hash, false, default_hash_traits<nofree_string_hash>>::hash_set(unsigned long, bool)'; recompile with -fPIC, etc. > .endif > > # Note: the configure target passes CFLAGS to the configure script anyways. > Index: 16/Makefile > =================================================================== > RCS file: /cvs/ports/lang/gcc/16/Makefile,v > retrieving revision 1.16 > diff -u -p -u -p -r1.16 Makefile > --- 16/Makefile 21 Aug 2026 13:54:27 -0000 1.16 > +++ 16/Makefile 28 Aug 2026 01:43:25 -0000 > @@ -127,9 +127,6 @@ MAKE_ENV += ${EXTRA_ENV} > # .sdata.DW.ref.__gxx_personality_v0 > USE_LLD = No > CONFIGURE_ENV += LDFLAGS="-Wl,--relax" > -.elif ${MACHINE_ARCH:Mi386} > -USE_LLD = No > -# ld.lld: error: relocation R_386_PC32 cannot be used against symbol 'hash_set<nofree_string_hash, false, default_hash_traits<nofree_string_hash>>::hash_set(unsigned long, bool)'; recompile with -fPIC, etc. > .endif > > # Note: the configure target passes CFLAGS to the configure script anyways. > Index: 8/Makefile > =================================================================== > RCS file: /cvs/ports/lang/gcc/8/Makefile,v > retrieving revision 1.107 > diff -u -p -u -p -r1.107 Makefile > --- 8/Makefile 2 Jun 2026 19:58:10 -0000 1.107 > +++ 8/Makefile 28 Aug 2026 01:43:25 -0000 > @@ -13,9 +13,6 @@ ONLY_FOR_ARCHS-ada = amd64 hppa i386 mip > # .sdata.DW.ref.__gxx_personality_v0 > .if ${MACHINE_ARCH:Mpowerpc} > USE_LLD = No > -.elif ${MACHINE_ARCH:Mi386} > -USE_LLD = No > -# ld.lld: error: relocation R_386_PC32 cannot be used against symbol 'hash_set<nofree_string_hash, false, default_hash_traits<nofree_string_hash>>::hash_set(unsigned long, bool)'; recompile with -fPIC, etc. > .endif > > DPB_PROPERTIES = parallel > -- wbr, Kirill
No comments:
Post a Comment