Tue Jun 7 13:30:35 2011 UTC ()
make PCC_DEBUG a global flag (will not compile without, currently)


(plunky)
diff -r1.13 -r1.14 src/external/bsd/pcc/Makefile.inc
diff -r1.8 -r1.9 src/external/bsd/pcc/libexec/ccom/Makefile
diff -r1.8 -r1.9 src/external/bsd/pcc/libexec/cpp/Makefile

cvs diff -r1.13 -r1.14 src/external/bsd/pcc/Makefile.inc (expand / switch to unified diff)

--- src/external/bsd/pcc/Makefile.inc 2011/06/07 13:07:26 1.13
+++ src/external/bsd/pcc/Makefile.inc 2011/06/07 13:30:35 1.14
@@ -1,37 +1,38 @@ @@ -1,37 +1,38 @@
1# $NetBSD: Makefile.inc,v 1.13 2011/06/07 13:07:26 plunky Exp $ 1# $NetBSD: Makefile.inc,v 1.14 2011/06/07 13:30:35 plunky Exp $
2 2
3PCC_DIR:=${.PARSEDIR} 3PCC_DIR:=${.PARSEDIR}
4PCC_DIST=${PCC_DIR}/dist/pcc 4PCC_DIST=${PCC_DIR}/dist/pcc
5PCC_LIBS=${PCC_DIR}/dist/pcc-libs 5PCC_LIBS=${PCC_DIR}/dist/pcc-libs
6 6
7TARGOS = netbsd 7TARGOS = netbsd
8 8
9.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" 9.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
10TARGMACH = mips 10TARGMACH = mips
11.elif ${MACHINE_ARCH} == "x86_64" 11.elif ${MACHINE_ARCH} == "x86_64"
12TARGMACH = amd64 12TARGMACH = amd64
13.else 13.else
14TARGMACH = ${MACHINE_ARCH} 14TARGMACH = ${MACHINE_ARCH}
15.endif 15.endif
16 16
17.if !exists(${PCC_DIST}/arch/${TARGMACH}) 17.if !exists(${PCC_DIST}/arch/${TARGMACH})
18ERROR!= echo "ERROR: ${TARGMACH} not yet supported - write code!" >&2;echo 18ERROR!= echo "ERROR: ${TARGMACH} not yet supported - write code!" >&2;echo
19.endif 19.endif
20 20
21# this string will be updated by the prepare-import.sh script 21# this string will be updated by the prepare-import.sh script
22VERSSTR = PACKAGE_STRING " for ${TARGOS}-${TARGMACH}" 22VERSSTR = PACKAGE_STRING " for ${TARGOS}-${TARGMACH}"
23 23
24CPPFLAGS+= -DGCC_COMPAT 24CPPFLAGS+= -DGCC_COMPAT
 25CPPFLAGS+= -DPCC_DEBUG
25CPPFLAGS+= -DVERSSTR=${VERSSTR:Q} 26CPPFLAGS+= -DVERSSTR=${VERSSTR:Q}
26CPPFLAGS+= -Dos_${TARGOS} 27CPPFLAGS+= -Dos_${TARGOS}
27CPPFLAGS+= -Dmach_${TARGMACH} 28CPPFLAGS+= -Dmach_${TARGMACH}
28CPPFLAGS+= -I${PCC_DIR}/include 29CPPFLAGS+= -I${PCC_DIR}/include
29 30
30.include <bsd.endian.mk> 31.include <bsd.endian.mk>
31 32
32# We only build binaries from here where the pcc host and target architectures 33# We only build binaries from here where the pcc host and target architectures
33# will be the same. For a cross-compiler, use the tools/pcc build. 34# will be the same. For a cross-compiler, use the tools/pcc build.
34# 35#
35.if ${TARGET_ENDIANNESS} == "1234" 36.if ${TARGET_ENDIANNESS} == "1234"
36CPPFLAGS+= -DHOST_LITTLE_ENDIAN 37CPPFLAGS+= -DHOST_LITTLE_ENDIAN
37CPPFLAGS+= -DTARGET_LITTLE_ENDIAN 38CPPFLAGS+= -DTARGET_LITTLE_ENDIAN

cvs diff -r1.8 -r1.9 src/external/bsd/pcc/libexec/ccom/Makefile (expand / switch to unified diff)

--- src/external/bsd/pcc/libexec/ccom/Makefile 2011/05/22 11:53:46 1.8
+++ src/external/bsd/pcc/libexec/ccom/Makefile 2011/06/07 13:30:35 1.9
@@ -1,38 +1,37 @@ @@ -1,38 +1,37 @@
1# $NetBSD: Makefile,v 1.8 2011/05/22 11:53:46 plunky Exp $ 1# $NetBSD: Makefile,v 1.9 2011/06/07 13:30:35 plunky Exp $
2 2
3WARNS?= 2 3WARNS?= 2
4 4
5.include <bsd.init.mk> 5.include <bsd.init.mk>
6 6
7.PATH: ${PCC_DIST}/cc/ccom \ 7.PATH: ${PCC_DIST}/cc/ccom \
8 ${PCC_DIST}/arch/${TARGMACH} \ 8 ${PCC_DIST}/arch/${TARGMACH} \
9 ${PCC_DIST}/mip 9 ${PCC_DIST}/mip
10 10
11PROG= ccom 11PROG= ccom
12 12
13SRCS= cgram.y 13SRCS= cgram.y
14SRCS+= scan.l 14SRCS+= scan.l
15SRCS+= optim.c pftn.c trees.c inline.c symtabs.c 15SRCS+= optim.c pftn.c trees.c inline.c symtabs.c
16SRCS+= gcc_compat.c init.c local.c code.c stabs.c builtins.c 16SRCS+= gcc_compat.c init.c local.c code.c stabs.c builtins.c
17SRCS+= match.c reader.c optim2.c regs.c local2.c order.c table.c 17SRCS+= match.c reader.c optim2.c regs.c local2.c order.c table.c
18SRCS+= common.c main.c external.c 18SRCS+= common.c main.c external.c
19 19
20MAN= ccom.1 20MAN= ccom.1
21 21
22# generate cgram.h 22# generate cgram.h
23YHEADER= 23YHEADER=
24 24
25CPPFLAGS+= -DPCC_DEBUG 
26CPPFLAGS+= -I${.OBJDIR} 25CPPFLAGS+= -I${.OBJDIR}
27CPPFLAGS+= -I${PCC_DIST}/mip 26CPPFLAGS+= -I${PCC_DIST}/mip
28CPPFLAGS+= -I${PCC_DIST}/os/${TARGOS} 27CPPFLAGS+= -I${PCC_DIST}/os/${TARGOS}
29CPPFLAGS+= -I${PCC_DIST}/arch/${TARGMACH} 28CPPFLAGS+= -I${PCC_DIST}/arch/${TARGMACH}
30CPPFLAGS+= -I${PCC_DIST}/cc/ccom 29CPPFLAGS+= -I${PCC_DIST}/cc/ccom
31 30
32DPSRCS= external.c 31DPSRCS= external.c
33 32
34MKEXTDIR!= cd ../mkext && ${PRINTOBJDIR} 33MKEXTDIR!= cd ../mkext && ${PRINTOBJDIR}
35 34
36external.c: ${MKEXTDIR}/mkext 35external.c: ${MKEXTDIR}/mkext
37 ${_MKTARGET_CREATE} 36 ${_MKTARGET_CREATE}
38 ${MKEXTDIR}/mkext 37 ${MKEXTDIR}/mkext

cvs diff -r1.8 -r1.9 src/external/bsd/pcc/libexec/cpp/Makefile (expand / switch to unified diff)

--- src/external/bsd/pcc/libexec/cpp/Makefile 2010/06/03 19:17:22 1.8
+++ src/external/bsd/pcc/libexec/cpp/Makefile 2011/06/07 13:30:35 1.9
@@ -1,37 +1,36 @@ @@ -1,37 +1,36 @@
1# $NetBSD: Makefile,v 1.8 2010/06/03 19:17:22 plunky Exp $ 1# $NetBSD: Makefile,v 1.9 2011/06/07 13:30:35 plunky Exp $
2 2
3.include <bsd.init.mk> 3.include <bsd.init.mk>
4 4
5.PATH: ${PCC_DIST}/cc/cpp \ 5.PATH: ${PCC_DIST}/cc/cpp \
6 ${PCC_DIST}/mip 6 ${PCC_DIST}/mip
7 7
8# 8#
9# We build cpp(1) as pcpp(1) to avoid confusion with GCC 9# We build cpp(1) as pcpp(1) to avoid confusion with GCC
10# 10#
11 11
12PROG= pcpp 12PROG= pcpp
13 13
14SRCS= cpy.y 14SRCS= cpy.y
15SRCS+= cpp.c token.c 15SRCS+= cpp.c token.c
16 16
17MAN= pcpp.1 17MAN= pcpp.1
18 18
19pcpp.1: cpp.1 19pcpp.1: cpp.1
20 ${TOOL_SED} -e "s,Nm cpp,Nm pcpp," \ 20 ${TOOL_SED} -e "s,Nm cpp,Nm pcpp," \
21 -e "s,Dt CPP,Dt PCPP," \ 21 -e "s,Dt CPP,Dt PCPP," \
22 ${.ALLSRC} > ${.TARGET} 22 ${.ALLSRC} > ${.TARGET}
23 23
24CPPFLAGS+= -DCPP_DEBUG 
25CPPFLAGS+= -I${.OBJDIR} 24CPPFLAGS+= -I${.OBJDIR}
26CPPFLAGS+= -I${PCC_DIST}/mip 25CPPFLAGS+= -I${PCC_DIST}/mip
27CPPFLAGS+= -I${PCC_DIST}/cc/cpp 26CPPFLAGS+= -I${PCC_DIST}/cc/cpp
28 27
29# generate cpy.h 28# generate cpy.h
30YHEADER= 29YHEADER=
31 30
32# some files include y.tab.h instead 31# some files include y.tab.h instead
33DPSRCS= y.tab.h 32DPSRCS= y.tab.h
34 33
35y.tab.h: cpy.h 34y.tab.h: cpy.h
36 ${HOST_LN} -f ${.ALLSRC} ${.TARGET} 35 ${HOST_LN} -f ${.ALLSRC} ${.TARGET}
37 36