Boost logo

Boost-Build :

Subject: Re: [Boost-build] #7706 : cross compiling of threads library - JamFile.v2
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2012-12-10 11:02:06


Jürgen Hunold-2 wrote
> Hi Vicente,
>
> On Sunday, 9. December 2012 16:59:28 Vicente J. Botet Escriba wrote:
>> Le 09/12/12 16:00, Steven Watanabe a écrit :
>> > What is properties? Where is it defined?
>> > If it's undefined, then it's treated as
>> > an empty list, so the test is, of course, false.
>>
>> You are right. the variable properties is not seen in this function. Do
>> you know how cross compile?
>
> It seems that you can't get properties outside of the project rule. I've
> done
> some (quick) experimenting. Running
>
> b2 -j4 gcc-msvc target-os=windows
>
> on this hack at least creates "bin.v2/libs/thread/build/gcc-mingw-
> msvc/debug/target-os-windows/threadapi-win32/libboost_thread_win32.dll.a"
> which looks right.
>
> The patch contains a lot of debug echos and needs some cleanup.
>
> the basic idea is to use the "conditional" property to select the right
> api
> via a modified "check_default_threadapi" copied from "default api"
>
>
> <conditional>
> @check_default_threadapi
>
> This will at least start compilation. Setting the default api and thus
> eliminating the "win32" and "pthread" suffix is unresolved. Maybe Steven
> can
> help with this rather advanced problem.
>
> I hope this helps.

Yes , this is much better. I'm getting the following while building on
windows:

b2 toolset=msvc -a
set props
check props <abi>ms <asynch-exceptions>off <binary-format>pe
<debug-store>object <debug-symbols>on <embed-manifest>on
<exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true
<host-os>windows <inlining>off <install-dependencies>off
<interthreadapi>win32 <library>/boost/system//boost_system <link>shared
<midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on
<preserve-test-targets>on <profiling>off <python-debugging>off <python>2.5
<rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native
<strip>off <suppress-import-lib>false <symlink-location>project-relative
<target-os>windows <threadapi>pthread <threading>multi
<toolset-msvc:version>10.0 <toolset>msvc <user-interface>console
<variant>debug <warnings-as-errors>off <warnings>all
************************************************************
Trying to build Boost.Thread with pthread support.
If you need pthread you should specify the paths.
You can specify them in site-config.jam, user-config.jam
or in the environment.
For example:
PTW32_INCLUDE=C:\Program Files\ptw32\Pre-built2\include
PTW32_LIB=C:\Program Files\ptw32\Pre-built2\lib
************************************************************

So there is something wrong yet. I will try to understand better how all
this work.

BTW, how can the set props and check props traces be disabled?

Thanks,
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/7706-cross-compiling-of-threads-library-JamFile-v2-tp4639721p4639803.html
Sent from the Boost - Build mailing list archive at Nabble.com.

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