You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you very much your binutils and gcc porting tutorials. These help me very much to understand the binutils and gcc.
I have a few questions about the gcc porting.
I was trying to port the chilli architecture on gcc 11.2 by following the steps you showed in the youtube tutorial. After fixing some replaced types that introduced in the newer version, I met a segmentation fault when building the gcc. The error is like this:
/home/myname/gcc/build/./gcc/xgcc -B/home/myname/gcc/build/./gcc/ -xc -nostdinc /dev/null -S -o /dev/null -fself-test=../../src/gcc/testsuite/selftests
cc1: internal compiler error: Segmentation fault
0x1077d78 crash_signal
../../src/gcc/toplev.c:327
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
Do you have any idea what is causing this error?
I tried to use gdb to track which line causes this error, and it shows that it gives out from a strcmp() function in the "../../src/gcc/gcc.c", I tried to print the string that it is comparing, but it is having value "-", so I think it is not accessing a null pointer?
If I am trying to port a gcc on a toy architecture, which version of gcc will you recommend me to port to? Should I use version 8.4 like you did, or 9.4?
Thank you very much again.
The text was updated successfully, but these errors were encountered:
Hi,
Unfortunately it is almost impossible to guess why 'strcmp' is crashing, it
could be just anything,
missing macros, gcc-unique garbage collector, missing patterns, incorrect
patterns, literal bugs
in the backend, etc, etc. No help here without digging deeper.
The tutorial collection is somewhat dated, i used just a mainline 8.4, one
subscriber told that 9.4
implements different macros, so i guess it is even more the case for 11.2.
As a side note, the gcc-port was purely educational, custom
gcc-backend-passes that go beyong
the scope of counting machine instructions are usually pretty much
hardcore. Instead of dealing
with old C code, consider modern frameworks such as llvm, even for toy
architectures.
Nick
Hi Kim,
Thank you very much your binutils and gcc porting tutorials. These help me very much to understand the binutils and gcc.
I have a few questions about the gcc porting.
I was trying to port the chilli architecture on gcc 11.2 by following the steps you showed in the youtube tutorial. After fixing some replaced types that introduced in the newer version, I met a segmentation fault when building the gcc. The error is like this:
Do you have any idea what is causing this error?
I tried to use gdb to track which line causes this error, and it shows that it gives out from a strcmp() function in the "../../src/gcc/gcc.c", I tried to print the string that it is comparing, but it is having value "-", so I think it is not accessing a null pointer?
If I am trying to port a gcc on a toy architecture, which version of gcc will you recommend me to port to? Should I use version 8.4 like you did, or 9.4?
Thank you very much again.
The text was updated successfully, but these errors were encountered: