|
Boost-Build : |
Subject: Re: [Boost-build] generating headers out of Jamfile
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2011-01-30 10:37:37
Oliver Kowalke wrote:
> Am 30.01.2011 16:13, schrieb Vladimir Prus:
>> 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?
>
> I would prefer the second item but I'm not familiar with boost.build - I
> thought it could evaluate the environment and set the related properties
> (if <abi> is not an optional property).
>
> If possible it has to compile and execute a test app:
>
> #if defined(__gcc__)
> #if defined(__mips__)
> #if _MIPS_SIM == _ABIO32
> fprintf(stdout,"o32 abi\n");
> #elif _MIPS_SIM == _ABIN32
> fprintf(stdout,"n32 abi\n");
> #elif _MIPS_SIM == _ABI64
> fprintf(stdout,"n64 abi\n");
> #else
> #error "unknown MIPS ABI"
> #endif
> #elif defined(__ppc__)
> ...
>
> I can help a little bit to collect the predefined macros.
Wait -- but it this will test GCC default ABI. To check what the system (=kernel, libc)
was built with you probably need to look at /proc, and that's only possible when
building natively.
- Volodya
-- Vladimir Prus Mentor Graphics +7 (812) 677-68-40
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