diff --git a/Makefile.inc1 b/Makefile.inc1 index 5a9696510e5c..ce5639bd64ee 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -756,7 +756,7 @@ _strfile= games/fortune/strfile .endif .if !defined(NO_CXX) -_gperf= gnu/usr.bin/gperf +_gperf= gnu/usr.bin/gperf .if ${BOOTSTRAPPING} < 500113 _groff= gnu/usr.bin/groff .else @@ -768,42 +768,15 @@ _groff= gnu/usr.bin/groff/tmac _cap_mkdb= usr.bin/cap_mkdb .endif -.if ${BOOTSTRAPPING} < 502102 -_lex= usr.bin/lex -.endif - .if ${BOOTSTRAPPING} < 600016 _mklocale= usr.bin/mklocale .endif -.if ${BOOTSTRAPPING} < 450005 || \ - ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 -_uudecode= usr.bin/uudecode -.endif - -.if ${BOOTSTRAPPING} < 430002 || \ - ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500019 -_xargs= usr.bin/xargs -.endif - -.if ${BOOTSTRAPPING} < 430002 || \ - ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500018 -_yacc= usr.bin/yacc -.endif - .if !defined(NO_RESCUE) && \ ${BOOTSTRAPPING} < 600008 _crunchgen= usr.sbin/crunch/crunchgen .endif -.if ${BOOTSTRAPPING} < 502128 -_gensnmptree= usr.sbin/bsnmpd/gensnmptree -.endif - -.if ${BOOTSTRAPPING} < 500019 -_kbdcontrol= usr.sbin/kbdcontrol -.endif - bootstrap-tools: .for _tool in \ ${_strfile} \ @@ -812,19 +785,13 @@ bootstrap-tools: gnu/usr.bin/texinfo \ ${_cap_mkdb} \ usr.bin/colldef \ - ${_lex} \ usr.bin/lorder \ usr.bin/makewhatis \ ${_mklocale} \ usr.bin/rpcgen \ - ${_uudecode} \ - ${_xargs} \ usr.bin/xinstall \ - ${_yacc} \ usr.sbin/config \ - ${_crunchgen} \ - ${_gensnmptree} \ - ${_kbdcontrol} + ${_crunchgen} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ @@ -881,19 +848,13 @@ build-tools: # # cross-tools: Build cross-building tools # -.if ${TARGET_ARCH} == "sparc64" && ${TARGET_ARCH} != ${MACHINE_ARCH} && \ - ${BOOTSTRAPPING} < 500037 -_elf2aout= usr.bin/elf2aout -.endif - .if (${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386") && \ ${TARGET_ARCH} != ${MACHINE_ARCH} _btxld= usr.sbin/btxld .endif -.if (!defined(NO_RESCUE) || \ - defined(RELEASEDIR)) && \ - (${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101) +.if (!defined(NO_RESCUE) || defined(RELEASEDIR)) && \ + ${TARGET_ARCH} != ${MACHINE_ARCH} _crunchide= usr.sbin/crunch/crunchide .endif @@ -910,7 +871,6 @@ cross-tools: .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc \ - ${_elf2aout} \ usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ diff --git a/tools/build/Makefile b/tools/build/Makefile index 885a4c8b46c5..5b76f093cd5d 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -9,65 +9,11 @@ INCS= BOOTSTRAPPING?= 0 -# Some tools need . -.if !exists(/usr/include/sys/endian.h) || ${BOOTSTRAPPING} < 500000 -INCSGROUPS+= SYSHDRS -SYSHDRS= endian.h -SYSHDRSDIR= ${INCLUDEDIR}/sys -.endif - -# gnu/usr.bin/binutils/ld needs . -.if !exists(/usr/include/elf-hints.h) -INCS+= elf-hints.h -.endif - -# lib/libncurses needs . -.if !exists(/usr/include/stdbool.h) -INCS+= stdbool.h -.endif - # usr.bin/mklocale needs . .if !exists(/usr/include/runefile.h) INCS+= runefile.h .endif -# usr.bin/xargs needs . -.if !exists(/usr/include/langinfo.h) -INCS+= langinfo.h -.endif - -# Some tools need basename(3). -.if !exists(/usr/include/libgen.h) -INCS+= libgen.h -.PATH: ${.CURDIR}/../../lib/libc/gen -SRCS+= basename.c -.endif - -# Some tools need {get,set}progname(3). -.if ( ${BOOTSTRAPPING} < 440001 || \ - ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500023 )) -SRCS+= progname.c -.endif - -# install(1) needs strtofflags(3). -.if ( ${BOOTSTRAPPING} < 400021 || \ - ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500007 )) -.PATH: ${.CURDIR}/../../lib/libc/gen -SRCS+= strtofflags.c -.endif - -# Lot of tools need and getopt_long(3). -.if !exists(/usr/include/getopt.h) || ${BOOTSTRAPPING} < 502104 -INCS+= getopt.h -.PATH: ${.CURDIR}/../../lib/libc/stdlib -SRCS+= getopt_long.c -.endif - -# Some tools depend on a new not requiring . -.if ${BOOTSTRAPPING} < 500042 -INCS+= regex.h -.endif - .if empty(SRCS) SRCS= dummy.c .endif diff --git a/tools/build/endian.h b/tools/build/endian.h deleted file mode 100644 index bde044e5bfcc..000000000000 --- a/tools/build/endian.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * $FreeBSD$ - */ - -#include -#include - -#define bswap16(x) (uint16_t) \ - ((x >> 8) | (x << 8)) - -#define bswap32(x) (uint32_t) \ - ((x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | (x << 24)) - -#define bswap64(x) (uint64_t) \ - ((x >> 56) | ((x >> 40) & 0xff00) | ((x >> 24) & 0xff0000) | \ - ((x >> 8) & 0xff000000) | ((x << 8) & ((uint64_t)0xff << 32)) | \ - ((x << 24) & ((uint64_t)0xff << 40)) | \ - ((x << 40) & ((uint64_t)0xff << 48)) | ((x << 56))) - -/* - * Host to big endian, host to little endian, big endian to host, and little - * endian to host byte order functions as detailed in byteorder(9). - */ -#if _BYTE_ORDER == _LITTLE_ENDIAN -#define htobe16(x) bswap16((uint16_t)(x)) -#define htobe32(x) bswap32((uint32_t)(x)) -#define htobe64(x) bswap64((uint64_t)(x)) -#define htole16(x) ((uint16_t)(x)) -#define htole32(x) ((uint32_t)(x)) -#define htole64(x) ((uint64_t)(x)) - -#define be16toh(x) bswap16((uint16_t)(x)) -#define be32toh(x) bswap32((uint32_t)(x)) -#define be64toh(x) bswap64((uint64_t)(x)) -#define le16toh(x) ((uint16_t)(x)) -#define le32toh(x) ((uint32_t)(x)) -#define le64toh(x) ((uint64_t)(x)) -#else /* _BYTE_ORDER != _LITTLE_ENDIAN */ -#define htobe16(x) ((uint16_t)(x)) -#define htobe32(x) ((uint32_t)(x)) -#define htobe64(x) ((uint64_t)(x)) -#define htole16(x) bswap16((uint16_t)(x)) -#define htole32(x) bswap32((uint32_t)(x)) -#define htole64(x) bswap64((uint64_t)(x)) - -#define be16toh(x) ((uint16_t)(x)) -#define be32toh(x) ((uint32_t)(x)) -#define be64toh(x) ((uint64_t)(x)) -#define le16toh(x) bswap16((uint16_t)(x)) -#define le32toh(x) bswap32((uint32_t)(x)) -#define le64toh(x) bswap64((uint64_t)(x)) -#endif /* _BYTE_ORDER == _LITTLE_ENDIAN */ diff --git a/tools/build/langinfo.h b/tools/build/langinfo.h deleted file mode 100644 index 419c7214ed7e..000000000000 --- a/tools/build/langinfo.h +++ /dev/null @@ -1,17 +0,0 @@ -/* $FreeBSD$ */ - -#ifndef LANGINFO_H -#define LANGINFO_H - -#include - -#define YESEXPR 1 - -/* xargs only needs yesexpr, so that's all we implement, for english */ -static inline const char * -nl_langinfo(int type __unused) -{ - return ("^[yY]"); -} - -#endif /* LANGINFO_H */ diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot index ba2c5f724aab..0707ae2b0d67 100644 --- a/tools/build/mk/Makefile.boot +++ b/tools/build/mk/Makefile.boot @@ -1,13 +1,5 @@ # $FreeBSD$ -# FreeBSD didn't always have the __FBSDID() macro in . -# We could do this with a sys/cdefs.h wrapper, but given that this would -# slow down all new builds for such a simple concept, we do it here. -.if ( ${BOOTSTRAPPING} < 440001 || \ - ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500024 )) -CFLAGS+= -D__FBSDID=__RCSID -.endif - CFLAGS+= -I${WORLDTMP}/legacy/usr/include DPADD+= ${WORLDTMP}/legacy/usr/lib/libegacy.a LDADD+= -legacy diff --git a/tools/build/progname.c b/tools/build/progname.c deleted file mode 100644 index dc1611e9ac28..000000000000 --- a/tools/build/progname.c +++ /dev/null @@ -1,25 +0,0 @@ -/* $FreeBSD$ */ - -/* - * Compat shims for those programs that use this newer interface. These - * are more minimal than their libc bretheren as far as namespaces and - * such go because their use is so limited. Also, the libc versions - * have too many depends on libc build environment; it is more of a pain - * to set that up than to recreate them here shorn of all the other goo. - */ - -extern const char *__progname; - -void -setprogname(const char *p) -{ - - __progname = p; -} - -const char * -getprogname(void) -{ - - return (__progname); -} diff --git a/tools/build/regex.h b/tools/build/regex.h deleted file mode 100644 index 3de60765855b..000000000000 --- a/tools/build/regex.h +++ /dev/null @@ -1,4 +0,0 @@ -/* $FreeBSD$ */ - -#include -#include "/usr/include/regex.h"