|
Boost-Build : |
Subject: Re: [Boost-build] Native-built tools in a cross-compile environment
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-10-23 15:36:57
AMDG
On 10/22/2012 05:03 PM, Kylo Ginsberg wrote:
> Ok I spoke too soon. That solution works *except* for the following:
>
> The tool is linked against static libraries, and I have a target
> shared library which uses that tool. For reasons I don't follow, the
> cross build of that shared library ends up linking against *native*
> versions of those static libraries. Strange.
>
The problem is in Boost.Build's handling of
static libraries (In some cases, static libraries
can be propagated upwards too far):
You can work around this with something like:
class kill-usage-requirements : alias-target-class
{
import property-set ;
rule compute-usage-requirements ( subvariant )
{
return [ property-set.empty ] ;
}
}
import project ;
import targets ;
rule my-alias ( name : sources + )
{
return [ targets.create-metatarget kill-usage-requirements
: [ project.current ] : $(name) : $(sources) ] ;
}
my-alias text-to-c : text-to-c//text-to-c ;
I've made a reduced test case for this that
works with any toolset. I'm not exactly
sure how to go about fixing it yet, though.
In Christ,
Steven Watanabe
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