Compiling for i586 architecture - illegal instruction on executable

Florian Weimer fw@deneb.enyo.de
Sun Sep 27 14:05:00 GMT 2015


* Renato Mendes:

> Is the -march=i586 parameter the only thing needed ? Isn´t it logical
> to gcc to choose the correct 586 libraries in that case ?

Typically, there is only one set of libraries in a GCC installation,
at least for i386 targets.

> Does that Illegal instruction problem come from libraries that is
> linked using a 686 architecture ?

Probably.

> How can I tell the compiler to use the 585 libraries ?

You will have to rebuild the compiler with the appropriate flags, or
use an operating system that is compatible with the i586 architecture.
Debian should work.



More information about the Gcc-help mailing list