Makefile (664b0bae0b87f69bc9deb098f5e0158b9cf18e04) Makefile (9564a8cf422d7b58f6e857e3546d346fa970191e)
1# SPDX-License-Identifier: GPL-2.0
2include ../scripts/Makefile.include
3include ../scripts/Makefile.arch
4
5ifeq ($(ARCH),x86_64)
6ARCH := x86
7endif
8

--- 21 unchanged lines hidden (view full) ---

30INCLUDES := -I$(srctree)/tools/include \
31 -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
32 -I$(srctree)/tools/objtool/arch/$(ARCH)/include
33WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
34CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
35LDFLAGS += -lelf $(LIBSUBCMD)
36
37# Allow old libelf to be used:
1# SPDX-License-Identifier: GPL-2.0
2include ../scripts/Makefile.include
3include ../scripts/Makefile.arch
4
5ifeq ($(ARCH),x86_64)
6ARCH := x86
7endif
8

--- 21 unchanged lines hidden (view full) ---

30INCLUDES := -I$(srctree)/tools/include \
31 -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
32 -I$(srctree)/tools/objtool/arch/$(ARCH)/include
33WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
34CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
35LDFLAGS += -lelf $(LIBSUBCMD)
36
37# Allow old libelf to be used:
38elfshdr := $(shell echo '\#include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
38elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
39CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
40
41AWK = awk
42export srctree OUTPUT CFLAGS SRCARCH AWK
43include $(srctree)/tools/build/Makefile.include
44
45$(OBJTOOL_IN): fixdep FORCE
46 @$(MAKE) $(build)=objtool

--- 17 unchanged lines hidden ---
39CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
40
41AWK = awk
42export srctree OUTPUT CFLAGS SRCARCH AWK
43include $(srctree)/tools/build/Makefile.include
44
45$(OBJTOOL_IN): fixdep FORCE
46 @$(MAKE) $(build)=objtool

--- 17 unchanged lines hidden ---