summaryrefslogtreecommitdiff
path: root/tools/objtool
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2020-10-05 18:50:28 +0300
committerJosh Poimboeuf <jpoimboe@redhat.com>2020-10-06 17:32:13 +0300
commit2486baae2cf6df73554144d0a4e40ae8809b54d4 (patch)
tree13ad1994cbfcc1028638cf0133b64e70c6958d94 /tools/objtool
parentb0b8e56b82c06b3bb6e5fb66d0e9c9c3fd3ce555 (diff)
downloadlinux-2486baae2cf6df73554144d0a4e40ae8809b54d4.tar.xz
objtool: Allow nested externs to enable BUILD_BUG()
Currently BUILD_BUG() macro is expanded to smth like the following: do { extern void __compiletime_assert_0(void) __attribute__((error("BUILD_BUG failed"))); if (!(!(1))) __compiletime_assert_0(); } while (0); If used in a function body this obviously would produce build errors with -Wnested-externs and -Werror. Build objtool with -Wno-nested-externs to enable BUILD_BUG() usage. Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool')
-rw-r--r--tools/objtool/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 33d1e3ca8efd..4ea9a833dde7 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -37,7 +37,7 @@ INCLUDES := -I$(srctree)/tools/include \
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
-I$(srctree)/tools/arch/$(SRCARCH)/include \
-I$(srctree)/tools/objtool/arch/$(SRCARCH)/include
-WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
+WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed -Wno-nested-externs
CFLAGS := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
LDFLAGS += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)