summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorgrant <grant>2005-02-16 10:48:40 +0000
committergrant <grant>2005-02-16 10:48:40 +0000
commitc3774a573a758eb76fcd60f50bcd5d17b26ba12b (patch)
treea912ca674f3f6f41a41527b4b8b59e822798b88a /mk/compiler
parentfa3eed4e515e25c8ae062cf731b53aa1966029ac (diff)
downloadpkgsrc-c3774a573a758eb76fcd60f50bcd5d17b26ba12b.tar.gz
override the GNU configure test for __attribute__. the test commonly
uses a nested function, which icc does not support.
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/icc.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/mk/compiler/icc.mk b/mk/compiler/icc.mk
index 75a04b6ac17..19f0a703f3f 100644
--- a/mk/compiler/icc.mk
+++ b/mk/compiler/icc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: icc.mk,v 1.1 2005/02/15 07:43:43 grant Exp $
+# $NetBSD: icc.mk,v 1.2 2005/02/16 10:48:40 grant Exp $
.if !defined(COMPILER_ICC_MK)
COMPILER_ICC_MK= defined
@@ -58,6 +58,15 @@ _LANGUAGES.icc+= ${LANGUAGES.icc:M${_lang_}}
PREPEND_PATH+= ${_ICC_DIR}/bin
.endif
+# icc supports __attribute__, but the GNU configure test uses a nested
+# function, which icc does not support. #undef'ing __attribute__ has the
+# unfortunate side-effect of breaking many of the Linux header files, which
+# cannot be compiled properly without __attribute__. The test must be
+# overridden so that __attribute__ is assumed supported by the compiler.
+.if defined(GNU_CONFIGURE)
+CONFIGURE_ENV+= ac_cv___attribute__=yes
+.endif
+
# Create compiler driver scripts in ${WRKDIR}.
.for _var_ in ${_ICC_VARS}
. if !target(${_ICC_${_var_}})