diff --git a/Makefile.inc1 b/Makefile.inc1 index 7074d055acd7..2fc9b11e6be0 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -123,6 +123,7 @@ SUPFLAGS+= -h ${SUPHOST} .endif MAKEOBJDIRPREFIX?= /usr/obj +OSRELDATE!= sysctl -n kern.osreldate TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} TARGET?= ${MACHINE} @@ -193,7 +194,8 @@ CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ BMAKEENV= MAKEOBJDIRPREFIX=${WORLDTMP} \ DESTDIR= \ INSTALL="sh ${.CURDIR}/tools/install.sh" -BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ +BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ + BOOTSTRAPPING=${OSRELDATE} \ -DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \ -DNO_CPU_CFLAGS -DNO_WERROR @@ -201,8 +203,8 @@ BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \ DESTDIR= \ INSTALL="sh ${.CURDIR}/tools/install.sh" -TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \ - -DNO_CPU_CFLAGS +TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 \ + BOOTSTRAPPING=${OSRELDATE} -DNO_CPU_CFLAGS # cross-tool stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB diff --git a/gnu/usr.bin/binutils/libiberty/Makefile b/gnu/usr.bin/binutils/libiberty/Makefile index f34be9e2f2ca..c002f6243106 100644 --- a/gnu/usr.bin/binutils/libiberty/Makefile +++ b/gnu/usr.bin/binutils/libiberty/Makefile @@ -10,7 +10,9 @@ SRCS= argv.c choose-temp.c concat.c cp-demangle.c cplus-dem.c \ hex.c floatformat.c hashtab.c lbasename.c make-temp-file.c \ objalloc.c obstack.c safe-ctype.c xatexit.c xexit.c xmalloc.c \ xstrdup.c xstrerror.c -.if defined(BOOTSTRAPPING) +.if defined(BOOTSTRAPPING) && \ + ( ${BOOTSTRAPPING} < 440000 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500022 )) SRCS+= basename.c .endif WARNS= 1 diff --git a/kerberos5/lib/libasn1/Makefile b/kerberos5/lib/libasn1/Makefile index f38c2bfd37f1..3f270e6dcdb3 100644 --- a/kerberos5/lib/libasn1/Makefile +++ b/kerberos5/lib/libasn1/Makefile @@ -106,7 +106,9 @@ asn1_compile: \ strupr.c ${CC} ${CFLAGS} ${.OODATE} -o ${.TARGET} -.if defined(BOOTSTRAPPING) +.if defined(BOOTSTRAPPING) && \ + ( ${BOOTSTRAPPING} < 440001 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500023 )) asn1_compile: getprogname.c setprogname.c .endif diff --git a/kerberos5/lib/libhdb/Makefile b/kerberos5/lib/libhdb/Makefile index 5a433f19baae..0970b1360265 100644 --- a/kerberos5/lib/libhdb/Makefile +++ b/kerberos5/lib/libhdb/Makefile @@ -61,7 +61,9 @@ asn1_compile: parse.o lex.o main.c hash.c symbol.c emalloc.c gen.c \ get_window_size.c strupr.c ${CC} ${CFLAGS} ${.OODATE} -o ${.TARGET} -.if defined(BOOTSTRAPPING) +.if defined(BOOTSTRAPPING) && \ + ( ${BOOTSTRAPPING} < 440001 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500023 )) asn1_compile: getprogname.c setprogname.c .endif diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 2988a5be24bb..82196730757f 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -55,7 +55,9 @@ CFLAGS += -Werror # Allow user-specified additional warning flags CFLAGS += ${CWARNFLAGS} -# FreeBSD prior to 4.5 didn't have the __FBSDID() macro in . -.if defined(BOOTSTRAPPING) +# FreeBSD didn't always have the __FBSDID() macro in . +.if defined(BOOTSTRAPPING) && \ + ( ${BOOTSTRAPPING} < 440001 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500024 )) CFLAGS+= -D__FBSDID=__RCSID .endif diff --git a/usr.bin/xargs/Makefile b/usr.bin/xargs/Makefile index 1f258ca68292..1f33228d8035 100644 --- a/usr.bin/xargs/Makefile +++ b/usr.bin/xargs/Makefile @@ -5,8 +5,4 @@ PROG= xargs SRCS= xargs.c strnsubst.c WARNS?= 4 -.if defined(BOOTSTRAPPING) -CFLAGS+=-DBOOTSTRAPPING -.endif - .include diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 96ad3b44d482..5414e65f99dd 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -51,12 +51,13 @@ static char sccsid[] = "@(#)xargs.c 8.1 (Berkeley) 6/6/93"; #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include -#ifndef BOOTSTRAPPING +#if (__FreeBSD_version >= 450002 && __FreeBSD_version < 500000) || \ + __FreeBSD_version >= 500017 #include #endif #include @@ -542,10 +543,11 @@ prompt(void) (void)fflush(stderr); if ((response = fgetln(ttyfp, &rsize)) == NULL || regcomp(&cre, -#ifdef BOOTSTRAPPING - "^[yY]", -#else +#if (__FreeBSD_version >= 450002 && __FreeBSD_version < 500000) || \ + __FreeBSD_version >= 500017 nl_langinfo(YESEXPR), +#else + "^[yY]", #endif REG_BASIC) != 0) { (void)fclose(ttyfp); diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile index e0886ed7afdb..2ed1eea375c0 100644 --- a/usr.bin/xinstall/Makefile +++ b/usr.bin/xinstall/Makefile @@ -6,7 +6,9 @@ PROGNAME= install SRCS= xinstall.c MAN= install.1 -.if defined(BOOTSTRAPPING) +.if defined(BOOTSTRAPPING) && \ + ( ${BOOTSTRAPPING} < 400021 || \ + ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500007 )) .PATH: ${.CURDIR}/../../lib/libc/gen SRCS+= strtofflags.c .endif