aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorgerald <gerald@FreeBSD.org>2018-08-05 21:30:30 +0800
committergerald <gerald@FreeBSD.org>2018-08-05 21:30:30 +0800
commitdf7259bc6c224dea9211d05feed21f70414780ca (patch)
tree77195721835319f88871ee9650e1541951627ef5 /Mk
parentc13915f1d1addb818296fa8c45805f1af039659f (diff)
downloadfreebsd-ports-gnome-df7259bc6c224dea9211d05feed21f70414780ca.tar.gz
freebsd-ports-gnome-df7259bc6c224dea9211d05feed21f70414780ca.tar.zst
freebsd-ports-gnome-df7259bc6c224dea9211d05feed21f70414780ca.zip
Filter -mretpoline, which is specific to clang and not supported by
GCC, from CFLAGS and CXXFLAGS. This also establishes a good place where to add any additional such cases in the future. PR: 230200 Submitted by: rozhuk.im@gmail.com
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.gcc.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk
index 92c9655d9e8f..52361fdc82ca 100644
--- a/Mk/bsd.gcc.mk
+++ b/Mk/bsd.gcc.mk
@@ -166,6 +166,10 @@ CPP:= cpp
.endfor
.undef V
+# Now filter unsupported flags for CC and CXX.
+CFLAGS:= ${CFLAGS:N-mretpoline}
+CXXFLAGS:= ${CXXFLAGS:N-mretpoline}
+
.if defined(_GCC_PORT_DEPENDS)
BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT}
RUN_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT}