Hi everyone.
I've installed (to non-default location) side version of glibc configured with
--host=pentium-linux , as my primary goal is to build statically linked executables for 32bit Pentium ISA.
To avoid problems of pairing my default gcc/g++ with my side glibc, I decided to install side version of GCC as well, using my side glibc as a sysroot. I configured GCC with
--with-sysroot=/path/to/my/glibc --target=i586-linux --disable-multilib --with-multilib-list=m32
GCC build goes for some time, then fails with
Code:
g++ -m32 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ -static-libgcc -o build/genconstants \
build/genconstants.o build/read-md.o build/errors.o ../build-x86_64-unknown-linux-gnu/libiberty/libiberty.a
/nfs/an/itools/em64t_SLES10/pkgs/gcc/4.8.0/.bin/../lib64/gcc/x86_64-suse-linux/4.8.0/../../../../x86_64-suse-linux/bin/ld: i386:x86-64 architecture of input file `../build-x86_64-unknown-linux-gnu/libiberty/libiberty.a(concat.o)' is incompatible with i386 output
I checked how those libiberty.a made, looks like it is a pack of *.o libraries, and each library is built with simple
gcc -O2 -g ...and different defines and source file...
No -march=pentium, no -m32, nothing.
Looks like my configure settings
--target=i586-linux --disable-multilib --with-multilib-list=m32 didn't affect all that is needed.
What do I do? Do I have to set CFLAGS/CXXFLAGS in addition?
Thanks a lot.