Module Name:    src
Committed By:   bad
Date:           Sat Sep 28 21:18:55 UTC 2024

Modified Files:
        src/tools/gmp: Makefile

Log Message:
configure tools/gmp with --disable-assembly on x86_64 macOS 14.

works around the assembler routines being compile with 8 byte alignment
when 16 byte alignment is required.

patch by mrg@ who asked me to commit after testing.

addresses PR toolchain/58707.

pullup netbsd-10.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tools/gmp/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/gmp/Makefile
diff -u src/tools/gmp/Makefile:1.5 src/tools/gmp/Makefile:1.6
--- src/tools/gmp/Makefile:1.5	Sat Sep 18 01:47:10 2021
+++ src/tools/gmp/Makefile	Sat Sep 28 21:18:55 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2021/09/18 01:47:10 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2024/09/28 21:18:55 bad Exp $
 #
 
 GNUHOSTDIST=   ${.CURDIR}/../../external/lgpl3/gmp/dist
@@ -9,6 +9,16 @@ CPPFLAGS+=	${HOST_CPPFLAGS}
 
 .include "${.CURDIR}/../Makefile.gnuhost"
 
+# GMP uses 8-byte alignment for 16-byte align-requiring things that break
+# the build on modern macOS targets, turn off assembly on x86-64 for now.
+# https://trac.macports.org/ticket/70859
+.if ${BUILD_OSTYPE} == "Darwin"
+BUILD_MACHINE!=	uname -m
+. if ${BUILD_MACHINE} == "x86_64"
+CONFIGURE_ARGS+=	--disable-assembly
+. endif
+.endif
+
 # Don't override CFLAGS and CXXFLAGS, it breaks ABI detection.
 # PATH needs special treating since "make" tries to expand $PATH
 # when variable is used.

Reply via email to