Make again BSD ar(1) the default system ar(1), now properly handling
source upgrades by falling back to GNU ar(1) as necessary. Option WITH_BSDAR is gone. Option _WITH_GNUAR to aid in upgrades is *not* supposed to be set by the user. Stop bootstrapping BSD ar(1) on the next __FreeBSD_version bump, as there are no known bugs in it. Bump __FreeBSD_version to anticipate this and to flag the switch to BSD ar(1), should it be needed for something. Input from: obrien, des, kaiw
This commit is contained in:
parent
b1d8472a5b
commit
d0ca999980
@ -872,6 +872,10 @@ _groff= gnu/usr.bin/groff/tmac
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${BOOTSTRAPPING} >= 700044 && ${BOOTSTRAPPING} < 800022
|
||||
_ar= usr.bin/ar
|
||||
.endif
|
||||
|
||||
.if ${BOOTSTRAPPING} < 700018
|
||||
_gensnmptree= usr.sbin/bsnmpd/gensnmptree
|
||||
.endif
|
||||
@ -891,6 +895,7 @@ bootstrap-tools:
|
||||
${_strfile} \
|
||||
${_gperf} \
|
||||
${_groff} \
|
||||
${_ar} \
|
||||
usr.bin/lorder \
|
||||
usr.bin/makewhatis \
|
||||
usr.bin/rpcgen \
|
||||
@ -967,6 +972,10 @@ _kgzip= usr.sbin/kgzip
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if make(cross-tools) && ${BOOTSTRAPPING} < 700044
|
||||
.MAKEFLAGS+= -D_WITH_GNUAR
|
||||
.endif
|
||||
|
||||
cross-tools:
|
||||
.for _tool in \
|
||||
gnu/usr.bin/binutils \
|
||||
|
@ -4,12 +4,15 @@
|
||||
|
||||
.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
|
||||
|
||||
.if defined(WITH_BSDAR)
|
||||
PROG= gnu-ar
|
||||
#MAN= gnu-ar.1
|
||||
.else
|
||||
PROG= ar
|
||||
.if !defined(_WITH_GNUAR)
|
||||
PROGNAME= gnu-ar
|
||||
MAN= gnu-ar.1
|
||||
gnu-ar.1: ar.1
|
||||
cat ${.ALLSRC} > ${.TARGET}
|
||||
CLEANFILES+= gnu-ar.1
|
||||
.endif
|
||||
|
||||
PROG= ar
|
||||
SRCS= ar.c not-ranlib.c
|
||||
CFLAGS+= -D_GNU_SOURCE
|
||||
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
|
||||
|
@ -4,12 +4,15 @@
|
||||
|
||||
.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
|
||||
|
||||
.if defined(WITH_BSDAR)
|
||||
PROG= gnu-ranlib
|
||||
#MAN= gnu-ranlib.1
|
||||
.else
|
||||
PROG= ranlib
|
||||
.if !defined(_WITH_GNUAR)
|
||||
PROGNAME= gnu-ranlib
|
||||
MAN= gnu-ranlib.1
|
||||
gnu-ranlib.1: ranlib.1
|
||||
cat ${.ALLSRC} > ${.TARGET}
|
||||
CLEANFILES+= gnu-ranlib.1
|
||||
.endif
|
||||
|
||||
PROG= ranlib
|
||||
SRCS= ar.c is-ranlib.c
|
||||
CFLAGS+= -D_GNU_SOURCE
|
||||
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
|
||||
|
@ -57,7 +57,7 @@
|
||||
* is created, otherwise 1.
|
||||
*/
|
||||
#undef __FreeBSD_version
|
||||
#define __FreeBSD_version 800021 /* Master, propagated to newvers */
|
||||
#define __FreeBSD_version 800022 /* Master, propagated to newvers */
|
||||
|
||||
#ifndef LOCORE
|
||||
#include <sys/types.h>
|
||||
|
@ -1,10 +1,6 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.if defined(WITH_BSDAR)
|
||||
PROG= ar
|
||||
.else
|
||||
PROG= bsdar
|
||||
.endif
|
||||
SRCS= ar.c read.c util.c write.c
|
||||
|
||||
WARNS?= 5
|
||||
@ -12,17 +8,8 @@ WARNS?= 5
|
||||
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF}
|
||||
LDADD= -larchive -lbz2 -lz -lelf
|
||||
|
||||
.if defined(WITH_BSDAR)
|
||||
NO_SHARED?= yes
|
||||
LINKS= ${BINDIR}/ar ${BINDIR}/ranlib
|
||||
MLINKS= ar ranlib
|
||||
.else
|
||||
LINKS= ${BINDIR}/bsdar ${BINDIR}/bsdranlib
|
||||
MLINKS= bsdar.1 bsdranlib.1
|
||||
|
||||
CLEANFILES+= bsdar.1
|
||||
bsdar.1: ar.1
|
||||
ln -sf ${.ALLSRC} ${.TARGET}
|
||||
.endif
|
||||
MLINKS= ar.1 ranlib.1
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user