There. Both -m32 and -mx32 flags will work fine. You can have cross compilers installed at the same time. And to boot, no potential for cross-contamination between platform specific macros.
Hopefully, we can agree that a symlink at /usr/include/asm is universally wrong? You can't have platform specific defines in a common include directory for all gcc targets? Maybe we can file a bug against gcc-multilib, and move on?
Perhaps the symlink at /usr/include/asm is better suited elsewhere?
The cpp include path for i386 (-m32 flag), is as follows:
foo ~ $ gcc -m32 -Wp,-v test.c include/ i386-linux- gnu" gcc/x86_ 64-linux- gnu/4.8/ ../../. ./../x86_ 64-linux- gnu/include" gcc/x86_ 64-linux- gnu/4.8/ include gcc/x86_ 64-linux- gnu/4.8/ include- fixed i386-linux- gnu
ignoring nonexistent directory "/usr/local/
ignoring nonexistent directory "/usr/lib/
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/
/usr/local/include
/usr/lib/
/usr/include/
/usr/include
End of search list.
And for the armhf toolchain ...
foo ~ $ arm-linux- gnueabihf- gcc -Wp,-v test.c include/ arm-linux- gnueabihf" arm-linux- gnueabihf" gcc-cross/ arm-linux- gnueabihf/ 4.8/include gcc-cross/ arm-linux- gnueabihf/ 4.8/include- fixed gcc-cross/ arm-linux- gnueabihf/ 4.8/../ ../../. ./arm-linux- gnueabihf/ include
ignoring nonexistent directory "/usr/local/
ignoring nonexistent directory "/usr/include/
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/
/usr/lib/
/usr/lib/
/usr/include
Wouldn't it be better to allow gcc to find i386 specific asm defines in /usr/include/ i386-linux- gnu/asm?
# rm -f /usr/include/asm i386-linux- gnu x86_64- linux-gnux32
# ln -s x86_64-linux-gnu /usr/include/
# ln -s x86_64-linux-gnu /usr/include/
There. Both -m32 and -mx32 flags will work fine. You can have cross compilers installed at the same time. And to boot, no potential for cross-contamination between platform specific macros.
Hopefully, we can agree that a symlink at /usr/include/asm is universally wrong? You can't have platform specific defines in a common include directory for all gcc targets? Maybe we can file a bug against gcc-multilib, and move on?