pulp-platform / pulp-riscv-gnu-toolchain

Other
68 stars 50 forks source link

Unrecognized opcode 'lwu' #24

Closed masgia closed 4 years ago

masgia commented 4 years ago

Hi,

while compiling the toolchain under CentOS (installed in a docker) with the following options

./configure --prefix=/opt/riscv --with-arch=rv32g --with-abi=ilp32d
make linux

I got this error

/home/masgia01/Designs/pulp-riscv-gnu-toolchain/build-gcc-linux-stage1/./gcc/xgcc -B/home/masgia01/Designs/pulp-riscv-gnu-toolchain/build-gcc-linux-stage1/./gcc/ -B/opt/riscv/riscv32-unknown-linux-gnu/bin/ -B/opt/riscv/riscv32-unknown-linux-gnu/lib/ -isystem /opt/riscv/riscv32-unknown-linux-gnu/include -isystem /opt/riscv/riscv32-unknown-linux-gnu/sys-include    -g -O2 -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   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fPIC -I. -I. -I../.././gcc -I/home/masgia01/Designs/pulp-riscv-gnu-toolchain/riscv-gcc/libgcc -I/home/masgia01/Designs/pulp-riscv-gnu-toolchain/riscv-gcc/libgcc/. -I/home/masgia01/Designs/pulp-riscv-gnu-toolchain/riscv-gcc/libgcc/../gcc -I/home/masgia01/Designs/pulp-riscv-gnu-toolchain/riscv-gcc/libgcc/../include  -DHAVE_CC_TLS  -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c /home/masgia01/Designs/pulp-riscv-gnu-toolchain/riscv-gcc/libgcc/unwind-dw2.c -fvisibility=hidden -DHIDE_EXPORTS
/tmp/ccbEgsyR.s: Assembler messages:
/tmp/ccbEgsyR.s:4954: Error: unrecognized opcode `lwu a1,.LANCHOR0+2'
/tmp/ccbEgsyR.s:5170: Error: unrecognized opcode `lwu a5,.LANCHOR0'
/tmp/ccbEgsyR.s:5249: Error: unrecognized opcode `lwu a4,.LANCHOR0+2'
/tmp/ccbEgsyR.s:5896: Error: unrecognized opcode `lwu a2,.LANCHOR0+2'
/tmp/ccbEgsyR.s:5988: Error: unrecognized opcode `lwu a3,.LANCHOR0+2'
make[2]: *** [unwind-dw2.o] Error 1
make[2]: Leaving directory `/home/masgia01/Designs/pulp-riscv-gnu-toolchain/build-gcc-linux-stage1/riscv32-unknown-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/masgia01/Designs/pulp-riscv-gnu-toolchain/build-gcc-linux-stage1'
make: *** [stamps/build-gcc-linux-stage1] Error 2

Is this expected? How could I solve the problem?

Thanks

masgia commented 4 years ago

The issue is most likely due to an incompatible gcc version I had v4.8.5 - with v7 I don't see the issue.

ParthB96 commented 3 years ago

Hi,

./configure --prefix=/opt/riscv make linux

while running this command , i also find same error. I had v4.8.5 gcc version, still facing error.

gnu_toolchain_error