Created attachment 215741 [details] patch Currently, Rust on powerpc64 elfv2 builds with GCC because of past issue with LLVM. However, this issue seems to be resolved now and I can already build Rust with Clang and then build with it other packages, like Firefox. The problem is that, when using GCC, binutils is getting installed, but when using LLVM, it's not and there is -fno-integrated-as getting passed on ppc64. Since it's only for the build and users building from ports have binutils installed anyway, add it for everyone.
Comment on attachment 215741 [details] patch Better move to Mk/bsd.gecko.mk which already has a powerpc* conditional, so just put USE_BINUTILS there for now. Unifying multiple USE_BINUTILS conditionals can be done at a later time e.g., /usr/local/bin/ld should be avoided if possible because it's slow and doesn't support Clang LTO.
(In reply to Jan Beich from comment #1) If using ld.bfd should be avoided, then why force it? Wouldn't it then be better to add BUILD_DEPENDS+=as:devel/binutils to Mk/bsd.gecko.mk?
Do you mean unconditionally? aarch64/amd64/i386 don't use GNU as while LDFLAGS+=-B${LOCALBASE}/bin is an artifact of FreeBSD < 11 days before upstream added --enable-linker=lld.
No, I mean in the powerpc block.
Index: bsd.gecko.mk =================================================================== --- bsd.gecko.mk (revision 539557) +++ bsd.gecko.mk (working copy) @@ -310,6 +310,7 @@ LDFLAGS+= -B${LOCALBASE}/bin . endif .elif ${ARCH:Mpowerpc*} +BUILD_DEPENDS+= as:devel/binutils . if ${ARCH} == "powerpc64" MOZ_EXPORT+= UNAME_m="${ARCH}" . endif
(In reply to Piotr Kubaj from comment #5) Looks OK.
A commit references this bug: Author: pkubaj Date: Thu Jun 18 20:34:16 UTC 2020 New revision: 539570 URL: https://svnweb.freebsd.org/changeset/ports/539570 Log: Mk/bsd.gecko.mk: add devel/binutils to BUILD_DEPENDS Currently, Rust on powerpc64 elfv2 builds with GCC because of past issue with LLVM. However, this issue seems to be resolved now and I can already build Rust with Clang and then build with it other packages, like Firefox. The problem is that, when using GCC, binutils is getting installed, but when using LLVM, it's not and there is -fno-integrated-as getting passed on ppc64. Since it's only for the build and users building from ports have binutils installed anyway, add it for everyone. PR: 247387 Approved by: jbeich (maintainer) Changes: head/Mk/bsd.gecko.mk