Bug 247387 - www/firefox: add devel/binutils to BUILD_DEPENDS
Summary: www/firefox: add devel/binutils to BUILD_DEPENDS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks: 247388
  Show dependency treegraph
 
Reported: 2020-06-18 18:21 UTC by Piotr Kubaj
Modified: 2020-06-18 20:34 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments
patch (452 bytes, patch)
2020-06-18 18:21 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2020-06-18 18:21:37 UTC
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 1 Jan Beich freebsd_committer freebsd_triage 2020-06-18 18:48:25 UTC
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.
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2020-06-18 18:59:55 UTC
(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?
Comment 3 Jan Beich freebsd_committer freebsd_triage 2020-06-18 19:22:01 UTC
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.
Comment 4 Piotr Kubaj freebsd_committer freebsd_triage 2020-06-18 19:23:33 UTC
No, I mean in the powerpc block.
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2020-06-18 19:24:21 UTC
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
Comment 6 Jan Beich freebsd_committer freebsd_triage 2020-06-18 20:30:41 UTC
(In reply to Piotr Kubaj from comment #5)
Looks OK.
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-06-18 20:34:46 UTC
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