MRW
http://piratenpartei.ch

Piratenpartei Zürich
PC 85-112704-0

Der Politnetz Auftritt von Marc Wäckerlin Im Politnetz unterstützen

Cross Compile 32bit code on Linux 64bit System

Qt requires QMAKESPEC. The CC="gcc -m32" and CXX="g++ -m32" variable has to be set additionally, if the makefile is buggy (such as in libproxy).

QMAKESPEC="linux-g++-32" \
  CFLAGS="-m32" \
  CXXFLAGS="-m32" \
  LDFLAGS="-m32 -L/usr/lib32 -L/usr/local/lib32" \
  ./configure \
  --build=i686-pc-linux-gnu \
  --host=i386-pc-linux-gnu \
  --bindir=/usr/local/bin32 \
  --libdir=/usr/local/lib32
make clean all
sudo make install
make clean

Cross Compile for Windoze using MinGW

Similar:

QMAKESPEC="cross-mingw-g++" ./configure \
  --prefix=/opt/local/i586-mingw32msvc \
  --build=i686-pc-linux-gnu \
  --host=i586-mingw32msvc
make clean all
sudo make install
make clean

CrossCompile libz zlib-1.2.5 on Linux for MinGW

When you get an Error «cannot find -lc», just call the last line without -lc and run make again.

RANLIB=i586-mingw32msvc-ranlib \
  AR=i586-mingw32msvc-ar \
  CC=i586-mingw32msvc-gcc \
  CXX=i586-mingw32msvc-g++ \
  ./configure --prefix=/opt/local/i586-mingw32msvc
make
[...]
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/bin/ld: cannot find -lc
[...]
i586-mingw32msvc-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_VIZ -o libz.so.1.2.5 adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo -L. libz.a
make
sudo make install