|
Boost Users : |
From: Grant Erickson (gerickson_at_[hidden])
Date: 2008-07-30 15:45:17
On 7/30/08 11:29 AM, Grant Erickson wrote:
> I have been attempting to generate a build environment for boost in which two
> targets are involved:
>
> 1) Native GCC (Whatever the host build system is)
> 2) DENX ELDK 4.1 (PowerPC 4xx / Linux)
>
> With the assumption that (1) and (2) are both GCC-based, I have (1) working
> well enough. However, the information at:
>
> http://lists.boost.org/boost-users/2007/01/24400.php
>
> Seems stale for 1.35.0 in that GCC_ROOT_DIRECTORY, GCC and GXX are no longer
> referenced. My general recipe in my top-level "glue" makefile is as follows,
> with commands to extract the source, build a link farm, build any objects and
> install the library:
>
> BoostArchive = boost_1_35_0.tar.gz
> BoostSource = boost_1_35_0
>
> BoostConfigure = $(BuildDirectory)/configure
> BoostMakefile = $(BuildDirectory)/Makefile
> BoostUserConfig = $(BuildDirectory)/user-config.jam
>
> BoostLibraries = filesystem \
> thread
> BoostLibrariesList = $(subst $(SPACE),$(COMMA),$(strip
> $(BoostLibraries)))
>
> [ snip ]
>
> $(BoostMakefile) $(BoostUserConfig): $(BoostConfigure)
> cd $(BuildDirectory) && \
> BJAM_CONFIG="" \
> $(BoostConfigure) \
> --prefix=$(ResultDirectory) \
> --with-toolset=gcc \
> --without-icu \
> --with-libraries=$(BoostLibrariesList)
For those following this thread or tuning in from Google, thanks to Pete
Goodliffe's post at:
http://goodliffe.blogspot.com/2008/05/cross-compiling-boost.html
I simply modified my configuration target as follows to add post-processing
of the user-config.jam:
$(BoostToolset) = gcc
$(BoostMakefile) $(BoostUserConfig): $(BoostConfigure)
cd $(BuildDirectory) && \
configure \
--prefix=$(ResultDirectory) \
--with-toolset=$(BoostToolset) \
--without-icu \
--with-libraries=$(BoostLibrariesList)
sed -e
"s,^\(using\)[[:space:]]\+\($(BoostToolset)\)[[:space:]]\+;,\1 \2 : :
$(CXX) ;,g" \
< $(BoostUserConfig) > $(BoostUserConfig).N
mv -f $(BoostUserConfig) $(BoostUserConfig).O
mv -f $(BoostUserConfig).N $(BoostUserConfig)
replacing:
using gcc ;
with:
using gcc : : /usr/local/eldk/4.1/usr/bin/ppc_4xx-g++
for the cross-compiled target case or:
using gcc : : /usr/bin/g++
for the native case. I assume then there's a similar way to munge the
user-config.jam to override the OS guess of 'linux'?
I then pass BJAM_CONFIG as for my build and install targets:
BJAM_CONFIG="--layout=system --build-type=minimal"
Thanks Pete!
Regards,
Grant
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net