Re: [HEADS UP] ar(1) front-end committed. (notes for cross compile)

From: Kai Wang <kaiwang27_at_gmail.com>
Date: Fri, 22 Feb 2008 18:00:07 +0100
On Fri, Feb 22, 2008 at 01:54:13PM +0300, Ruslan Ermilov wrote:
> Here's an updated patch.  It differs in that we don't
> bootstrap BSD ar(1) if we were told to build WITH_GNUAR,
> and we don't install BSD ar(1) with "bsd" prefixes if
> it's to be the system ar(1) (requested by David).
> 
> 
> Cheers,
> -- 
> Ruslan Ermilov
> ru_at_FreeBSD.org
> FreeBSD committer

> Index: sys/sys/param.h
> ===================================================================
> RCS file: /home/ncvs/src/sys/sys/param.h,v
> retrieving revision 1.337
> diff -u -p -r1.337 param.h
> --- sys/sys/param.h	21 Feb 2008 16:12:46 -0000	1.337
> +++ sys/sys/param.h	22 Feb 2008 07:43:33 -0000
> _at__at_ -57,7 +57,7 _at__at_
>   *		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>
> Index: Makefile.inc1
> ===================================================================
> RCS file: /home/ncvs/src/Makefile.inc1,v
> retrieving revision 1.598
> diff -u -p -r1.598 Makefile.inc1
> --- Makefile.inc1	5 Feb 2008 15:41:58 -0000	1.598
> +++ Makefile.inc1	22 Feb 2008 10:02:05 -0000
> _at__at_ -885,8 +885,13 _at__at_ _crunchgen=	usr.sbin/crunch/crunchgen
>  _mklocale=	usr.bin/mklocale
>  .endif
>  
> +.if ${BOOTSTRAPPING} >= 800022 && !defined(WITH_GNUAR)
> +_ar=		usr.bin/ar
> +.endif
> +
>  bootstrap-tools:
>  .for _tool in \
> +    ${_ar} \
>      ${_mklocale} \
>      ${_strfile} \
>      ${_gperf} \
> _at__at_ -967,6 +972,10 _at__at_ _kgzip=		usr.sbin/kgzip
>  .endif
>  .endif
>  
> +.if make(cross-tools) && ${BOOTSTRAPPING} < 800022
> +.MAKEFLAGS+=	-DWITH_GNUAR
> +.endif
> +
>  cross-tools:
>  .for _tool in \
>      gnu/usr.bin/binutils \
> Index: gnu/usr.bin/binutils/ar/Makefile
> ===================================================================
> RCS file: /home/ncvs/src/gnu/usr.bin/binutils/ar/Makefile,v
> retrieving revision 1.16
> diff -u -p -r1.16 Makefile
> --- gnu/usr.bin/binutils/ar/Makefile	21 Feb 2008 16:59:02 -0000	1.16
> +++ gnu/usr.bin/binutils/ar/Makefile	22 Feb 2008 06:56:10 -0000
> _at__at_ -4,12 +4,15 _at__at_
>  
>  .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

Would it be better if we call them gar and granlib?  Solaris did
that. Also if I remember correctly, some ports probes gar.  We also
call GNU make as gmake...

--
Kai
Received on Fri Feb 22 2008 - 16:00:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:27 UTC