From d0e2abaf129793c80bb03e948f99c844072a4dc3 Mon Sep 17 00:00:00 2001 From: Kai Wang Date: Thu, 21 Feb 2008 11:21:29 +0000 Subject: [PATCH] * Connect ar(1) to the build and make it default ar. Rename GNU binutils ar and ranlib to gar and granlib, respectively. * Introduce a temporary variable WITH_GNUAR as a safety net. When buildworld with -DWITH_GNUAR, GNU binutils ar and ranlib will install as default ones and 'BSD' ar will be disabled. * Bump __FreeBSD_version to reflect the import of 'BSD' ar(1). Approved by: jkoshy (mentor) --- gnu/usr.bin/binutils/ar/Makefile | 5 +++++ gnu/usr.bin/binutils/ranlib/Makefile | 5 +++++ sys/sys/param.h | 2 +- usr.bin/Makefile | 4 ++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gnu/usr.bin/binutils/ar/Makefile b/gnu/usr.bin/binutils/ar/Makefile index 59031869a25..090a16fa823 100644 --- a/gnu/usr.bin/binutils/ar/Makefile +++ b/gnu/usr.bin/binutils/ar/Makefile @@ -4,7 +4,12 @@ .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc +.if defined(WITH_GNUAR) PROG= ar +.else +PROG= gar +MAN= ar.1 +.endif SRCS= ar.c not-ranlib.c CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils diff --git a/gnu/usr.bin/binutils/ranlib/Makefile b/gnu/usr.bin/binutils/ranlib/Makefile index 8edfa01bb13..68d230d3866 100644 --- a/gnu/usr.bin/binutils/ranlib/Makefile +++ b/gnu/usr.bin/binutils/ranlib/Makefile @@ -4,7 +4,12 @@ .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc +.if defined(WITH_GNUAR) PROG= ranlib +.else +PROG= granlib +MAN= ranlib.1 +.endif SRCS= ar.c is-ranlib.c CFLAGS+= -D_GNU_SOURCE CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils diff --git a/sys/sys/param.h b/sys/sys/param.h index 9b6379929e5..a9d3a59fdbe 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -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 diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 39ea1504b35..f954a1e3aba 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -232,6 +232,10 @@ SUBDIR= alias \ ${_ypmatch} \ ${_ypwhich} +.if !defined(WITH_GNUAR) +SUBDIR+= ar +.endif + .if ${MACHINE_ARCH} != "arm" _truss= truss .endif