So I know that the boost libraries are primarily header-only but there are a few which require compilation, for example Boost.Thread. In Darwin, how do I compile these and pass the -m32 flag so they can be compiled into a 32-bit (i386) binary? There's this Jamroot thing which I've never heard of and I am not sure at all where to start.
Clarification: I'm not asking how to compile a program with -m32 flag and use the boost libraries. I'm asking how to compile the Boost libraries themselves with the -m32 flag.
To specify what architecture to compile for, specify the architecture
feature when invoking b2.
To specify compiler options that don't already have built-in features, specify the cxxflags
feature when invoking b2.
To specify linker options that don't already have built-in features, specify the linkflags
feature when invoking b2.
All of these are listed in the Boost.Build docs.
From what I understand, and if I read the documentation correctly, the way to build a particular architecture of boost is with the "address-model=xx" option for b2.
EXAMPLES:
b2 install toolSET=msvc-9.0 link=shared variant=release address-model=64
or
b2 install toolSET=msvc-9.0 link=shared variant=release address-model=32
Hope that helps.
Regards,
-RMWChaos
EDIT: Found another SO Thread providing the same answer here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With