osxcross
osxcross copied to clipboard
error: instruction requires: Not 64-bit mode
Hi there,
trying to compile the simulator from this repository https://github.com/rusefi/rusefi
It requires the -m32 compiler flag and compiles the objects using gcc and g++ on OSX, throws far too many errors with clang and clang++ and fatal errors
Why am I trying osxcross :- Cannot get it to link under OSX because of missing symbols - objects compile fine with some warnings on both OSX 10.13.6 - Xcode 9.4.1 - all relevant dyibs support i386, x86_64 and X86_64h and CoreFoundation.tbd and other files have symbols for i386, however CoreFoundation is problematic...
Anyway this build system is Linux MX
I've followed the instructions on the main page, but clearly I have missed something or got it out of order at some stage
For setting up osxcross trying build_gcc.sh target = i386-apple-darwin17, x86_64p-apple-darwin17 completes
However I think I've either missed a step, or got one out of order or needed to set the target flags and specify gcc as the compiler somewhere
There have been some mods to the ./simulator/makefile to remove CPPFLAGS CFLAGS and LDFLAGS which error out, the rest is unmodified.
EDIT - I checked the flags which had been removed to get it to compile under OSX and it failed under Linux also, so I reverted back to the original makefiles and rules.mk files and the error below remains the same.
I'm probably missing something simple which I've overlooked
make command is simply make -j4 -r CC=o32-gcc CXX=o32-g++
Errors are:
../firmware/ChibiOS/os/common/ports/SIMIA32/chcore.c:73:15: error: instruction requires: Not 64-bit mode _port_switch:push %ebp
^ ../firmware/ChibiOS/os/common/ports/SIMIA32/chcore.c:74:2: error: instruction requires: Not 64-bit mode push %esi
^ ../firmware/ChibiOS/os/common/ports/SIMIA32/chcore.c:75:2: error: instruction requires: Not 64-bit mode push %edi
^ ../firmware/ChibiOS/os/common/ports/SIMIA32/chcore.c:76:2: error: instruction requires: Not 64-bit mode push %ebx
^ ../firmware/ChibiOS/os/common/ports/SIMIA32/chcore.c:79:2: error: instruction requires: Not 64-bit mode pop %ebx
^ ../firmware/ChibiOS/os/common/ports/SIMIA32/chcore.c:80:2: error: instruction requires: Not 64-bit mode pop %edi
^ ../firmware/ChibiOS/os/common/ports/SIMIA32/chcore.c:81:2: error: instruction requires: Not 64-bit mode pop %esi
^ ../firmware/ChibiOS/os/common/ports/SIMIA32/chcore.c:82:2: error: instruction requires: Not 64-bit mode pop %ebp
^
Any guidance very welcome
thanks