Skip to content

Commit 4880bd1

Browse files
committed
predefine __ATOMIC_ACQUIRE & friends as weak
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@infradead.org> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
1 parent 9212270 commit 4880bd1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎predefine.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ void predefined_macros(void)
179179
if (arch_target->has_int128)
180180
predefined_sizeof("INT128", "", 128);
181181

182-
predefine("__ATOMIC_RELAXED", 0, "0");
183-
predefine("__ATOMIC_CONSUME", 0, "1");
184-
predefine("__ATOMIC_ACQUIRE", 0, "3");
185-
predefine("__ATOMIC_RELEASE", 0, "4");
186-
predefine("__ATOMIC_ACQ_REL", 0, "7");
187-
predefine("__ATOMIC_SEQ_CST", 0, "8");
182+
predefine("__ATOMIC_RELAXED", 1, "0");
183+
predefine("__ATOMIC_CONSUME", 1, "1");
184+
predefine("__ATOMIC_ACQUIRE", 1, "3");
185+
predefine("__ATOMIC_RELEASE", 1, "4");
186+
predefine("__ATOMIC_ACQ_REL", 1, "7");
187+
predefine("__ATOMIC_SEQ_CST", 1, "8");
188188

189189
predefine("__ORDER_LITTLE_ENDIAN__", 1, "1234");
190190
predefine("__ORDER_BIG_ENDIAN__", 1, "4321");

0 commit comments

Comments
 (0)