Boost logo

Boost-Build :

Subject: Re: [Boost-build] Uncertain cross compilation (arch=MIPS)
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-11-05 07:59:03


On Wednesday 05 November 2008 15:29:12 Чинков Андрей wrote:
> Hi.
>
> I continue my unsuccessful boost::serialization cross-build attempts.
>
> I had read
> 'http://www.boost.org/boost-build2/doc/html/bbv2/tasks/crosscompile.html'
> and followed simple instructions resulted there.
>
> I have to say I became I little bit confused because of next nodes:
>
> 1) I modified user-config.jam and inserted this string "using gcc :
> mipsel : mipsel-linux-uclibc-gcc ;" in "GCC configuration" section.
> 2) Then invoked in gnome-terminal (I have Linux host) :
>
> "cd $(BOOST_ROOT)/libs/serialization/build"
> "./bjam toolset=gcc-mipsel link=static"
>
>
> 3) As a result of it I got
> $(BOOST_ROOT)/bin.v2/libs/serialization/build/gcc-mipsel/debug/link-static/libboost_serialization-gcc-d-1_36.a
> 4) Then I tested this libboost_serialization-gcc-d-1_36.a with
> mipsel-lunux-uclibc-objdump and What there was my surprise when I saw
> that all objects in the library had elf32-little format :(. But objects
> format must be elf32-tradlittlemips (like cross-compiled libbost_regex.a
> has)!

Sorry, can you explain in more detail?

>
> I continue experiments and found out these:
> 5) I stupidly delete mipsel-linux-uclibc-gcc compiler from my PATH and
> repete in terminal:
>
> "rm -r $(BOOST_ROOT)/bin.v2"
> "cd $(BOOST_ROOT)/libs/serialization/build"
> "./bjam toolset=gcc-mipsel link=static"
>
> 6)
> $(BOOST_ROOT)/bin.v2/libs/serialization/build/gcc-mipsel/debug/link-static/libboost_serialization-gcc-d-1_36.a
> had built successfully - why??? There are not mipsel-linux-uclibc-gcc
> neither in my PATH nor at all specially !!! Is it because bjam use
> native gcc by default???

This is strange. What commands lines are used when you type:

        bjam toolset=gcc-mipsel link=static -a -n

? If it uses 'gcc', then make sure the compiler is actually in the PATH, then
post the output of

        bjam toolset=gcc-mipsel link=static --debug-configuration

> 7) And the last question (which does not give me rest) is how to specify
> cross-archiver, cross-assembler, i.e. cross-binutils to bbv2???

If your entire toolchain is installed in the same place, you don't have to
specify anything -- the archiver alongside the compiler shall be used.
And you never have to specify assembler and linker, because gcc finds them
internally -- they are not invoked explicitly by Boost.Build.

- Volodya


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