I'd like to table this again. LLD is sufficiently different to ld.bfd
that we have some problems, often with no clear way to fix them. We
had to use ld.bfd for coreboot ("vmm-firmware") and occasionally run
into other things where we have a problem with lld (I'd rather have a
consistent greppable marker for these rather than ad-hoc methods of
forcing ld.bfd) or suspect a problem and need to test it.

Any objections or OKs?

----- Forwarded message from Stuart Henderson <s...@spacehopper.org> -----

From: Stuart Henderson <s...@spacehopper.org>
Date: Tue, 30 Oct 2018 11:54:15 +0000
To: ports <ports@openbsd.org>
User-Agent: NeoMutt/20180716
Subject: RFC: USE_LLD=No for default-is-lld arches
Mail-Followup-To: ports <ports@openbsd.org>

Not sure if this is useful or unnecessary bloat, it provides a way to switch
back to ld.bfd on arches which default to ld.lld to switch back to ld.bfd.
(It hasn't gone into a bulk yet). Thoughts?


Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1450
diff -u -p -r1.1450 bsd.port.mk
--- bsd.port.mk 18 Oct 2018 09:38:32 -0000      1.1450
+++ bsd.port.mk 30 Oct 2018 11:52:03 -0000
@@ -392,12 +392,6 @@ BASELOCALSTATEDIR ?= ${VARBASE}
 LOCALSTATEDIR ?= ${BASELOCALSTATEDIR}
 
 RCDIR ?= /etc/rc.d
-USE_LLD ?= No
-.if ${USE_LLD:L} == "yes"
-_LD_PROGRAM = /usr/bin/ld.lld
-.else
-_LD_PROGRAM = /usr/bin/ld
-.endif
 USE_WXNEEDED ?= No
 .if ${USE_WXNEEDED:L} == "yes"
 _WXNEEDED_FLAGS = -z wxneeded
@@ -795,6 +789,30 @@ CONFIGURE_ENV += ${_EXTRA_ENV}
 MAKE_ENV += ${_EXTRA_ENV}
 .endif
 
+.if ${PROPERTIES:Mlld}
+USE_LLD ?= Yes
+.else
+USE_LLD ?= No
+.endif
+
+.if ${USE_LLD:L} == "yes"
+_LD_PROGRAM = /usr/bin/ld.lld
+.  if ! ${PROPERTIES:Mlld}
+_NONDEFAULT_LD = Yes
+.  endif
+.else
+_LD_PROGRAM = /usr/bin/ld.bfd
+.  if ${PROPERTIES:Mlld}
+_NONDEFAULT_LD = Yes
+.  endif
+.endif
+
+.if ${_LD_PROGRAM} != ${_LD_DEFAULT}
+_NONDEFAULT_LD = Yes
+.else
+_NONDEFAULT_LD = No
+.endif
+
 # setup locations of compilers from the base system or environment variables.
 # MODULES for compilers (gcc4.port.mk, clang.port.mk) also append to this,
 # used to write wrappers to WRKDIR/bin which is at the head of the PATH.
@@ -2667,7 +2685,7 @@ ${_PATCH_COOKIE}: ${_EXTRACT_COOKIE}
 
 # Run as _pbuild
 _post-patch-finalize:
-.if ${USE_WXNEEDED:L} == "yes" || ${USE_LLD:L} == "yes"
+.if ${USE_WXNEEDED:L} == "yes" || ${_NONDEFAULT_LD:L} == "yes"
        @wrktmp=`df -P ${WRKOBJDIR_${PKGPATH}} | awk 'END { print $$6 }'`; \
        if ! mount | grep -q " $${wrktmp} .*wxallowed"; then \
                echo "Fatal: ${WRKOBJDIR_${PKGPATH}} must be on a wxallowed 
filesystem" \


----- End forwarded message -----

Reply via email to