GCC 7
Posted: Mon Aug 21, 2017 11:48 am
I'm having some issues getting any GCC newer than 4.x to build libgcc for SH. Gendev also had this issue if you tried to use a newer GCC than it used (4.8.6 I think) back when it supported 32X.
The error:
My commands:
Google is not aware of the existence of this error, and the GCC 5 change notes don't mention having to change things for SH. So what's up? Do people who use C for 32X dev skip libgcc or something?
The error:
Code: Select all
/home/grind/marsdev/toolchain/gcc-7.2.0/build/./gcc/xgcc -B/home/grind/marsdev/toolchain/gcc-7.2.0/build/./gcc/ -B/home/grind/mars/sh-elf/sh-elf/bin/ -B/home/grind/mars/sh-elf/sh-elf/lib/ -isystem /home/grind/mars/sh-elf/sh-elf/include -isystem /home/grind/mars/sh-elf/sh-elf/sys-include -g -O2 -m1 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. -I../../.././gcc -I../../../../libgcc -I../../../../libgcc/. -I../../../../libgcc/../gcc -I../../../../libgcc/../include -o _movmem_i4_s.o -MT _movmem_i4_s.o -MD -MP -MF _movmem_i4_s.dep -DSHARED -DL_movmem_i4 -xassembler-with-cpp -c ../../../../libgcc/config/sh/lib1funcs.S
../../../../libgcc/config/sh/lib1funcs.S: Assembler messages:
../../../../libgcc/config/sh/lib1funcs.S:933: Error: opcode not valid for this cpu variant
../../../../libgcc/config/sh/lib1funcs.S:935: Error: opcode not valid for this cpu variant
../../../../libgcc/config/sh/lib1funcs.S:942: Error: opcode not valid for this cpu variant
../../../../libgcc/config/sh/lib1funcs.S:944: Error: opcode not valid for this cpu variant
Makefile:481: recipe for target '_movmem_i4_s.o' failed
make[6]: *** [_movmem_i4_s.o] Error 1
make[6]: Leaving directory '/home/grind/marsdev/toolchain/gcc-7.2.0/build/sh-elf/m1/libgcc'
Makefile:1198: recipe for target 'multi-do' failed
make[5]: *** [multi-do] Error 1
make[5]: Leaving directory '/home/grind/marsdev/toolchain/gcc-7.2.0/build/sh-elf/libgcc'
Makefile:123: recipe for target 'all-multi' failed
make[4]: *** [all-multi] Error 2
make[4]: Leaving directory '/home/grind/marsdev/toolchain/gcc-7.2.0/build/sh-elf/libgcc'
Makefile:13111: recipe for target 'all-target-libgcc' failed
make[3]: *** [all-target-libgcc] Error 2
make[3]: Leaving directory '/home/grind/marsdev/toolchain/gcc-7.2.0/build'
Makefile:896: recipe for target 'all' failed
Code: Select all
cd gcc-7.2.0 && ./contrib/download_prerequisites \
> /home/grind/marsdev/toolchain/gcc-sh.log 2>&1
cd gcc-7.2.0/build && \
../configure --target=sh-elf --prefix=/home/grind/mars/sh-elf \
--without-headers --enable-languages=c,c++ --with-endian=big --with-cpu=m2 \
--disable-threads --disable-shared --disable-libssp \
--disable-tls --disable-nls --disable-werror \
>> /home/grind/marsdev/toolchain/gcc-sh.log 2>&1
make -C gcc-7.2.0/build all install-strip \
>> /home/grind/marsdev/toolchain/gcc-sh.log 2>&1