Hi, On Thu, Jun 29, 2023 at 10:55:34PM -0700, Greg Steuck wrote: > Christian Weisgerber <na...@mips.inka.de> writes: > > > Since BTI affects any and all compilers that generate executable code, > > I tried to build all lang/* ports on amd64 with BTI enabled. Here's the > > list of failures: > > > > devel/jdk/1.8 # needs new bootstrap > > lang/crystal > > lang/fpc > > lang/gcc/11 > > lang/ghc > > Naturally, as kili@ suspected, we need a new bootstrap with the right > flags plumbed through. Unfortunately I don't have access to the hardware > with this feature.
Same here. Could someone be so kind to try the diff below? It uses a bootstrap I built from lang/ghc-8.10.7 with similar changes. If it works, I'll commit both (lang/ghc and lang/ghc-8.10.7) and also look to integrate Gregs work getting rid of USE_NOEXECONLY. Ciao, Kili Index: Makefile =================================================================== RCS file: /cvs/ports/lang/ghc/Makefile,v retrieving revision 1.211 diff -u -p -r1.211 Makefile --- Makefile 17 Mar 2023 10:40:44 -0000 1.211 +++ Makefile 30 Jun 2023 19:05:02 -0000 @@ -11,14 +11,16 @@ NO_CCACHE = Yes # Upstream bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22782 USE_NOEXECONLY = Yes +USE_NOBTCFI = Yes + GHC_VERSION = 9.2.7 -REVISION = 1 +REVISION = 2 DISTNAME = ghc-${GHC_VERSION} CATEGORIES = lang devel HOMEPAGE = https://www.haskell.org/ghc/ # Version of the precompiled binaries -BIN_VER = 8.10.7.20230316 +BIN_VER = 8.10.7.20230613 # lang/python needed for regression tests. MODULES = lang/python @@ -114,7 +116,8 @@ CONFIGURE_ARGS += --with-ffi-includes=${ CONFIGURE_ENV += SPHINXBUILD=${LOCALBASE}/bin/sphinx-build${MODPY_BIN_SUFFIX} -GHC_CC_OPTS = -Wl,--no-execute-only -Qunused-arguments +GHC_CC_OPTS = -Wl,--no-execute-only -Qunused-arguments \ + -Wl,-z,nobtcfi CONFIGURE_ENV += CONF_GCC_LINKER_OPTS_STAGE0="${GHC_CC_OPTS}" \ CONF_GCC_LINKER_OPTS_STAGE1="${GHC_CC_OPTS}" \ CONF_GCC_LINKER_OPTS_STAGE2="${GHC_CC_OPTS}" \ Index: distinfo =================================================================== RCS file: /cvs/ports/lang/ghc/distinfo,v retrieving revision 1.67 diff -u -p -r1.67 distinfo --- distinfo 17 Mar 2023 10:40:44 -0000 1.67 +++ distinfo 30 Jun 2023 19:05:02 -0000 @@ -1,8 +1,8 @@ -SHA256 (ghc/ghc-8.10.7.20230316-amd64-unknown-openbsd.tar.xz) = rj7ePY2zwgajLYmuRTyGi+TaJVFnE13TdaNpmPjEd1I= -SHA256 (ghc/ghc-8.10.7.20230316-shlibs-amd64.tar.gz) = 8QVqNJq6XGI+Xw9Hdf4uMDAeYY9V97U0DDJFPePDe2U= +SHA256 (ghc/ghc-8.10.7.20230613-amd64-unknown-openbsd.tar.xz) = /QCac6kB92pFCO9fzn90h/bFJysRl8GUQjOHBVA/5SA= +SHA256 (ghc/ghc-8.10.7.20230613-shlibs-amd64.tar.gz) = LpQDN0fV+YASghLoGTjn0yzEeuYPNW9gtUasieUgu+g= SHA256 (ghc/ghc-9.2.7-src.tar.xz) = olNWehe3NKTA3Q/6KW0zwqW1pUp335iIBqKh4cp+iLg= SHA256 (ghc/ghc-9.2.7-testsuite.tar.xz) = JJSvF12xtiODaWBBo/N+s2VPyN9R8SifTygu6GsJ+1A= -SIZE (ghc/ghc-8.10.7.20230316-amd64-unknown-openbsd.tar.xz) = 48940296 -SIZE (ghc/ghc-8.10.7.20230316-shlibs-amd64.tar.gz) = 2923557 +SIZE (ghc/ghc-8.10.7.20230613-amd64-unknown-openbsd.tar.xz) = 48998912 +SIZE (ghc/ghc-8.10.7.20230613-shlibs-amd64.tar.gz) = 2941676 SIZE (ghc/ghc-9.2.7-src.tar.xz) = 24610432 SIZE (ghc/ghc-9.2.7-testsuite.tar.xz) = 3219572