
Hello, I am trying to cross compile boost for an embedded processor that has its own gcc and g++ compiler. What are the options I need to invoke so that the make uses these compilers instead of gcc? Also, can you tell me the simpliest way to test it? Thanks, Esteban

Yepez, Esteban wrote:
Hello,
I am trying to cross compile boost for an embedded processor that has its own gcc and g++ compiler. What are the options I need to invoke so that the make uses these compilers instead of gcc?
See: http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html
Also, can you tell me the simpliest way to test it?
To test what? I do not think that cross-testing is current supported, unless the OS on your host machine is configured to transparently execute target OS binaries. - Volodya

Here's the problem, My platform isn't on the supported os list. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Vladimir Prus Sent: Thursday, January 29, 2009 11:44 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Cross compiling Yepez, Esteban wrote:
Hello,
I am trying to cross compile boost for an embedded processor that has its own gcc and g++ compiler. What are the options I need to invoke so that the make uses these compilers instead of gcc?
See: http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html
Also, can you tell me the simpliest way to test it?
To test what? I do not think that cross-testing is current supported, unless the OS on your host machine is configured to transparently execute target OS binaries. - Volodya _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

An update... I found the link that tells me how to build Bjam, but I run into a problem on the last part of the script: if test -x "./bootstrap/jam0" ; then if test "${BJAM_UPDATE}" != "update" ; then echo "bjam update = update" # echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean fi echo "no update, just build" # echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" Fi Because I have cross-compiled, I am not able to execute build.jam on the host. However when I try to execute on the target, the compiler is only on the host and the toolset I defined is not recognized! Yes, I copied the entire src directory into the target. _____________________________________________ From: Yepez, Esteban Sent: Thursday, January 29, 2009 11:23 AM To: 'boost-users@lists.boost.org' Subject: Cross compiling Hello, I am trying to cross compile boost for an embedded processor that has its own gcc and g++ compiler. What are the options I need to invoke so that the make uses these compilers instead of gcc? Also, can you tell me the simpliest way to test it? Thanks, Esteban

AMDG Yepez, Esteban wrote:
An update… I found the link that tells me how to build Bjam, but I run into a problem on the last part of the script: if test -x "./bootstrap/jam0" ; then if test "${BJAM_UPDATE}" != "update" ; then echo "bjam update = update" # echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean fi echo "no update, just build" # echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" Fi Because I have cross-compiled, I am not able to execute build.jam on the host. However when I try to execute on the target, the compiler is only on the host and the toolset I defined is not recognized! Yes, I copied the entire src directory into the target.
To build bjam you must use a compiler for the host because bjam has to run on the host. There's no way around this. In Christ, Steven Watanabe

steve- yeah i understand. However, I don't know how to tell the last stage to use my embedded compiler. That is the following command fails: echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean because it doesn't recognize the toolset=tile. For some reason, the makefile doesn't go back and set the BOOST_JAMCC=tile-gcc ________________________________________ From: boost-users-bounces@lists.boost.org [boost-users-bounces@lists.boost.org] On Behalf Of Steven Watanabe [watanabesj@gmail.com] Sent: Thursday, January 29, 2009 7:35 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Cross compiling AMDG Yepez, Esteban wrote:
An update… I found the link that tells me how to build Bjam, but I run into a problem on the last part of the script: if test -x "./bootstrap/jam0" ; then if test "${BJAM_UPDATE}" != "update" ; then echo "bjam update = update" # echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean fi echo "no update, just build" # echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" Fi Because I have cross-compiled, I am not able to execute build.jam on the host. However when I try to execute on the target, the compiler is only on the host and the toolset I defined is not recognized! Yes, I copied the entire src directory into the target.
To build bjam you must use a compiler for the host because bjam has to run on the host. There's no way around this. In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Yepez, Esteban wrote:
steve-
yeah i understand. However, I don't know how to tell the last stage to use my embedded compiler.
What "last stage"
That is the following command fails: echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean
because it doesn't recognize the toolset=tile. For some reason, the makefile doesn't go back and set the BOOST_JAMCC=tile-gcc ________________________________________
Oh, don't use configure/makefile. First build bjam yourself (for host), then build by directly invoking bjam. - Volodya

the problem is that I don't know how to tell jam to use my embedded compiler when it tries to generate build.jam sh ./build.sh Yes, initially, I had modified the build.sh and set BOOST_JAM_CC=tile-gcc. But like you said, I want to use the host compiler in the first stage and the target compiler to do the last bit. So I still get an error because it doesn't pick up the embedded compiler tile-gcc ________________________________________ From: boost-users-bounces@lists.boost.org [boost-users-bounces@lists.boost.org] On Behalf Of Vladimir Prus [vladimir@codesourcery.com] Sent: Thursday, January 29, 2009 11:40 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Cross compiling Yepez, Esteban wrote:
steve-
yeah i understand. However, I don't know how to tell the last stage to use my embedded compiler.
What "last stage"
That is the following command fails: echo_run ./bootstrap/jam0 -f build.jam --toolset=tile "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean
because it doesn't recognize the toolset=tile. For some reason, the makefile doesn't go back and set the BOOST_JAMCC=tile-gcc ________________________________________
Oh, don't use configure/makefile. First build bjam yourself (for host), then build by directly invoking bjam. - Volodya _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Yepez, Esteban wrote:
the problem is that I don't know how to tell jam to use my embedded compiler when it tries to generate build.jam
sh ./build.sh
When building bjam, with "./build.sh", you don't need to use your embedded compiler. bjam is purely host binary, it does not know anything about the compiler that will be used later.
Yes, initially, I had modified the build.sh and set BOOST_JAM_CC=tile-gcc. But like you said, I want to use the host compiler in the first stage
Yes, so you build bjam for the host.
and the target compiler to do the last bit.
So I still get an error because it doesn't pick up the embedded compiler tile-gcc
After you've build bjam for the host, you follow instructions at: http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html which shows both where to specify the compiler command, and how to request that this compiler be used. Did you try those instructions? - Volodya

________________________________________ From: boost-users-bounces@lists.boost.org [boost-users-bounces@lists.boost.org] On Behalf Of Vladimir Prus [vladimir@codesourcery.com] Sent: Friday, January 30, 2009 12:08 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Cross compiling Yepez, Esteban wrote:
the problem is that I don't know how to tell jam to use my embedded compiler when it tries to generate build.jam
sh ./build.sh
When building bjam, with "./build.sh", you don't need to use your embedded compiler. bjam is purely host binary, it does not know anything about the compiler that will be used later.
Yes, initially, I had modified the build.sh and set BOOST_JAM_CC=tile-gcc. But like you said, I want to use the host compiler in the first stage
Yes, so you build bjam for the host.
and the target compiler to do the last bit.
So I still get an error because it doesn't pick up the embedded compiler tile-gcc
After you've build bjam for the host, you follow instructions at: http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html which shows both where to specify the compiler command, and how to request that this compiler be used. Did you try those instructions?
THESE INSTRUCTIONS TELL YOU TO INDICATE AN ALTERNATIVE TOOLSET. HOW DO YOU CREATE A TOOLSET. THAT IS I WANT IT TO PICK UP A CC THAT IS NOT CURRENTLY SUPPORTED.
- Volodya _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Yepez, Esteban wrote:
After you've build bjam for the host, you follow instructions at:
http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html
which shows both where to specify the compiler command, and how to request that this compiler be used. Did you try those instructions?
THESE INSTRUCTIONS TELL YOU TO INDICATE AN ALTERNATIVE TOOLSET. HOW DO YOU CREATE A TOOLSET. THAT IS I WANT IT TO PICK UP A CC THAT IS NOT CURRENTLY SUPPORTED.
Previously, you have said: > I am trying to cross compile boost for an embedded processor that has its own gcc and > g++ compiler. So, it's not a new compiler, it is just gcc. Then, you should do exactly what the doc say: 1. Put this in user-config.jam: using gcc : tile : tile-g++ ; 2. Add this to bjam command line: toolset=gcc-tile - Volodya
participants (3)
-
Steven Watanabe
-
Vladimir Prus
-
Yepez, Esteban