Date: Fri, 21 Sep 2001 19:07:10 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Warner Losh <imp@FreeBSD.org>, Peter Wemm <peter@FreeBSD.org>, "David O'Brien" <obrien@FreeBSD.org>, Bruce Evans <bde@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: [FIX] stdio breakage Message-ID: <20010921190710.A87085@sunbay.com> In-Reply-To: <20010921145403.D52510@sunbay.com>; from ru@FreeBSD.org on Fri, Sep 21, 2001 at 02:54:03PM %2B0300 References: <200109210508.f8L580G85009@freefall.freebsd.org> <20010921145403.D52510@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Oh, I should have looked at the original report more closely. I have installed the 4.2-RELEASE box, and am trying to build the -CURRENT world on it now. The same problem even without -DNOCLEAN. The actual problem turned out to be in the gnu/usr.bin/binutils/ld/Makefile. : revision 1.14 : date: 2001/05/03 21:37:06; author: obrien; state: Exp; lines: +2 -1 : Total hack to fix broken bootstrap. Add -I/usr/src/include at the tail : end of the include searching. We really need a real fix for the issue of : which set of headers to use in compiling the cross-tools -- /usr/include, : or /usr/src/include. The following offending line has been added: Index: Makefile =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/binutils/ld/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -u -kk -r1.13 -r1.14 --- Makefile 2001/02/28 10:46:48 1.13 +++ Makefile 2001/05/03 21:37:06 1.14 @@ -11,6 +11,7 @@ ldver.c ldwrite.c lexsup.c mri.c CFLAGS+= -DSCRIPTDIR=\"${DESTDIR}/usr/libdata\" CFLAGS+= -I${SRCDIR}/ld +CFLAGS+= -I${.CURDIR}/../../../../include CFLAGS+= -DVERSION=\"${VERSION}\" -DBFD_VERSION=\"${VERSION}\" NOSHARED?= yes DPADD= ${RELTOP}/libbfd/libbfd.a Well, the commit is not very informative of what specifically was broken, nor did it mark it with XXX. Trial and error showed that this was used to get the elf-hints.h header. The solution I have found working is: Index: Makefile =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/binutils/ld/Makefile,v retrieving revision 1.15 diff -u -r1.15 Makefile --- Makefile 2001/06/01 05:30:29 1.15 +++ Makefile 2001/09/21 15:07:50 @@ -11,7 +11,12 @@ ldver.c ldwrite.c lexsup.c mri.c CFLAGS+= -DSCRIPTDIR=\"${DESTDIR}/usr/libdata\" CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd -CFLAGS+= -I${.CURDIR}/../../../../include + +# XXX Hack to get elf-hints.h +.if defined(BOOTSTRAPPING) +CFLAGS+= -I/usr/include -I${.CURDIR}/../../../../include +.endif + CFLAGS+= -DVERSION=\"${VERSION}\" -DBFD_VERSION=\"${VERSION}\" NOSHARED?= yes DPADD= ${RELTOP}/libbfd/libbfd.a But this is still hackish. Please follow that. elf-hints.h is used by the following modules: lib/libc gnu/usr.bin/binutils/ld libexec/rtld-elf sbin/ldconfig Since we only bootstrap binutils/ld, and the only missing thing is the elf-hints.h (currently), the following works as well: Index: Makefile =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/binutils/ld/Makefile,v retrieving revision 1.15 diff -u -r1.15 Makefile --- Makefile 2001/06/01 05:30:29 1.15 +++ Makefile 2001/09/21 16:04:19 @@ -9,9 +9,16 @@ SRCS+= ldcref.c ldctor.c ldemul.c ldemul-list.h ldexp.c ldfile.c \ ldgram.y ldlang.c ldlex.l ldmain.c ldmisc.c \ ldver.c ldwrite.c lexsup.c mri.c + +.if defined(BOOTSTRAPPING) +SRCS+= elf-hints.h +CLEANFILES+= elf-hints.h +elf-hints.h: + ln -sf ${.CURDIR}/../../../../include/${.TARGET} . +.endif + CFLAGS+= -DSCRIPTDIR=\"${DESTDIR}/usr/libdata\" CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd -CFLAGS+= -I${.CURDIR}/../../../../include CFLAGS+= -DVERSION=\"${VERSION}\" -DBFD_VERSION=\"${VERSION}\" NOSHARED?= yes DPADD= ${RELTOP}/libbfd/libbfd.a On Fri, Sep 21, 2001 at 02:54:03PM +0300, Ruslan Ermilov wrote: > On Thu, Sep 20, 2001 at 10:08:00PM -0700, Warner Losh wrote: > > imp 2001/09/20 22:08:00 PDT > > > > Modified files: > > . UPDATING > > Log: > > Note world breakage and give workaround > > > > Revision Changes Path > > 1.170 +28 -1 src/UPDATING > > > Warner, please apply the following (or similar) patch. > Also attached is the log of the commit where it was fixed. > > Index: UPDATING > =================================================================== > RCS file: /home/ncvs/src/UPDATING,v > retrieving revision 1.170 > diff -u -r1.170 UPDATING > --- UPDATING 2001/09/21 05:08:00 1.170 > +++ UPDATING 2001/09/21 11:55:16 > @@ -5,16 +5,10 @@ > of file for further details. For commonly done items, please see the > COMMON ITEMS: section later in the file. > > -20010919: > - There's a bug in the world build process. The cross-tools > - are build with the NEW headers, but the OLD libc.a. This > - leads to all kinds of problems with the new libc. A temporary > - workaround is to do addn > - CFLAGS="-O -pipe -D_OLD_STDIO" > - before building world when upgrading from 4.x to current. This > - can be removed afterwards. > - > - A proper fix to the buildworld target is needed. > +20010921: > + A bug in the world build process was fixed. The cross-tools > + may have been built with the NEW headers, but the OLD libc.a. > + This could only happen if the world was run with -DNOCLEAN. > > 20010918: > Peter has committed his new kthread nfs client/server code. -- Ruslan Ermilov Oracle Developer/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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010921190710.A87085>