[PATCH] predefine __ATOMIC_ACQUIRE & friends as weak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>

In kernel's arch/mips/Makefile the whole content of gcc's -dM is used
for CHECKFLAGS. This conflict with some macros also defined internally:
	builtin:1:9: warning: preprocessor token __ATOMIC_ACQUIRE redefined
	builtin:0:0: this was the original definition

Fix this by using a weak define for these macros.

Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 predefine.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/predefine.c b/predefine.c
index 98e38a04579d..5b0f0caf4c35 100644
--- a/predefine.c
+++ b/predefine.c
@@ -179,12 +179,12 @@ void predefined_macros(void)
 	if (arch_target->has_int128)
 		predefined_sizeof("INT128", "", 128);
 
-	predefine("__ATOMIC_RELAXED", 0, "0");
-	predefine("__ATOMIC_CONSUME", 0, "1");
-	predefine("__ATOMIC_ACQUIRE", 0, "3");
-	predefine("__ATOMIC_RELEASE", 0, "4");
-	predefine("__ATOMIC_ACQ_REL", 0, "7");
-	predefine("__ATOMIC_SEQ_CST", 0, "8");
+	predefine("__ATOMIC_RELAXED", 1, "0");
+	predefine("__ATOMIC_CONSUME", 1, "1");
+	predefine("__ATOMIC_ACQUIRE", 1, "3");
+	predefine("__ATOMIC_RELEASE", 1, "4");
+	predefine("__ATOMIC_ACQ_REL", 1, "7");
+	predefine("__ATOMIC_SEQ_CST", 1, "8");
 
 	predefine("__ORDER_LITTLE_ENDIAN__", 1, "1234");
 	predefine("__ORDER_BIG_ENDIAN__", 1, "4321");
-- 
2.36.1




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux