Target i686 on x86_64 platform
In the "./configure; make;" world I'm able to build 32-bit objects on a x86_64 host by setting the appropriate environment variables (CXXFLAGS,LDFLAGS,CPPFLAGS etc) to pass gcc the necessary flags. Using scons, as far as I can tell, the TARGET and ARCH arguments appear to be the way of doing this since scons doesn't use the usual variables (or any environment variables as I understand).
Anyway, if I set TARGET and ARCH ,it churns away showing the flags I specified in the compile lines but the build but dies a short way in, after issuing a g++ command without them. If I manually execute the line with the necessary flags it links up fine.
g++ -shared -o libs/soundtouch/libsoundtouch.so libs/soundtouch/AAFilter.os libs/soundtouch/FIFOSampleBuffer.os libs/soundtouch/FIRFilter.os libs/soundtouch/RateTransposer.os libs/soundtouch/SoundTouch.os libs/soundtouch/TDStretch.os libs/soundtouch/mmx_gcc.os libs/soundtouch/cpu_detect_x86_gcc.os
/usr/bin/ld: warning: i386 architecture of input file `libs/soundtouch/AAFilter.os' is incompatible with i386:x86-64 output
My scons command looks like this:
scons PREFIX=/usr/audio32 VST=1 FFT_ANALYSIS=1 ARCH="-m32 -march=k8 -O2 -pipe -L/usr/audio32/lib -I/usr/audio32/include" DIST_TARGET=i686
I'm not very (and by "very" by that I mean "at all") familiar with scons. Am I approaching this the wrong way?