Not sure whether to report this as individual ports bug or base system bug. The security/gnutls ports does not build on 12-CURRENT aarch64 (poudriere build with qemu-user-static) after updating the llvm toolchain to version 3.9.0 ( base r309124 ). The newly added lld linker seems to be the culprit giving an linker error (complete logfile in attachment): libtool: link: c++ -shared -nostdlib /usr/lib/crti.o /usr/lib/crtbeginS.o .libs/libgnutlsxx_la-gnutlsxx.o ./.libs/libgnutls.so -lintl -L/usr/local/lib -L/usr/lib -lc++ -lm -lc -lgcc -lgcc_s /usr/lib/crtendS.o /usr/lib/crtn.o -O2 -o .libs/libgnutlsxx.so.28.1.0 CIE code alignment must be 1 c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[5]: *** [Makefile:1729: libgnutlsxx.la] Error 1 gmake[5]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.5.8/lib' gmake[4]: *** [Makefile:1940: all-recursive] Error 1 gmake[4]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.5.8/lib' gmake[3]: *** [Makefile:1629: all] Error 2 gmake[3]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.5.8/lib' gmake[2]: *** [Makefile:1460: all-recursive] Error 1 gmake[2]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.5.8' gmake[1]: *** [Makefile:1388: all] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/security/gnutls/work/gnutls-3.5.8' *** Error code 1 Workaround: Patching lld with http://llvm.org/viewvc/llvm-project?view=revision&revision=277105 from llvm upstream fixes the linker error (the patch is not backported to the llvm 3.9 branch yet).
I wasn't aware that lld was used by default for aarch64, I thought this used an external binutils port based ld instead? But in any case, @Ed, upstream r277105 seems like a relatively safe one to import into 3.9 as we have it now in head and stable/11?
(In reply to Dimitry Andric from comment #1) > I wasn't aware that lld was used by default for aarch64, I thought this used > an external binutils port based ld instead? buildworld and buildkernel use the binutils ld by default, but as of 3.9 we have added LLD by default so a linker is available in the base system. > But in any case, @Ed, upstream r277105 seems like a relatively safe one to > import into 3.9 as we have it now in head and stable/11? I agree, it should be safe for us (although upstream is unlikely to backport it).
A commit references this bug: Author: emaste Date: Wed Feb 8 20:31:54 UTC 2017 New revision: 313458 URL: https://svnweb.freebsd.org/changeset/base/313458 Log: lld: Allow arbitrary code alignment in .eh_frame According to the specification, CIE code alignment factor is an arbitrary unsigned LEB128 encoded value. PR: 216908 Reported by: Wolfgang Meyer Obtained from: Upstream LLD r277105 MFC after: 1 week Changes: head/contrib/llvm/tools/lld/ELF/EhFrame.cpp
A commit references this bug: Author: emaste Date: Wed Feb 15 15:18:44 UTC 2017 New revision: 313773 URL: https://svnweb.freebsd.org/changeset/base/313773 Log: MFC r313458: lld: Allow arbitrary code alignment in .eh_frame According to the specification, CIE code alignment factor is an arbitrary unsigned LEB128 encoded value. PR: 216908 Changes: _U stable/11/ stable/11/contrib/llvm/tools/lld/ELF/EhFrame.cpp