Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-05-18 06:35:06


On Wednesday 17 May 2006 18:36, Rene Rivera wrote:

> >> + #~ If it's not a system gcc install we should adjust the various
> >> + #~ programs as needed to prefer using the install specific
> >> versions. + #~ This is essential for correct use of MinGW and for
> >> cross-compiling. + local archiver =
> >> + [ common.get-invocation-command gcc
> >> + : ar : [ feature.get-values <archiver> : $(options) ] :
> >> $(bin)
> >>
> >> : PATH ] ; + flags gcc.archive .AR $(condition) : $(archiver[1]) ;
> >>
> >> + if $(.debug-configuration)
> >> + {
> >> + ECHO notice: using gcc archiver :: $(condition) ::
> >> $(archiver[1]) ; + }
> >> }
> >
> > Rene, can you clarify why we need to use 'ar' specific to the compiler?
> >
> > The problem is that this change makes gcc use the .AR variable. The
> > gcc.archive action is inherited by intel-linux, but the .AR variable is
> > not set for intel-linux, so static linking with intel-linux does not
> > work.
> >
> > I'd like to fix this, but first would like to fully understand the change
> > you've did.
>
> I thought the comment explained it :-\ Basically it's possible to
> install a GCC system, for cross-compiling or standalone, such that all
> the binaries of the support programs are in a path local to the compiler
> install location. This is the case with MinGW which, because Windows
> doesn't have anything like a system archiver, has this in the compiler

Ah, I see. The think that surprised me was the "Prefer" word from your
comment. I was under impression that 'ar' works the same way since ice age,
so it should not matter if you use system one or the one specific to
compiler. If this is just for cases when there's no system ar at all, this is
quite reasonable.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk