I would like to build an application for i386 architecture but currently I'm running x86_64 OS and shared libraries which I use to link to generate application binaries are built for i386 architecture. If I run file command on shared libraries I use I get following output
ELF 32-bit LSB shared object, Intel 80386, version 1 (S│Size: 13064788 SV), dynamically linked, not stripped
But gcc skips this shared library saying it as incompatible one. So I was just wondering is there any option with which I can tell GCC to compile for i386 architecture rather than for my native machine architecture?
Yes I've gone through many cross compilation questions on this forums but I didn't fully understand the funda as I'm new to cross compilation stuffs. Does cross compilation requires me to have a gcc which is built for same architecture as the architecture for which I'm trying to compile? Is use of tool chains like binutils is mandatory for cross compilation?
I'm using a simple handwritten make file and not using any tool specific tool chains.
Thanks in Advance