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

classic Classic list List threaded Threaded
61 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

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

David O'Brien
On Fri, Feb 22, 2008 at 12:16:42PM +0300, Ruslan Ermilov wrote:
> Here's the promised patch.  What it does:
> - Switch again to using BSD ar(1) by default, but provide a knob
>   to use GNU ar(1) as the system ar(1).  (Option WITH_BSDAR is
>   replaced with option WITH_GNUAR.)
>
> - Install BSD ar(1) as bsdar(1) with the necessary links:
>   bsdranlib(1), ar(1), and ranlib(1) (the latter two unless we
>   build WITH_GNUAR).
..
> - ar.1 moved to bsdar.1 along with some bugfixing.

I don't quite follow what you want the end state to be.  If it is to
quickly convert to the new BSDLed ar & ranlib, then I don't care for the
"creatation" of a bsdar binary and manpage (below you delete
src/usr.bin/ar/ar.1 and create bsdar.1).  The FreeBSD 8 official 'ar'
should have its man page named "ar.1" - I don't see what is gained
otherwise.  bsdtar could be mentioned as an example where we went this
path - but I think bsdtar (and associated libarchive) has a large life
outside of FreeBSD.  I really see that for 'ar'.

> - Handle upgrades nicely: use GNU ar(1) during the build on older
>   systems, and use BSD ar(1) on newer systems.

If we need GNU ar for the upgrade path - then lets just install it (and
its manage) as gnu-ar and let that be that.

> Please review.

You asked...  8-)
 
--
-- David  ([hidden email])
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Ruslan Ermilov
In reply to this post by David O'Brien
On Fri, Feb 22, 2008 at 01:27:13AM -0800, David O'Brien wrote:

> On Fri, Feb 22, 2008 at 12:16:42PM +0300, Ruslan Ermilov wrote:
> > RCS file: /home/ncvs/src/usr.bin/Makefile,v
> ..
> > - ar \
> > + ${_ar} \
> ..
> >  .if ${MK_TOOLCHAIN} != "no"
> > +_ar= ar
>
> Please commit now - I should have done it this way.
>
Done.

> > RCS file: /home/ncvs/src/usr.bin/ar/Makefile,v
> ..
> > -.if defined(WITH_BSDAR)
> > -PROG= ar
> > -.else
> >  PROG= bsdar
> > -.endif
> > +LINKS= ${BINDIR}/bsdar ${BINDIR}/bsdranlib
> > +MLINKS= bsdar.1 bsdranlib.1
>
> LINKS and MLINKS don't belong here in a Makefile - they are better
> located where I have them.
>
The only difference is that I prefer the "product order",
while you seem to prefer the "build order".  :-)

Our versions don't match any of the documented orders in
style.Makefile(5) because the conditional block is
misplaced.  If I move the conditional block from after
the first set of links, the order will fully match "product
order".  I also had a no-op ".else" clause in my patch --
the result of the conflict resolution with your changes.
Now it looks like this:

: # $FreeBSD: src/usr.bin/ar/Makefile,v 1.19 2008/02/22 06:53:52 obrien Exp $
:
: PROG= bsdar
: LINKS= ${BINDIR}/bsdar ${BINDIR}/bsdranlib
: MLINKS= bsdar.1 bsdranlib.1
:
: .if !defined(WITH_GNUAR)
: NO_SHARED?= yes
: LINKS+= ${BINDIR}/bsdar ${BINDIR}/ar
: MLINKS+= bsdar.1 ar.1
: LINKS+= ${BINDIR}/bsdranlib ${BINDIR}/ranlib
: MLINKS+= bsdranlib.1 ranlib.1
: .endif
:
: SRCS= ar.c read.c util.c write.c
:
: WARNS?= 5
:
: DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBELF}
: LDADD= -larchive -lbz2 -lz -lelf
:
: .include <bsd.prog.mk>

> > -NO_SHARED?= yes
>
> It looks like you're totally removing the NO_SHARED setting, or do you
> still have it set when BSD-ar is the default 'ar'?
>
I think you misread my patch.  It's still built statically
when it's the default system ar(1), exactly as you programmed
it.


Cheers,
--
Ruslan Ermilov
[hidden email]
FreeBSD committer
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

David O'Brien
On Fri, Feb 22, 2008 at 12:44:17PM +0300, Ruslan Ermilov wrote:
> On Fri, Feb 22, 2008 at 01:27:13AM -0800, David O'Brien wrote:
> > On Fri, Feb 22, 2008 at 12:16:42PM +0300, Ruslan Ermilov wrote:
> > LINKS and MLINKS don't belong here in a Makefile - they are better
> > located where I have them.
>
> The only difference is that I prefer the "product order",
> while you seem to prefer the "build order".  :-)

Ah, yes - very true.
 
> order".  I also had a no-op ".else" clause in my patch --
> the result of the conflict resolution with your changes.
> Now it looks like this:

Removing the ".else" does help.

> > > -NO_SHARED?= yes
> >
> > It looks like you're totally removing the NO_SHARED setting, or do you
> > still have it set when BSD-ar is the default 'ar'?
>
> I think you misread my patch.

I had.  So my NO_SHARED concern is taken care of.

I hope you'll still answer the other email I sent about the "larger
picture".

--
-- David  ([hidden email])
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Ruslan Ermilov
In reply to this post by David O'Brien
On Fri, Feb 22, 2008 at 01:32:34AM -0800, David O'Brien wrote:

> On Fri, Feb 22, 2008 at 12:16:42PM +0300, Ruslan Ermilov wrote:
> > Here's the promised patch.  What it does:
> > - Switch again to using BSD ar(1) by default, but provide a knob
> >   to use GNU ar(1) as the system ar(1).  (Option WITH_BSDAR is
> >   replaced with option WITH_GNUAR.)
> >
> > - Install BSD ar(1) as bsdar(1) with the necessary links:
> >   bsdranlib(1), ar(1), and ranlib(1) (the latter two unless we
> >   build WITH_GNUAR).
> ..
> > - ar.1 moved to bsdar.1 along with some bugfixing.
>
> I don't quite follow what you want the end state to be.  If it is to
> quickly convert to the new BSDLed ar & ranlib, then I don't care for the
> "creatation" of a bsdar binary and manpage (below you delete
> src/usr.bin/ar/ar.1 and create bsdar.1).  The FreeBSD 8 official 'ar'
> should have its man page named "ar.1" - I don't see what is gained
> otherwise.  bsdtar could be mentioned as an example where we went this
> path - but I think bsdtar (and associated libarchive) has a large life
> outside of FreeBSD.  I really see that for 'ar'.
>
I don't mind reverting this.

> > - Handle upgrades nicely: use GNU ar(1) during the build on older
> >   systems, and use BSD ar(1) on newer systems.
>
> If we need GNU ar for the upgrade path - then lets just install it (and
> its manage) as gnu-ar and let that be that.
>
I don't get you, GNU ar(1) is always installed.  Only the name is
changes.  But let me explain more about the upgrades.

Currently, we always build binutils as part of cross-tools, including
GNU ar(1) and ranlib(1).  These binaries are then used during the build.
The BSD ar(1) doesn't need to be a cross-tool -- it doesn't depend on
TARGET_ARCH/TARGET and is platform-neutral.  (I hope I'm right about it,
otherwise it all doesn't make sense and cross-builds are broken.)
We could just use /usr/bin/ar and don't bother bootstrapping it if we
knew it's a BSD ar(1) without known bugs (determined by __FreeBSD_version).
If it has compatibility issues or bugs, we can bootstrap it.
Unfortunalely, since we provide the WITH_GNUAR option, we don't know if
/usr/bin/ar and /usr/bin/ranlib are GNU or BSD versions, so we should
always bootstrap BSD ar(1).

The short version is as simple as this:

You have            You specified           ar(1) used for builds
=================== ======================= =====================

OS before bsdar     WITH_GNUAR              GNU ar
OS before bsdar     -                       GNU ar

OS after bsdar      WITH_GNUAR              GNU ar
OS after bsdar      -                       BSD ar (*)

(*) We need to bootstrap BSD ar(1) because we don't know if
/usr/bin/ar is GNU ar(1) or BSD ar(1), and GNU ar(1) for one
arch cannot be used to cross-build to a different arch.


Cheers,
--
Ruslan Ermilov
[hidden email]
FreeBSD committer
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Dag-Erling Smørgrav
In reply to this post by Ruslan Ermilov
Ruslan Ermilov <[hidden email]> writes:
> - Handle upgrades nicely: use GNU ar(1) during the build on older
>   systems, and use BSD ar(1) on newer systems.  For now, always
>   bootstrap BSD ar(1) on newer systems during the build (in case
>   some bugs pop up), but after some period of testing, we can stop
>   unconditionally bootstrapping it.

I would *really* like BSD ar to be used to build world regardless of
host system version, at least on the tinderbox.  Isn't it possible to
use GNU ar just for the toolchain, then BSD ar for the "real" world?
Doesn't adding ar to bootstrap-tools take care of that?

Note that the tinderbox *always* cross-builds, even when building for
the platform it runs on.

DES
--
Dag-Erling Smørgrav - [hidden email]
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Ruslan Ermilov
On Fri, Feb 22, 2008 at 11:48:05AM +0100, Dag-Erling Sm??rgrav wrote:

> Ruslan Ermilov <[hidden email]> writes:
> > - Handle upgrades nicely: use GNU ar(1) during the build on older
> >   systems, and use BSD ar(1) on newer systems.  For now, always
> >   bootstrap BSD ar(1) on newer systems during the build (in case
> >   some bugs pop up), but after some period of testing, we can stop
> >   unconditionally bootstrapping it.
>
> I would *really* like BSD ar to be used to build world regardless of
> host system version, at least on the tinderbox.  Isn't it possible to
> use GNU ar just for the toolchain, then BSD ar for the "real" world?
> Doesn't adding ar to bootstrap-tools take care of that?
>
> Note that the tinderbox *always* cross-builds, even when building for
> the platform it runs on.
>
BSD ar(1) depends on libelf and libarchive.  Do you know which
versions of them are safe to produce a working BSD ar(1)?


Cheers,
--
Ruslan Ermilov
[hidden email]
FreeBSD committer
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Ruslan Ermilov
In reply to this post by Ruslan Ermilov
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
[hidden email]
FreeBSD committer

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Dag-Erling Smørgrav
In reply to this post by Ruslan Ermilov
Ruslan Ermilov <[hidden email]> writes:
> BSD ar(1) depends on libelf and libarchive.  Do you know which
> versions of them are safe to produce a working BSD ar(1)?

__FreeBSD_version wasn't bumped specifically for it, but 700044 should
be fine (first bump after the last significant bug fix to ar support, as
far as I can tell)

DES
--
Dag-Erling Smørgrav - [hidden email]
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Ruslan Ermilov
On Fri, Feb 22, 2008 at 01:10:12PM +0100, Dag-Erling Sm??rgrav wrote:
> Ruslan Ermilov <[hidden email]> writes:
> > BSD ar(1) depends on libelf and libarchive.  Do you know which
> > versions of them are safe to produce a working BSD ar(1)?
>
> __FreeBSD_version wasn't bumped specifically for it, but 700044 should
> be fine

And for 8xxxxx?

> (first bump after the last significant bug fix to ar support, as
> far as I can tell)
>
After I commit my changes (I'll wait for a review from David),
we can play with these numbers.


Cheers,
--
Ruslan Ermilov
[hidden email]
FreeBSD committer
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Dag-Erling Smørgrav
Ruslan Ermilov <[hidden email]> writes:
> Dag-Erling Smørgrav <[hidden email]> writes:
> > __FreeBSD_version wasn't bumped specifically for it, but 700044
> > should be fine.
> And for 8xxxxx?

700044 is from before the branch, so anything > 700044 is fine.

DES
--
Dag-Erling Smørgrav - [hidden email]
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Kai Wang
In reply to this post by Ruslan Ermilov
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
> [hidden email]
> 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
> @@ -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>
> 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
> @@ -885,8 +885,13 @@ _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} \
> @@ -967,6 +972,10 @@ _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
> @@ -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

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

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Marcel Moolenaar-4
In reply to this post by Ruslan Ermilov
On Feb 22, 2008, at 2:24 AM, Ruslan Ermilov wrote:

>>> - Handle upgrades nicely: use GNU ar(1) during the build on older
>>>  systems, and use BSD ar(1) on newer systems.
>>
>> If we need GNU ar for the upgrade path - then lets just install it  
>> (and
>> its manage) as gnu-ar and let that be that.
>>
> I don't get you, GNU ar(1) is always installed.  Only the name is
> changes.  But let me explain more about the upgrades.
>
> Currently, we always build binutils as part of cross-tools, including
> GNU ar(1) and ranlib(1).  These binaries are then used during the  
> build.
> The BSD ar(1) doesn't need to be a cross-tool -- it doesn't depend on
> TARGET_ARCH/TARGET and is platform-neutral.

I'm very pleased to read this. Thank you Kai, Joseph and
Tim of course!

> Unfortunalely, since we provide the WITH_GNUAR option, we don't know  
> if
> /usr/bin/ar and /usr/bin/ranlib are GNU or BSD versions, so we should
> always bootstrap BSD ar(1).

Can we determine this at runtime by running ar -v. If
the output is more than 20 lines, it's GNU ar :-)

Seriously: we could run ar --version (provided we add
the support for that to BSD ar) and check the first
word. It's either GNU or BSD (provided the output of
BSD ar starts with BSD).

This should eliminate any and all kind of guessing and
should help in getting FreeBSD buildable on non-FreeBSD
systems as well.

Just a thought...

--
Marcel Moolenaar
[hidden email]


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Kai Wang
In reply to this post by Ruslan Ermilov
On Fri, Feb 22, 2008 at 01:24:09PM +0300, Ruslan Ermilov wrote:
> Currently, we always build binutils as part of cross-tools, including
> GNU ar(1) and ranlib(1).  These binaries are then used during the build.
> The BSD ar(1) doesn't need to be a cross-tool -- it doesn't depend on
> TARGET_ARCH/TARGET and is platform-neutral.  (I hope I'm right about it,
> otherwise it all doesn't make sense and cross-builds are broken.)

That's true, platform-neutral ELF parsing is a feature of libelf.

Kai
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Kai Wang
In reply to this post by Marcel Moolenaar-4
On Fri, Feb 22, 2008 at 09:52:32AM -0800, Marcel Moolenaar wrote:
>> Unfortunalely, since we provide the WITH_GNUAR option, we don't know if
>> /usr/bin/ar and /usr/bin/ranlib are GNU or BSD versions, so we should
>> always bootstrap BSD ar(1).
>
> Can we determine this at runtime by running ar -v. If
                                              ar -V
> the output is more than 20 lines, it's GNU ar :-)

That's true :-)

> Seriously: we could run ar --version (provided we add
> the support for that to BSD ar) and check the first
> word. It's either GNU or BSD (provided the output of
> BSD ar starts with BSD).

Also true, in order to be more compatible with Binutils ar, we added
long options support two weeks ago as suggested by Steve Kargl. Only
two long option is supported: --version and --help, and --version output
start with BSD.

> This should eliminate any and all kind of guessing and
> should help in getting FreeBSD buildable on non-FreeBSD
> systems as well.
>
> Just a thought...

well... I know little about build system, but this sounds to me
like a "hack"... Also ru@ pointed out using /usr/bin/ar to build
world is a bug, I think he's right and probably always bootstrap
'BSD' ar would be safer?

> --
> Marcel Moolenaar
> [hidden email]
>
>
> _______________________________________________
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[hidden email]"
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Marcel Moolenaar-4
On Feb 22, 2008, at 10:27 AM, Kai Wang wrote:

>> This should eliminate any and all kind of guessing and
>> should help in getting FreeBSD buildable on non-FreeBSD
>> systems as well.
>>
>> Just a thought...
>
> well... I know little about build system, but this sounds to me
> like a "hack"... Also ru@ pointed out using /usr/bin/ar to build
> world is a bug, I think he's right and probably always bootstrap
> 'BSD' ar would be safer?

I disagree, because following along those lines, we should
rebuild everything we possibly use for a build, including
/bin/sh. We only need to deal with bootstrapping and for
that we have the corresponding target. This means that if we
don't have BSD ar on the system (or we have it, but it's
missing features we use), we build it. Otherwise we just use
it.

Mind you: this is just expressing my view point. I don't
care in particular how we end up implementing it...

--
Marcel Moolenaar
[hidden email]


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Dag-Erling Smørgrav
Marcel Moolenaar <[hidden email]> writes:
> I disagree, because following along those lines, we should rebuild
> everything we possibly use for a build, including /bin/sh.

Yes, that's exactly what we do.

DES
--
Dag-Erling Smørgrav - [hidden email]
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Ruslan Ermilov
In reply to this post by Dag-Erling Smørgrav
On Fri, Feb 22, 2008 at 01:59:32PM +0100, Dag-Erling Sm??rgrav wrote:
> Ruslan Ermilov <[hidden email]> writes:
> > Dag-Erling Sm??rgrav <[hidden email]> writes:
> > > __FreeBSD_version wasn't bumped specifically for it, but 700044
> > > should be fine.
> > And for 8xxxxx?
>
> 700044 is from before the branch, so anything > 700044 is fine.
>
OK, I'm going to commit the attached patch in 12 hours,
unless I hear some objections.  It differs in that we
now bootstrap BSD ar on systems >700044, and that we call
GNU ar/ranlib with the "g" prefix instead of "gnu-".


Cheers,
--
Ruslan Ermilov
[hidden email]
FreeBSD committer

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

Dag-Erling Smørgrav
Ruslan Ermilov <[hidden email]> writes:
> OK, I'm going to commit the attached patch in 12 hours,
> unless I hear some objections.  It differs in that we
> now bootstrap BSD ar on systems >700044, and that we call
> GNU ar/ranlib with the "g" prefix instead of "gnu-".

Sounds good to me.

DES
--
Dag-Erling Smørgrav - [hidden email]
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

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

David O'Brien
In reply to this post by Ruslan Ermilov
On Sat, Feb 23, 2008 at 11:18:08PM +0300, Ruslan Ermilov wrote:
> now bootstrap BSD ar on systems >700044, and that we call
> GNU ar/ranlib with the "g" prefix instead of "gnu-".

Why are you going against my preferences for "gnu-" - if I liked "g"
I would have done it that way in my patch.


Its seems those that have expressed an opinion want to switch to the new
'ar' ASAP.  So why not this patch?

(BTW, what is the sort order in Makefile.inc1?  BOOTSTRAPPING date and
alphabetical?)


Index: Makefile.inc1
===================================================================
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.593
diff -u -p -r1.593 Makefile.inc1
--- Makefile.inc1 21 Jan 2008 18:44:54 -0000 1.593
+++ Makefile.inc1 24 Feb 2008 18:03:35 -0000
@@ -876,8 +876,13 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptre
 _crunchgen= usr.sbin/crunch/crunchgen
 .endif
 
+.if ${BOOTSTRAPPING} >= 700044
+_ar=     usr.bin/ar
+.endif
+
 bootstrap-tools:
 .for _tool in \
+    ${_ar} \
     ${_strfile} \
     ${_gperf} \
     ${_groff} \
Index: usr.bin/ar/Makefile
===================================================================
RCS file: /home/ncvs/src/usr.bin/ar/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- usr.bin/ar/Makefile 22 Feb 2008 06:53:52 -0000 1.19
+++ usr.bin/ar/Makefile 24 Feb 2008 17:53:29 -0000
@@ -1,10 +1,6 @@
 # $FreeBSD: src/usr.bin/ar/Makefile,v 1.19 2008/02/22 06:53:52 obrien Exp $
 
-.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>
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 24 Feb 2008 17:55:19 -0000
@@ -4,12 +4,7 @@
 
 .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
 
-.if defined(WITH_BSDAR)
 PROG= gnu-ar
-#MAN= gnu-ar.1
-.else
-PROG= ar
-.endif
 SRCS= ar.c not-ranlib.c
 CFLAGS+= -D_GNU_SOURCE
 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
@@ -21,4 +16,8 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
 DPADD+= ${RELTOP}/libiberty/libiberty.a
 LDADD= ${DPADD}
 
+CLEANFILES+= gnu-ar.1
+gnu-ar.1: ar.1
+ ln -sf ${.ALLSRC} ${.TARGET}
+
 .include <bsd.prog.mk>
Index: gnu/usr.bin/binutils/ranlib/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/binutils/ranlib/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- gnu/usr.bin/binutils/ranlib/Makefile 21 Feb 2008 16:59:02 -0000 1.17
+++ gnu/usr.bin/binutils/ranlib/Makefile 24 Feb 2008 17:56:21 -0000
@@ -4,12 +4,7 @@
 
 .PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
 
-.if defined(WITH_BSDAR)
 PROG= gnu-ranlib
-#MAN= gnu-ranlib.1
-.else
-PROG= ranlib
-.endif
 SRCS= ar.c is-ranlib.c
 CFLAGS+= -D_GNU_SOURCE
 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
@@ -21,4 +16,8 @@ DPADD+= ${RELTOP}/libbfd/libbfd.a
 DPADD+= ${RELTOP}/libiberty/libiberty.a
 LDADD= ${DPADD}
 
+CLEANFILES+= gnu-ranlib.1
+gnu-ranlib.1: ar.1
+ ln -sf ${.ALLSRC} ${.TARGET}
+
 .include <bsd.prog.mk>
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"

Reply | Threaded
Open this post in threaded view
|

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

David O'Brien
In reply to this post by Kai Wang
On Fri, Feb 22, 2008 at 06:00:07PM +0100, Kai Wang wrote:
> 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...

Why do we want

I don't like "gar" as that is pronounceable to the point I could easily
see that being the real name of an existing program.

Also, why do we want ports using gnu-ar specifically vs. what ever is our
native 'ar'?  If our native 'ar' isn't up to the task, we shouldn't be
doing this endeavor at all.

--
-- David  ([hidden email])
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"

1234