summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordanw <danw@pkgsrc.org>2004-05-04 00:11:23 +0000
committerdanw <danw@pkgsrc.org>2004-05-04 00:11:23 +0000
commitb0b5bb60b266922f716552dd4bc7cd2f757c8bd9 (patch)
tree6da32a864ae8ae41f5329b6933430e0a5d14d8cf /mk
parent11e811a2fce15a8d5f1c6976babbeebdb8280e92 (diff)
downloadpkgsrc-b0b5bb60b266922f716552dd4bc7cd2f757c8bd9.tar.gz
/usr/bin/cpp on darwin is a wrapper script that forces the
-traditional flag; you need to use "gcc -E" to get sane behavior. Override sys.mk's definition of CPP in defs.Darwin.mk, and don't re-override CPP in gcc.mk if ${OPSYS} == Darwin.
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler/gcc.mk6
-rw-r--r--mk/defs.Darwin.mk5
2 files changed, 7 insertions, 4 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 54b8afd1281..a84c2b7ab39 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.62 2004/03/30 21:39:24 jlam Exp $
+# $NetBSD: gcc.mk,v 1.63 2004/05/04 00:11:23 danw Exp $
.if !defined(COMPILER_GCC_MK)
COMPILER_GCC_MK= defined
@@ -295,7 +295,7 @@ _GCC_LINKS+= _GCC_CC
PKG_CC= ${_GCC_CC}
CC= ${PKG_CC:T}
.endif
-.if exists(${_GCCBINDIR}/cpp)
+.if exists(${_GCCBINDIR}/cpp) && ${OPSYS} != "Darwin"
_GCC_CPP= ${_GCC_DIR}/bin/cpp
_GCC_LINKS+= _GCC_CPP
PKG_CPP= ${_GCC_CPP}
@@ -332,7 +332,7 @@ CC_VERSION!= \
else \
${ECHO} "gcc-${_GCC_REQD}"; \
fi
-
+
. else
CC_VERSION_STRING= ${CC_VERSION}
CC_VERSION= gcc-${_GCC_REQD}
diff --git a/mk/defs.Darwin.mk b/mk/defs.Darwin.mk
index 8b660d7be2a..ddfa32af6c2 100644
--- a/mk/defs.Darwin.mk
+++ b/mk/defs.Darwin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Darwin.mk,v 1.72 2004/04/27 13:43:05 tv Exp $
+# $NetBSD: defs.Darwin.mk,v 1.73 2004/05/04 00:11:23 danw Exp $
#
# Variable definitions for the Darwin operating system.
@@ -10,6 +10,9 @@ CHOWN?= /usr/sbin/chown
CHGRP?= /usr/bin/chgrp
CMP?= /usr/bin/cmp
CP?= /bin/cp
+.if !defined(CPP) || ${CPP} == "cpp"
+CPP= ${CC} -E ${CPP_PRECOMP_FLAGS}
+.endif
CUT?= /usr/bin/cut
DATE?= /bin/date
DC?= /usr/bin/dc