X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=tools%2Fobjtool%2FMakefile;h=f094f3c4ed84001557503f6cdd8ed33065c86611;hb=2eec3707a33fbf1c2e0a88ffc9fc0e465c2a59fd;hp=6765c7e949f35ca3833265a33719f8c6e5baee94;hpb=ed1e33dded773ead96d047a34286e27feafd0505;p=mirror_ubuntu-artful-kernel.git diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index 6765c7e949f3..f094f3c4ed84 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile @@ -30,6 +30,10 @@ INCLUDES := -I$(srctree)/tools/include CFLAGS += -Wall -Werror $(EXTRA_WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES) LDFLAGS += -lelf $(LIBSUBCMD) +# Allow old libelf to be used: +elfshdr := $(shell echo '\#include ' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr) +CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED) + AWK = awk export srctree OUTPUT CFLAGS ARCH AWK include $(srctree)/tools/build/Makefile.include