|
Boost-Build : |
Subject: Re: [Boost-build] generating headers out of Jamfile
From: Vladimir Prus (ghost_at_[hidden])
Date: 2011-01-30 10:13:49
On Sunday, January 30, 2011 18:02:13 Oliver Kowalke wrote:
> >> <abi> and<binary-format> are required because the target os may
> >> support different ABIs (for instance MIPS supports multiple ABIs: o32,
> >> n32, n64, o64, eabi)
> >
> > Is there a gcc option to control this? Can gcc reveal the default abi? If
> > so, I am sure an 'abi' feature can be made to have always have a value
> > when you have MIPS gcc.
>
> AFAIK the 'default' ABI may vary between the gcc releases.
>
> gcc options for the ABI are:
> -mabi=32 (default for 32bit)
> -mabi=o64
> -mabi=n32
> -mabi=64 (default for 64bit)
> -mabi=eabi
>
> but I doesn't matter what is the 'default' ABI of gcc (or what compiler
> ever) - important is for which ABI the target-os is compiled (compiling
> an app with a different ABI than the target-os may not always work ->
> depends if ABIs are compatible).
> For instance you can create an LINUX System for ABI o32 or n64 (see
> http://www.t2-project.org/).
>
> gcc predefined macro (_MIPS_SIM) for mips:
>
> o32: _MIPS_SIM = _ABIO32
> n32: _MIPS_SIM = _ABIN32
> n64: _MIPS_SIM = _ABI64
>
> I know it is cumbersome to collect all this stuff for several
> architectures (AMR, X86, MIPS, PowerPC, Sparc)
I think the question here is what Boost.Build should do when you build with MIPS gcc
and don't specify any abi explicitly:
1. Just invoke gcc without any options, and set <abi> property to whatever default value gcc
has.
2. Invoke gcc with the option that matches OS built properties. In that case, we need a
way to discover how OS was built.
It seems to me that (1) might be better approach, because it is easlier to explain and understand.
Further, if default abi of system gcc differs from the abi used for the system, it means
that gcc was invoked with explicit abi options to build that system, and it's reasonable to
ask the user to specify abi=xxx explicitly when using Boost.Build, too.
What do you think?
- Volodya
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build: 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