Welcome to gem5 Q&A, where you can ask questions and receive answers from other members of the community.

How can I compile gem5 on SPARC arch?

0 votes

I am new in using gem5 as simulator. i try to build SPARC arch on gem5 by using commands mentioned on http://gem5.org/Compiling_M5 but I can't. frequently I face with following errors:

1.arch/sparc/generated/decoder-ns.cc.inc:240:17: error: this 'if' clause does not guard... [-Werror=misleading-indentation]

                 if (_numSrcRegs > 0)

2.arch/sparc/generated/exec-ns.cc.inc:16888:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation]

         if (!FullSystem)
and so on
how can i do for solving these issues?

asked Apr 9 in SPARC by younes (280 points)

1 Answer

+1 vote
In the short term, you can add  -Wno-error=misleading-indentation to the C++ options in the SConsopts file.

What compiler version are you using, and I'll look into this error (warning).

Also, why are you using SPARC? This ISA is not well supported in gem5 and may have bugs. I strongly encourage you to use a more well supported ISA like x86, ARM, or RISC-V.
answered Apr 10 by powerjg (6,280 points)
Sure, I changed ISA to ARM,