Hello Experts,
I am trying to use a different compiler other than gcc to compile gem5.
Is there a way to edit the Sconscript or some other config file to do this
easily ?
I want to set CC=<my new compiler>
The purpose is to add some instrumentation code while compiling to collect
coverage info.
--
Thanks
Renju
Hi,
I'm not sure if there's a way of compiling gem5 using clang via scons in a
system having both clang and gcc. However, the compiler tests do test
compiling gem5 in containers having either gcc or clang as the primary
compiler.
https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/tests/compiler-tests.sh
Regards,
Hoa Nguyen
On Mon, Jul 4, 2022, 18:33 Renju Rajeev rrajeev@pdx.edu wrote:
Hello Experts,
I am trying to use a different compiler other than gcc to compile gem5.
Is there a way to edit the Sconscript or some other config file to do this
easily ?
I want to set CC=<my new compiler>
The purpose is to add some instrumentation code while compiling to collect
coverage info.
--
Thanks
Renju
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org
Hi,
Here is a patch from my personal modifications to SConstruct. It makes scons use the system-wide cc/c++ aliases that you can rebind to your liking with, e.g., update-alternatives on ubuntu. I’ve tested it successfully with several flavors of gcc/clang together with the ld or lld linker (the later being noticeably faster on my system). In any case, you can adapt the patch to hardcode your compiler in it. Beware with the compiler version checking that is a bit picky ;)
Gabriel
thank you everyone.
the patch which Gabriel sent has worked, and my compile has passed.
On Wed, Jul 6, 2022 at 12:02 AM gabriel.busnot@arteris.com wrote:
Hi,
Here is a patch from my personal modifications to SConstruct. It makes
scons use the system-wide cc/c++ aliases that you can rebind to your liking
with, e.g., update-alternatives on ubuntu. I’ve tested it successfully with
several flavors of gcc/clang together with the ld or lld linker (the later
being noticeably faster on my system). In any case, you can adapt the patch
to hardcode your compiler in it. Beware with the compiler version checking
that is a bit picky ;)
Gabriel
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org
--
Thanks
Renju