Boost logo

Boost Users :

Subject: Re: [Boost-users] [cross-compiling]
From: Jürgen Hunold (juergen.hunold_at_[hidden])
Date: 2011-07-26 13:47:05

Hi Donald,

On Tuesday, 26. July 2011 18:50:24 Wilde, Donald S wrote:
> We have a somewhat tricky cross-compile, and I’m hoping I can get some
> feedback to help me be sure that I’m doing this right.
> In my user-config.jam, I (think I) need to put the following line:
> Using gcc : 4.5.1 : : “/path/to/target/compiler” <compileflags>
> -I/path/to/sdk/includes <cxxflags> -std=c++0x <cflags> -Wall –march=atom
> Does that sound right?

No, you should have the compiler in the colon seperated segment after the
version and the flags last.

This is what I use for arm:

using gcc : 4.2~arm
          : # compile-command
          : # options

Please remove the spaces in "<cxxflags> -std=c++0x" and add a <cflags>, even
better <compileflags> for each option. Or use quotes around them.

> Does boost depend on standard precompiled libraries
> like

Yes. This should work. For static libs you should specify the archiver from
your cross toolchain as seen above.

> I’ve been bit by having the system crash hard in different places, and I
> suspect that sometimes this is caused by the fact that the host is i686
> linux and the target is an atom-based SoC with custom linux libraries.
> Boost wants to pull them from the host, so I need to tell it everything it
> should NOT pull silently. Correct?

Most likely. But those normally result in obscure linker errors.

> Do I also need a <linkflags> -L/path/to/target/lib/directory?

Should be on the safe side, yes.

Please run "b2 -n" first to check if all your flags are on the command and link



* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        !
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at