What is this GCC error on Linux, and how do I solve it? gcc: internal compiler error: Illegal instruction (program as)

后端 未结 5 641
春和景丽
春和景丽 2021-01-18 10:41

I type gcc hello.c and this appears:

gcc: internal compiler error: Illegal instruction (program as)
Please submit a full bug report,
with preproc         


        
5条回答
  •  无人共我
    2021-01-18 11:20

    Found on raspberryPi forums:

    Grabbed the sources and tried a cross-compile on an x86-64 box for a generic arm target. Something inside filter/hq2x.cpp is causing GCC to go nuts and consume memory & swap, so I wouldn't be at all surprised if it triggers a fatal error on a Pi. Some sources suggest that it is the compiler's (cc1plus) internal stack overflowing.

    One possible fix is to run the configure script with --enable-debug - This should reduce optimization to a minimum and avoid stack overflows at the expense of increased binary size.

    So you can try to set compiler flags to

    -O0 -g
    

    and check whether it helps.

提交回复
热议问题