This is because BMAKEENV has DESTDIR=${WORLDTMP}, and
bsd.{prog,lib}.mk have the magic of adding the
-I${DESTDIR}/usr/include to CFLAGS if DESTDIR is set.

I'm currently testing the following patch with the
-CURRENT build on a -STABLE box.

Index: bsd.prog.mk
===================================================================
RCS file: /home/ncvs/src/share/mk/bsd.prog.mk,v
retrieving revision 1.100
diff -u -r1.100 bsd.prog.mk
--- bsd.prog.mk 2001/06/14 06:08:02     1.100
+++ bsd.prog.mk 2001/09/21 07:23:14
@@ -11,7 +11,7 @@
 .SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .s .S
 
 CFLAGS+=${COPTS} ${DEBUG_FLAGS}
-.if defined(DESTDIR)
+.if defined(DESTDIR) && !defined(BOOTSTRAPPING)
 CFLAGS+= -I${DESTDIR}/usr/include
 CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
 .endif
Index: bsd.lib.mk
===================================================================
RCS file: /home/ncvs/src/share/mk/bsd.lib.mk,v
retrieving revision 1.97
diff -u -r1.97 bsd.lib.mk
--- bsd.lib.mk  2001/05/19 23:24:17     1.97
+++ bsd.lib.mk  2001/09/21 07:23:15
@@ -37,7 +37,7 @@
 .endif
 .endif
 
-.if defined(DESTDIR)
+.if defined(DESTDIR) && !defined(BOOTSTRAPPING)
 CFLAGS+= -I${DESTDIR}/usr/include
 CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
 .endif

On Thu, Sep 20, 2001 at 10:14:22PM -0700, Peter Wemm wrote:
> Steve Kargl wrote:
> > Note, I'm updating a 3 week old current to today's sources.
> > I've fallen way behind in the mailing lists (due to living
> > out of a suitcase for week longer then intended), so if
> > this is a known problem please ignore.
> > 
> > 
> > cc -O -pipe -march=k6 -D_GNU_SOURCE -I- -I. -I/usr/src/gnu/usr.bin/binutils/l
>     d -I/usr/src/gnu/usr.bin/binutils/ld/../libbfd/i386 -I/usr/src/gnu/usr.bin/
>     binutils/ld/../../../../contrib/binutils/include -DDEFAULT_EMULATION=\"elf_
>     i386\" -DTARGET=\"i386-unknown-freebsd\" -DSCRIPTDIR=\"/usr/obj/usr/src/i38
>     6/usr/libdata\" -I/usr/src/gnu/usr.bin/binutils/ld/../../../../contrib/binu
>     tils/ld -I/usr/src/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/bfd
>      -I/usr/src/gnu/usr.bin/binutils/ld/../../../../include -DVERSION=\""2.11.2
>      20010719 [FreeBSD]"\" -DBFD_VERSION=\""2.11.2 20010719 [FreeBSD]"\"   -I/u
>     sr/obj/usr/src/i386/usr/include   -static -o ld eelf_i386.o ldcref.o ldctor
>     .o ldemul.o ldexp.o ldfile.o ldgram.o ldlang.o ldlex.o ldmain.o ldmisc.o ld
>     ver.o ldwrite.o lexsup.o mri.o  ../libbfd/libbfd.a ../libiberty/libiberty.a
> > ldemul.o: In function `ldemul_choose_mode':
> > ldemul.o(.text+0x318): undefined reference to `__stderrp'
> > ldlang.o: In function `dprint_statement':
> > ldlang.o(.text+0x26a6): undefined reference to `__stderrp'
> > ldlex.o: In function `yylex':
> > ldlex.o(.text+0xc0): undefined reference to `__stdinp'
> > ldlex.o(.text+0xd3): undefined reference to `__stdoutp'
> 
> 
> This is actually a bug in the buildworld process.  For some reason, it
> is using a -current stdio.h with an old unknown libc.a.  It should be using
> the host stdio.h with the host libc.a, not mixing them up.  If there is any
> binary incompatability, then there will be breakage.
> 
> However, for now, you can get over the hurdle with this hack..
> Simply add -D_OLD_STDIO to CFLAGS in /etc/make.conf, eg:
> 
> CFLAGS= -O -pipe -D_OLD_STDIO
> 
> Only do this for one buildworld.  After that, you wont need it again.
> 
> You should never have needed it at all though. :-(
> 
> Cheers,
> -Peter
> --
> Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> "All of this is for nothing if we don't go to the stars" - JMS/B5
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message

-- 
Ruslan Ermilov          Oracle Developer/DBA,
[EMAIL PROTECTED]           Sunbay Software AG,
[EMAIL PROTECTED]          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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to