Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting gcc 11 to new architecture #2

Open
kaiboy05 opened this issue Sep 6, 2021 · 1 comment
Open

Porting gcc 11 to new architecture #2

kaiboy05 opened this issue Sep 6, 2021 · 1 comment

Comments

@kaiboy05
Copy link

kaiboy05 commented Sep 6, 2021

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:

/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.

@nkim-bitzap
Copy link
Owner

nkim-bitzap commented Sep 7, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants