From a46ef4e6abbded32bdf1e0c83b227011fee7483b Mon Sep 17 00:00:00 2001 From: thorpej Date: Tue, 4 Jun 2002 21:14:59 +0000 Subject: [PATCH] Don't use -traditional-cpp if HAVE_GCC3. --- share/mk/bsd.dep.mk | 11 ++++++++--- share/mk/sys.mk | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 2c3e45d3ccb5..85e02c7eae43 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dep.mk,v 1.34 2001/11/28 04:38:29 tv Exp $ +# $NetBSD: bsd.dep.mk,v 1.35 2002/06/04 21:22:54 thorpej Exp $ ##### Basic targets .PHONY: cleandepend @@ -15,16 +15,21 @@ MKDEP?= mkdep # some of the rules involve .h sources, so remove them from mkdep line .if defined(SRCS) +.if defined(HAVE_GCC3) +__acpp_flags= +.else +__acpp_flags= -traditional-cpp +.endif .NOPATH: .depend .depend: ${SRCS} ${DPSRCS} @rm -f .depend @files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \ if [ "$$files" != " " ]; then \ echo ${MKDEP} -a ${MKDEPFLAGS} \ - ${AFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} -traditional-cpp ${AINC:Q} \ + ${AFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} ${__acpp_flags} ${AINC:Q} \ $$files; \ ${MKDEP} -a ${MKDEPFLAGS} \ - ${AFLAGS:M-[ID]*} ${CPPFLAGS} -traditional-cpp ${AINC} $$files; \ + ${AFLAGS:M-[ID]*} ${CPPFLAGS} ${__acpp_flags} ${AINC} $$files; \ fi @files="${.ALLSRC:M*.c}"; \ if [ "$$files" != "" ]; then \ diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 1f6060936198..e782441c4446 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,4 +1,4 @@ -# $NetBSD: sys.mk,v 1.67 2002/06/04 21:13:21 thorpej Exp $ +# $NetBSD: sys.mk,v 1.68 2002/06/04 21:14:59 thorpej Exp $ # @(#)sys.mk 8.2 (Berkeley) 3/21/94 unix?= We run NetBSD. @@ -16,7 +16,11 @@ AS?= as AFLAGS?= COMPILE.s?= ${CC} ${AFLAGS} -c LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} +.if defined(HAVE_GCC3) +COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c +.else COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp +.endif LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} CC?= cc