From 1e0bc0df25caa03e18291614d8f8c88e7dc8070c Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 13 Oct 2020 03:59:34 -0700 Subject: [PATCH] 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 --- src/base/compiler.hh | 1 + 1 file changed, 1 insertion(+) 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() -- 2.30.2