Boost logo

Boost Users :

Subject: Re: [Boost-users] bjam cross compilation using mingw32 doesn't use mingw32-ar ?
From: Juergen Hunold (juergen.hunold_at_[hidden])
Date: 2009-02-22 14:27:11


Hi Volodya !

On Sunday 22 February 2009, Vladimir Prus wrote:

> > using gcc : 4.2 : /usr/bin/i586-mingw32msvc-g++
> >
> > : # options
> >
> > <rc>i586-mingw32msvc-windres
> > <archiver>i586-mingw32msvc-ar
> > ;
> >
> > You need to explicitly state <rc>, too. Else Boost.Build will
> > simply use the "null" fallback using an empty object file.
>
> Is there a bug report about this in some tracker?

No. And I'm not sure if this is actually a bug :-))
I had a hard time tracking this one, but it the end it was a classic
"read and understand the docs" issue. You just have to do some more work
for cross-compilation.
Anyway, I think my user-config.jam entry should be put into the
Boost.Build docs. And without the path:
 using gcc : 4.2 : i586-mingw32msvc-g++
             : # options
            <rc>i586-mingw32msvc-windres
            <archiver>i586-mingw32msvc-ar
        ;

The key to all this might be related to my old friends "address-model"
and "architecture" :-)): How to detect the target platform and which
things to trigger .
In my case: detect that "i586-mingw32msvc-g++" is indeed a cross
compiler, forcing "target-os=windows". And detecting the rest of the
toolchain with prefix "i586-mingw32msvc-" and adjusting the toolset to do
the right thing. And I think that this is quite hard at the moment while
using bjam's limited regex engine.
And remember: There are at least two packages involved: gcc and
binutils. And in theory, you can configure both to use _different_
prefixes. But I doubt anyone will actually do this.

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net