Skip to content
Advertisement

CPU you selected doesn’t support x86-64 instruction set

I want to compile a program which has lots of 32-bit static libraries which I cannot recompile to 64-bit because the lack of makefiles but there are some libraries that I should compile to obtain some static libraries to use alongside them.

One of the libraries that I want to compile has a Makefile as follows :

JavaScript

Which results in the following output :

JavaScript

If I omit the option -mtune=i386 it would compile successfully but then I should compile the rest of the libraries as 64-bit binaries and at the end I won’t be able to link against those static 32-bit ones.

How can I eliminate that error?

Any suggestion would be appreciated.

Advertisement

Answer

To compile 32-bit code on a 64-bit system, use the option -m32 to gcc. -mtune=i386 is not correct.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement