gcc кросс-компиляция -mips1 не генерирует MIPS-I - PullRequest
0 голосов
/ 03 октября 2019

Я нацеливаюсь на старый маршрутизатор, которому нужны исполняемые файлы MIPS-I, но -mips1 создает исполняемые файлы MIPS32.

Вот команда компиляции:

buildroot-2019.02.5/output/host/bin/mips-linux-gcc-7.4.0 -march=mips1 -mtune=mips1 -static ~/helloworld.c -o /tmp/hw.1013  -msoft-float

Но файл MIPS32,не MIPS-I

file /tmp/hw.1013

/tmp/hw.1013: ELF 32-bit MSB executable, MIPS, MIPS32 version 1 (SYSV), statically linked, not stripped

Более старые версии gcc создают правильные двоичные файлы MIPS-I.

./mips-gcc --version
uClibc mips-rawgcc (GCC) 4.1.2

./mips-gcc -march=mips1  -static ~/helloworld.c -o /tmp/hw.1013  -msoft-float 
file /tmp/hw.1013
/tmp/hw.1013: ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, not stripped
...