summaryrefslogtreecommitdiff
path: root/mk/platform
diff options
context:
space:
mode:
authorjperkin <jperkin>2015-10-26 09:33:16 +0000
committerjperkin <jperkin>2015-10-26 09:33:16 +0000
commit579a7fe4caa1d57545733bb709efb028ccfd8833 (patch)
tree85a2c5ee6e655e3b16f3109374e351e2a73a3a04 /mk/platform
parente0ea67b464fac14975aa6c099357670e6e6e85d0 (diff)
downloadpkgsrc-579a7fe4caa1d57545733bb709efb028ccfd8833.tar.gz
GCC on SunOS supports a non-standard -mimpure-text argument which clang
does not have, so remove it unconditionally in the latter case. Fixes various packages.
Diffstat (limited to 'mk/platform')
-rw-r--r--mk/platform/SunOS.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/platform/SunOS.mk b/mk/platform/SunOS.mk
index d36174ca386..12ca1aca9bc 100644
--- a/mk/platform/SunOS.mk
+++ b/mk/platform/SunOS.mk
@@ -1,4 +1,4 @@
-# $NetBSD: SunOS.mk,v 1.65 2015/04/17 08:22:30 jperkin Exp $
+# $NetBSD: SunOS.mk,v 1.66 2015/10/26 09:33:16 jperkin Exp $
#
# Variable definitions for the SunOS/Solaris operating system.
@@ -94,6 +94,11 @@ BUILDLINK_TRANSFORM+= rm:-export-dynamic
# Convert GNU ld flags to native SunOS ld flags where possible.
BUILDLINK_TRANSFORM+= opt:-Wl,--rpath:-Wl,-R
+# Remove GCC-specific flags if using clang
+.if ${PKGSRC_COMPILER} == "clang"
+BUILDLINK_TRANSFORM+= rm:-mimpure-text
+.endif
+
# Solaris has /usr/include/iconv.h, but it's not GNU iconv, so mark it
# incompatible.
_INCOMPAT_ICONV= SunOS-*-*