Boost logo

Boost Users :

Subject: [Boost-users] compiling 32 bit boost libraries on a 64 bit system? (gcc, Linux)
From: Ákos Maróy (akos_at_[hidden])
Date: 2009-02-18 15:02:00


Hi,

I'm trying to compile boost into 32 bit libraries on a 64 bit Linux box.
with gcc, with would simply mean to add the flag -m32 to gcc.

but I can't seem to make bjam do this.

I've tried a number of approaches:

- export and set the environment variables CFLAGS, CXXFLAGS and LDFLAGS
to -m32

- set the following in tools/build/v2/user-config.jam:

cflags=-m32
cxxflags=-m32
linkflags=-m32

- set the following in tools/build/v2/user-config.jam:

using gcc : 4.1.2 : g++-4.1.2 : -m32 ;

(based on the documentation found at
http://beta.boost.org/doc/tools/build/doc/html/bbv2/reference/tools.html#bbv2.reference.tools.compiler.gcc
)

but to no avail - the -m32 flag is not honored, and the compiled boost
libraries are 64 bit :(

what am I doing wrong?

Akos


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