Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-04-12 07:59:10

Hi Max,
> Hi.
> I tried to use Boost.Build V2 to build applications for some custom
> embedded system. The building process uses modified GCC tools and has
> complicated linking stage whch consist of three steps:
> 1) *.o and *.a files are linked to,
> 2) and *.a are linked to app.yyy (with linking scripts different
> from previous step),

So, the input *.a files are used twice?

> 3) app.yyy is converted to app.zzz, that is an executable.
> I'm writing custom toolset module and my question is how to write a link
> rules/actions correctly.
> Should I use a generators? I tried this code, but I don't like it


> and it
> does't work:

In what way?
> type.register XXX : xxx ;
> generators.register-composing egcc.xxxlink : OBJ SEARCHED_LIB STATIC_LIB
> : XXX : <toolset>egcc ;
> type.register YYY : yyy ;
> generators.register-composing egcc.yyylink : XXX SEARCHED_LIB STATIC_LIB
> : YYY : <toolset>egcc ;

You mean that .a files are used only when creating, but not when
creating app.yyy?

In this case, you'll have to write your own generator class. For example, did
you read:

The last code examples override the 'run' rule of a generator. You can use it
to select all .a targets and then
- construct XXX from all sources
- construct YYY from XXX and all .a files
- construct ZZZ

When construction can be done by recursive call to generators.construct.


Vladimir Prus
Boost.Build V2:

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at