Boost logo

Boost-Build :

Subject: Re: [Boost-build] bug? bultin properties not set
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2010-04-02 10:03:47


Vladimir Prus schrieb:
> Rene Rivera wrote:
>> Oliver Kowalke wrote:
>>> Rene Rivera schrieb:
>>>> Oliver Kowalke wrote:
>>>>> bjam --debug-building does notcontain the builtin properites such
>>>>> as <architecture>, <address-model>, <instruction-set>. But
>>>>> <target-os> is set. Because the User Handbook doesn't tell anything
>>>>> why some of the bultin props are not set (props of the target
>>>>> os/platform) I assume it is a bug.
>>>>> May this be correct?
>>>>
>>>> Those three properties you mention, architecture, address-model, and
>>>> instruction-set, are defined as optional. Hence they are not set by
>>>> default. This fits the model of compilers to have a default for
>>>> those that they compile to.
>>>
>>> Does boost.build provide functions returning the correct values or do
>>> I have to implement those by myself?
>>
>> I'm not sure what you are asking here. Do you want some programatic
>> way to find out what the compilers default values are? Or do you want
>> to know what the possible values BBv2 has for those?
>>
>> For the latter they are listed in builtin.jam
>> <https://svn.boost.org/trac/boost/browser/trunk/tools/build/v2/tools/builtin.jam#L235>.
>> Note that the ability to actually specify those and have them take
>> effect in building depends on whether the toolset has mappings for
>> them to the corresponding compiler options. BUt you can always specify
>> them and then add your own options based on them.
>
> Note that I do plan to automatically set at least address-model based on
> discovered
> information from gcc -- but this is likely to be only available for gcc.

I need to know for which architecture, address-model the code has to be
compiled (choosing the correct assembler code).
The build must work if the user specifies/doesn't specify the properties
on command line:

bjam toolset=gcc address-model=64 architecture=ppc
bjam toolset=intel architecture=x86_64

I used target-alternatives in order to added/exclude asm from the build.

Unfortunately the builtin properties are not set by default.

Oliver

...
alias context_sources
    : detail/fcontext_i386_sysv_gas.asm
      detail/info_base_fcontext.cpp
    : <address-model>32
      <architecture>x86
      <linkage>ELF
      <toolset>gcc
    ;

alias context_sources
    : detail/fcontext_x86_64_sysv_gas.asm
      detail/info_base_fcontext.cpp
    : <address-model>64
      <architecture>x86
      <linkage>ELF
      <toolset>gcc
    ;

alias context_sources
    : detail/fcontext_i386_windows_masm.asm
      detail/info_base_fcontext.cpp
    : <address-model>32
      <architecture>x86
      <assembler>ml
      <target-os>windows
      <toolset>msvc
    ;

...


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