From: Gabe Black Date: Tue, 13 Oct 2020 10:59:34 +0000 (-0700) Subject: base: Add an M5_WEAK macro to compiler.hh. X-Git-Tag: develop-gem5-snapshot~624 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e0bc0df25caa03e18291614d8f8c88e7dc8070c;p=gem5.git base: Add an M5_WEAK macro to compiler.hh. On gnu compatible systems, this will be implemented with the [[gnu::weak]] attribute. Change-Id: I1add373d648bbca24feab63420a9d87363646b6a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35939 Tested-by: kokoro Maintainer: Gabe Black Reviewed-by: Nikos Nikoleris --- diff --git a/src/base/compiler.hh b/src/base/compiler.hh index ead1507fd..4565143b1 100644 --- a/src/base/compiler.hh +++ b/src/base/compiler.hh @@ -97,6 +97,7 @@ // Set the visibility of a symbol. # define M5_PUBLIC [[gnu:visibility("default")]] # define M5_LOCAL [[gnu::visibility("hidden")]] +# define M5_WEAK [[gnu::weak]] // Marker for what should be an unreachable point in the code. # define M5_UNREACHABLE __builtin_unreachable()