aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2023-04-17 21:51:52 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-04-18 21:55:30 +0000
commitd422cb7e4a2a459719a4c4e1b28c0ee4416e4765 (patch)
tree6c357c6541989ccf010688a103f39c6d03a106dd
parentbba4910f8cf9cb77e587343c7fc81c5341ae52f9 (diff)
downloadports-d422cb7e4a2a459719a4c4e1b28c0ee4416e4765.tar.gz
ports-d422cb7e4a2a459719a4c4e1b28c0ee4416e4765.zip
math/symfpu: fix build on non-x86
Only supply x86-specific CXXFLAGS on i386 and amd64. Approved by: portmgr (build fix blanket)
-rw-r--r--math/symfpu/Makefile9
-rw-r--r--math/symfpu/files/patch-flags5
2 files changed, 11 insertions, 3 deletions
diff --git a/math/symfpu/Makefile b/math/symfpu/Makefile
index c3a04d80a98f..0823dff67a16 100644
--- a/math/symfpu/Makefile
+++ b/math/symfpu/Makefile
@@ -15,12 +15,15 @@ USE_GITHUB= yes
GH_ACCOUNT= martin-cs
GH_TAGNAME= c3acaf6
-CXXFLAGS+= -I${WRKSRC}
-
ALL_TARGET= subdirs symfpu.a
-
MAKE_ARGS= SUBDIRS=baseTypes
+# these flags are x86-only and have been patched out
+# of ${WRKSRC}/flags for portability
+CXXFLAGS_amd64= -msse -mfma -mno-fma4 -mfpmath=sse
+CXXFLAGS_i386= ${CXXFLAGS_amd64}
+CXXFLAGS+= ${CXXFLAGS_${ARCH}} -I${WRKSRC}
+
do-install:
${MKDIR} \
${STAGEDIR}${PREFIX}/include/symfpu/core \
diff --git a/math/symfpu/files/patch-flags b/math/symfpu/files/patch-flags
new file mode 100644
index 000000000000..404a3e9f2053
--- /dev/null
+++ b/math/symfpu/files/patch-flags
@@ -0,0 +1,5 @@
+--- flags.orig 2023-04-17 21:44:48 UTC
++++ flags
+@@ -1 +1 @@
+-CXXFLAGS+=-std=gnu++11 -Wall -W -frounding-math -fsignaling-nans -ffp-contract=off -msse2 -mfpmath=sse -pedantic -mfma -mno-fma4
++CXXFLAGS+=-std=gnu++11 -Wall -W -frounding-math -fsignaling-nans -ffp-contract=off -pedantic