systemc: Use the new M5_WEAK macro to hide [[gnu::weak]].
authorGabe Black <gabeblack@google.com>
Tue, 13 Oct 2020 11:01:00 +0000 (04:01 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 14 Oct 2020 00:46:16 +0000 (00:46 +0000)
Other compilers may need to support that macro in other ways.

Change-Id: If6ee05ce69c1bfd24108cf0785fac2d7bc259f0a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35940
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/core/sc_main_fiber.cc

index 18646dd19e577fed118173bcf0e0d81533be9cfa..df804d01b55761afeedd2098af3a045cf0feba20 100644 (file)
@@ -38,7 +38,7 @@
 #include "systemc/utils/report.hh"
 
 // A weak symbol to detect if sc_main has been defined, and if so where it is.
-[[gnu::weak]] int sc_main(int argc, char *argv[]);
+M5_WEAK int sc_main(int argc, char *argv[]);
 
 namespace sc_gem5
 {