make PCC_DEBUG a global flag (will not compile without, currently)diff -r1.13 -r1.14 src/external/bsd/pcc/Makefile.inc
(plunky)
--- 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 | |||
3 | PCC_DIR:=${.PARSEDIR} | 3 | PCC_DIR:=${.PARSEDIR} | |
4 | PCC_DIST=${PCC_DIR}/dist/pcc | 4 | PCC_DIST=${PCC_DIR}/dist/pcc | |
5 | PCC_LIBS=${PCC_DIR}/dist/pcc-libs | 5 | PCC_LIBS=${PCC_DIR}/dist/pcc-libs | |
6 | 6 | |||
7 | TARGOS = netbsd | 7 | TARGOS = netbsd | |
8 | 8 | |||
9 | .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" | 9 | .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" | |
10 | TARGMACH = mips | 10 | TARGMACH = mips | |
11 | .elif ${MACHINE_ARCH} == "x86_64" | 11 | .elif ${MACHINE_ARCH} == "x86_64" | |
12 | TARGMACH = amd64 | 12 | TARGMACH = amd64 | |
13 | .else | 13 | .else | |
14 | TARGMACH = ${MACHINE_ARCH} | 14 | TARGMACH = ${MACHINE_ARCH} | |
15 | .endif | 15 | .endif | |
16 | 16 | |||
17 | .if !exists(${PCC_DIST}/arch/${TARGMACH}) | 17 | .if !exists(${PCC_DIST}/arch/${TARGMACH}) | |
18 | ERROR!= echo "ERROR: ${TARGMACH} not yet supported - write code!" >&2;echo | 18 | ERROR!= 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 | |
22 | VERSSTR = PACKAGE_STRING " for ${TARGOS}-${TARGMACH}" | 22 | VERSSTR = PACKAGE_STRING " for ${TARGOS}-${TARGMACH}" | |
23 | 23 | |||
24 | CPPFLAGS+= -DGCC_COMPAT | 24 | CPPFLAGS+= -DGCC_COMPAT | |
25 | CPPFLAGS+= -DPCC_DEBUG | |||
25 | CPPFLAGS+= -DVERSSTR=${VERSSTR:Q} | 26 | CPPFLAGS+= -DVERSSTR=${VERSSTR:Q} | |
26 | CPPFLAGS+= -Dos_${TARGOS} | 27 | CPPFLAGS+= -Dos_${TARGOS} | |
27 | CPPFLAGS+= -Dmach_${TARGMACH} | 28 | CPPFLAGS+= -Dmach_${TARGMACH} | |
28 | CPPFLAGS+= -I${PCC_DIR}/include | 29 | CPPFLAGS+= -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" | |
36 | CPPFLAGS+= -DHOST_LITTLE_ENDIAN | 37 | CPPFLAGS+= -DHOST_LITTLE_ENDIAN | |
37 | CPPFLAGS+= -DTARGET_LITTLE_ENDIAN | 38 | CPPFLAGS+= -DTARGET_LITTLE_ENDIAN |
--- 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 | |||
3 | WARNS?= 2 | 3 | WARNS?= 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 | |||
11 | PROG= ccom | 11 | PROG= ccom | |
12 | 12 | |||
13 | SRCS= cgram.y | 13 | SRCS= cgram.y | |
14 | SRCS+= scan.l | 14 | SRCS+= scan.l | |
15 | SRCS+= optim.c pftn.c trees.c inline.c symtabs.c | 15 | SRCS+= optim.c pftn.c trees.c inline.c symtabs.c | |
16 | SRCS+= gcc_compat.c init.c local.c code.c stabs.c builtins.c | 16 | SRCS+= gcc_compat.c init.c local.c code.c stabs.c builtins.c | |
17 | SRCS+= match.c reader.c optim2.c regs.c local2.c order.c table.c | 17 | SRCS+= match.c reader.c optim2.c regs.c local2.c order.c table.c | |
18 | SRCS+= common.c main.c external.c | 18 | SRCS+= common.c main.c external.c | |
19 | 19 | |||
20 | MAN= ccom.1 | 20 | MAN= ccom.1 | |
21 | 21 | |||
22 | # generate cgram.h | 22 | # generate cgram.h | |
23 | YHEADER= | 23 | YHEADER= | |
24 | 24 | |||
25 | CPPFLAGS+= -DPCC_DEBUG | |||
26 | CPPFLAGS+= -I${.OBJDIR} | 25 | CPPFLAGS+= -I${.OBJDIR} | |
27 | CPPFLAGS+= -I${PCC_DIST}/mip | 26 | CPPFLAGS+= -I${PCC_DIST}/mip | |
28 | CPPFLAGS+= -I${PCC_DIST}/os/${TARGOS} | 27 | CPPFLAGS+= -I${PCC_DIST}/os/${TARGOS} | |
29 | CPPFLAGS+= -I${PCC_DIST}/arch/${TARGMACH} | 28 | CPPFLAGS+= -I${PCC_DIST}/arch/${TARGMACH} | |
30 | CPPFLAGS+= -I${PCC_DIST}/cc/ccom | 29 | CPPFLAGS+= -I${PCC_DIST}/cc/ccom | |
31 | 30 | |||
32 | DPSRCS= external.c | 31 | DPSRCS= external.c | |
33 | 32 | |||
34 | MKEXTDIR!= cd ../mkext && ${PRINTOBJDIR} | 33 | MKEXTDIR!= cd ../mkext && ${PRINTOBJDIR} | |
35 | 34 | |||
36 | external.c: ${MKEXTDIR}/mkext | 35 | external.c: ${MKEXTDIR}/mkext | |
37 | ${_MKTARGET_CREATE} | 36 | ${_MKTARGET_CREATE} | |
38 | ${MKEXTDIR}/mkext | 37 | ${MKEXTDIR}/mkext |
--- 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 | |||
12 | PROG= pcpp | 12 | PROG= pcpp | |
13 | 13 | |||
14 | SRCS= cpy.y | 14 | SRCS= cpy.y | |
15 | SRCS+= cpp.c token.c | 15 | SRCS+= cpp.c token.c | |
16 | 16 | |||
17 | MAN= pcpp.1 | 17 | MAN= pcpp.1 | |
18 | 18 | |||
19 | pcpp.1: cpp.1 | 19 | pcpp.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 | |||
24 | CPPFLAGS+= -DCPP_DEBUG | |||
25 | CPPFLAGS+= -I${.OBJDIR} | 24 | CPPFLAGS+= -I${.OBJDIR} | |
26 | CPPFLAGS+= -I${PCC_DIST}/mip | 25 | CPPFLAGS+= -I${PCC_DIST}/mip | |
27 | CPPFLAGS+= -I${PCC_DIST}/cc/cpp | 26 | CPPFLAGS+= -I${PCC_DIST}/cc/cpp | |
28 | 27 | |||
29 | # generate cpy.h | 28 | # generate cpy.h | |
30 | YHEADER= | 29 | YHEADER= | |
31 | 30 | |||
32 | # some files include y.tab.h instead | 31 | # some files include y.tab.h instead | |
33 | DPSRCS= y.tab.h | 32 | DPSRCS= y.tab.h | |
34 | 33 | |||
35 | y.tab.h: cpy.h | 34 | y.tab.h: cpy.h | |
36 | ${HOST_LN} -f ${.ALLSRC} ${.TARGET} | 35 | ${HOST_LN} -f ${.ALLSRC} ${.TARGET} | |
37 | 36 |