Date: Sat, 11 May 2002 12:35:38 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: "David O'Brien" <obrien@FreeBSD.org>, current@FreeBSD.org Cc: Peter Wemm <peter@FreeBSD.org> Subject: Re: cvs commit: src/gnu/lib/csu Makefile src/gnu/lib/libgcc Makefile src/gnu/lib/libiberty Makefile src/gnu/lib/libobjc Makefile src/gnu/lib/libstdc++ Makefile config.h src/gnu/lib/libsupc++ Makefile src/gnu/usr.bin/cc Makefile Makefile.fe Makefile.inc ... Message-ID: <20020511093538.GB87663@sunbay.com> In-Reply-To: <20020511010027.A84223@dragon.nuxi.com> References: <200205100854.g4A8soc37068@freefall.freebsd.org> <20020510150427.GA14295@sunbay.com> <20020510164153.B1221@dragon.nuxi.com> <20020511074411.GA87663@sunbay.com> <20020511010027.A84223@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Sat, May 11, 2002 at 01:00:27AM -0700, David O'Brien wrote:
> On Sat, May 11, 2002 at 10:44:11AM +0300, Ruslan Ermilov wrote:
> > On Fri, May 10, 2002 at 04:41:53PM -0700, David O'Brien wrote:
> > > On Fri, May 10, 2002 at 06:04:27PM +0300, Ruslan Ermilov wrote:
> > > > > Bmake bits for Gcc 3.1.
> > > >
> > > > This also vanished my YACC building fixes and broke world while
> > > > attempting to build `cc1plus' in a cross-tools stage. The changes
> > > > below fix this and CLEANFILES.
> > >
> > > These changes are wrong.
> > >
> > These changes have been verified to produce the same binaries
> > (except for cc1plus which is just broken without them), and
> > they are equivalent to what was already in -CURRENT before
> > your WIP_GCC31 merge commit.
>
> There is NO way you've bootstrapped GCC 3.1 using these patches.
> Remember a full bootstrap is a `make world ; make buildworld'.
>
> # cc -v
> Using built-in specs.
> Configured with: FreeBSD/i386 system compiler
> Thread model: posix
> gcc version 3.1 20020509 (prerelease)
> # cd /usr/src/gnu/usr.bin/cc
> # make
> ===> cc_fbsd
> ...
> ===> cc_tools
> ...
> ===> cc_int
> ...
> cc -O -pipe -march=k6 -DIN_GCC -DHAVE_CONFIG_H -DPREFIX=\"/usr\"
> -I/usr/obj/usr/src/gnu/usr.bin/for_ru/cc1/../cc_tools
> -I/usr/src/gnu/usr.bin/for_ru/cc1/../cc_tools
> -I/usr/src/gnu/usr.bin/for_ru/cc1/../../../../contrib/gcc
> -I/usr/src/gnu/usr.bin/for_ru/cc1/../../../../contrib/gcc/config -I.
> -c c-parse.c
> c-parse.c:3047:29: attempt to use poisoned "realloc"
> c-parse.c:3048:16: attempt to use poisoned "malloc"
> c-parse.c:3053:31: attempt to use poisoned "realloc"
> c-parse.c:3054:18: attempt to use poisoned "malloc"
> *** Error code 1
>
>
> I say again, the malloc usage is not in c-parse.in, it is in the parser
> driver produced by Byacc.
>
OK, now that you've explained it:
%%%
Index: cc1/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/cc/cc1/Makefile,v
retrieving revision 1.26
diff -u -r1.26 Makefile
--- cc1/Makefile 10 May 2002 08:54:45 -0000 1.26
+++ cc1/Makefile 11 May 2002 09:33:44 -0000
@@ -2,7 +2,7 @@
.include "../Makefile.inc"
-.PATH: ../cc_tools ${GCCDIR}
+.PATH: ${GCCDIR}
PROG= cc1
SRCS= main.c c-parse.c c-lang.c c-decl.c
@@ -17,17 +17,20 @@
#-----------------------------------------------------------------------
# C parser
-.ORDER: c-parse.c
-c-parse.c: c-parse.in
+
+YFLAGS= # don't need y.tab.h
+
+c-parse-in.y: c-parse.in
sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
-e "/^ifc$$/d" \
-e "/^end ifc$$/d" \
- ${GCCDIR}/c-parse.in > c-parse.y
- ${YACC} -o c-parse.c.in c-parse.y
+ ${.ALLSRC} > ${.TARGET}
+
+c-parse.c: c-parse-in.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
- c-parse.c.in >c-parse.c
+ ${.ALLSRC} > ${.TARGET}
-CLEANFILES+= c-parse.c c-parse.y # insurance
+CLEANFILES= c-parse-in.y c-parse-in.c c-parse.c
.include <bsd.prog.mk>
Index: cc1obj/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/cc/cc1obj/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- cc1obj/Makefile 10 May 2002 08:54:46 -0000 1.20
+++ cc1obj/Makefile 11 May 2002 09:33:44 -0000
@@ -2,7 +2,7 @@
.include "../Makefile.inc"
-.PATH: ../cc_tools ${GCCDIR}/objc ${GCCDIR}
+.PATH: ${GCCDIR}/objc ${GCCDIR}
PROG= cc1obj
SRCS= objc-parse.c objc-act.c objc-lang.c main.c c-decl.c
@@ -17,18 +17,21 @@
#-----------------------------------------------------------------------
# objc parser
-.ORDER: objc-parse.c
-objc-parse.c: c-parse.in
+
+YFLAGS= # don't need y.tab.h
+
+objc-parse-in.y: c-parse.in
sed -e "/^ifc$$/,/^end ifc$$/d" \
-e "/^ifobjc$$/d" \
-e "/^end ifobjc$$/d" \
- ${GCCDIR}/c-parse.in > objc-parse.y
- ${YACC} -o objc-parse.c.in objc-parse.y
+ ${.ALLSRC} > ${.TARGET}
+
+objc-parse.c: objc-parse-in.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
- objc-parse.c.in >objc-parse.c
+ ${.ALLSRC} > ${.TARGET}
-CLEANFILES+= objc-parse.c objc-parse.y # insurance
+CLEANFILES= objc-parse-in.y objc-parse-in.c objc-parse.c
#-----------------------------------------------------------------------
Index: cc1plus/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/cc/cc1plus/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- cc1plus/Makefile 10 May 2002 08:54:46 -0000 1.27
+++ cc1plus/Makefile 11 May 2002 09:33:44 -0000
@@ -5,7 +5,7 @@
.PATH: ${GCCDIR}/cp ${GCCDIR}
PROG= cc1plus
-SRCS= parse.y cfns.h
+SRCS= parse.c parse.h cfns.h
SRCS+= main.c cp-lang.c
SRCS+= call.c class.c cvt.c decl.c decl2.c error.c except.c expr.c \
friend.c init.c lex.c mangle.c method.c pt.c ptree.c repo.c rtti.c \
@@ -20,21 +20,24 @@
DPADD+= ${LIBCC_INT}
LDADD+= ${LIBCC_INT}
-CLEANFILES+= parse.c parse.h y.tab.c y.tab.h cfns.h
+parse-in.y: parse.y
+ cp -p ${.ALLSRC} ${.TARGET}
-.ORDER: parse.c parse.h
-parse.c: parse.y
- ${YACC} ${YFLAGS} ${GCCDIR}/cp/${.TARGET:S/c$/y/}
+parse.c: parse-in.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
- y.tab.c >${.TARGET}
+ parse-in.c > ${.TARGET}
+
+y.tab.h: parse-in.c
parse.h: parse.c y.tab.h
- cp -pf y.tab.h ${.TARGET}
- grep '^#define[ ]*YYEMPTY' ${.TARGET:S/h$/c/} >>${.TARGET}
+ cp -p y.tab.h ${.TARGET}
+ grep '^#define[ ]*YYEMPTY' parse.c >>${.TARGET}
-cfns.h:
+cfns.h: cfns.gperf
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \
- ${GCCDIR}/cp/cfns.gperf > ${.TARGET}
+ ${.ALLSRC} > ${.TARGET}
+
+CLEANFILES= parse-in.y parse-in.c parse.c y.tab.h parse.h cfns.h
.include <bsd.prog.mk>
Index: cpp0/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/cc/cpp0/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- cpp0/Makefile 10 May 2002 08:54:47 -0000 1.3
+++ cpp0/Makefile 11 May 2002 09:33:44 -0000
@@ -16,18 +16,21 @@
#-----------------------------------------------------------------------
# C parser
-.ORDER: c-parse.c
-c-parse.c: c-parse.in
+
+YFLAGS= # don't need y.tab.h
+
+c-parse-in.y: c-parse.in
sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
-e "/^ifc$$/d" \
-e "/^end ifc$$/d" \
- ${GCCDIR}/c-parse.in > c-parse.y
- ${YACC} -o c-parse.c.in c-parse.y
+ ${.ALLSRC} > ${.TARGET}
+
+c-parse.c: c-parse-in.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
- c-parse.c.in >c-parse.c
+ ${.ALLSRC} > ${.TARGET}
-CLEANFILES+= c-parse.c c-parse.y # insurance
+CLEANFILES= c-parse-in.y c-parse-in.c c-parse.c
#-----------------------------------------------------------------------
Index: tradcpp0/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/cc/tradcpp0/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- tradcpp0/Makefile 11 May 2002 00:15:45 -0000 1.4
+++ tradcpp0/Makefile 11 May 2002 09:33:44 -0000
@@ -12,11 +12,16 @@
DPADD+= ${LIBCC_INT}
LDADD+= ${LIBCC_INT}
-# ${YACC} ${GCCDIR}/tradcif.y
-tradcif.c: tradcif.y
- ${YACC} ${.ALLSRC}
+YFLAGS= # don't need y.tab.h
+
+tradcif-in.y: tradcif.y
+ cp -p ${.ALLSRC} ${.TARGET}
+
+tradcif.c: tradcif-in.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
- y.tab.c >${.TARGET}
+ tradcif-in.c > ${.TARGET}
+
+CLEANFILES= tradcif-in.y tradcif-in.c tradcif.c
.include <bsd.prog.mk>
%%%
--
Ruslan Ermilov Sysadmin and DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQE83OXqUkv4P6juNwoRAmBPAJsFfe02ToFYiPQZZ0tCED+nzgykEgCeJhwX
QCkIMIWaRUy9RuqXExwtFZU=
=8QYI
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020511093538.GB87663>
