Honour HAVE_PCC

This commit is contained in:
gmcgarry 2008-08-24 06:27:00 +00:00
parent 1dcc3caa38
commit ce206e318d
4 changed files with 25 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.kmod.mk,v 1.87 2008/03/01 20:29:43 skrll Exp $ # $NetBSD: bsd.kmod.mk,v 1.88 2008/08/24 06:27:00 gmcgarry Exp $
.include <bsd.init.mk> .include <bsd.init.mk>
.include <bsd.klinks.mk> .include <bsd.klinks.mk>
@ -15,7 +15,7 @@ CPPFLAGS+= -isystem ${S}/../common/include
CPPFLAGS+= -D_KERNEL -D_LKM CPPFLAGS+= -D_KERNEL -D_LKM
# XXX until the kernel is fixed again... # XXX until the kernel is fixed again...
.if ${HAVE_GCC} == 4 .if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
CFLAGS+= -fno-strict-aliasing -Wno-pointer-sign CFLAGS+= -fno-strict-aliasing -Wno-pointer-sign
.endif .endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.kmodule.mk,v 1.10 2008/05/31 19:58:35 dyoung Exp $ # $NetBSD: bsd.kmodule.mk,v 1.11 2008/08/24 06:27:00 gmcgarry Exp $
.include <bsd.init.mk> .include <bsd.init.mk>
.include <bsd.klinks.mk> .include <bsd.klinks.mk>
@ -16,7 +16,7 @@ CPPFLAGS+= -isystem ${S}/../common/include
CPPFLAGS+= -D_KERNEL -D_LKM -D_MODULE CPPFLAGS+= -D_KERNEL -D_LKM -D_MODULE
# XXX until the kernel is fixed again... # XXX until the kernel is fixed again...
.if ${HAVE_GCC} == 4 .if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
CFLAGS+= -fno-strict-aliasing -Wno-pointer-sign CFLAGS+= -fno-strict-aliasing -Wno-pointer-sign
.endif .endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.518 2008/08/02 06:59:24 mrg Exp $ # $NetBSD: bsd.own.mk,v 1.519 2008/08/24 06:27:00 gmcgarry Exp $
.if !defined(_BSD_OWN_MK_) .if !defined(_BSD_OWN_MK_)
_BSD_OWN_MK_=1 _BSD_OWN_MK_=1
@ -41,17 +41,21 @@ NEED_OWN_INSTALL_TARGET?= yes
TOOLCHAIN_MISSING?= no TOOLCHAIN_MISSING?= no
# default to GCC4 # default to GCC4
HAVE_GCC?= 4 .if !defined(HAVE_GCC) && !defined(HAVE_PCC)
HAVE_GCC= 4
.endif
# default to GDB6 # default to GDB6
HAVE_GDB?= 6 HAVE_GDB?= 6
CPPFLAG_ISYSTEM= -isystem CPPFLAG_ISYSTEM= -isystem
.if defined(HAVE_GCC)
.if ${HAVE_GCC} == 3 .if ${HAVE_GCC} == 3
CPPFLAG_ISYSTEMXX= -isystem-cxx CPPFLAG_ISYSTEMXX= -isystem-cxx
.else # GCC 4 .else # GCC 4
CPPFLAG_ISYSTEMXX= -cxx-isystem CPPFLAG_ISYSTEMXX= -cxx-isystem
.endif .endif
.endif
.if empty(.MAKEFLAGS:M-V*) .if empty(.MAKEFLAGS:M-V*)
.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
@ -175,13 +179,22 @@ SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
.endif # } .endif # }
.if ${USETOOLS_GCC:Uyes} == "yes" # { .if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes" # {
CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77 FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
.endif # } .endif # }
.if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes"
CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
CPP= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
CXX= false
FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77
OBJC= false
.endif
.endif # EXTERNAL_TOOLCHAIN # } .endif # EXTERNAL_TOOLCHAIN # }
HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
@ -412,7 +425,7 @@ NOPIC= # defined
MKISCSI= no MKISCSI= no
# XXX GCC 4 outputs mcount() calling sequences that try to load values # XXX GCC 4 outputs mcount() calling sequences that try to load values
# from over 64KB away and this fails to assemble. # from over 64KB away and this fails to assemble.
.if ${HAVE_GCC} == 4 .if defined(HAVE_GCC) && (${HAVE_GCC} == 4)
NOPROFILE= # defined NOPROFILE= # defined
.endif .endif
.endif .endif
@ -557,7 +570,8 @@ MK${var}:= yes
MKMAN \ MKMAN \
MKNLS MKNVI \ MKNLS MKNVI \
MKOBJ \ MKOBJ \
MKPAM MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \ MKPAM \
MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
MKSHARE MKSKEY MKSTATICLIB \ MKSHARE MKSKEY MKSTATICLIB \
MKYP MKYP
${var}?= yes ${var}?= yes

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.sys.mk,v 1.165 2008/07/23 23:21:56 christos Exp $ # $NetBSD: bsd.sys.mk,v 1.166 2008/08/24 06:27:00 gmcgarry Exp $
# #
# Build definitions used for NetBSD source tree builds. # Build definitions used for NetBSD source tree builds.
@ -40,7 +40,7 @@ CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \
-Wno-deprecated -Wno-non-template-friend \ -Wno-deprecated -Wno-non-template-friend \
-Woverloaded-virtual -Wno-pmf-conversions -Wsign-promo -Wsynth -Woverloaded-virtual -Wno-pmf-conversions -Wsign-promo -Wsynth
.endif .endif
.if ${WARNS} > 3 && ${HAVE_GCC} >= 3 .if ${WARNS} > 3 && defined(HAVE_GCC) && ${HAVE_GCC} >= 3
CFLAGS+= -std=gnu99 CFLAGS+= -std=gnu99
.endif .endif
.endif .endif