~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/objtool/Makefile

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/objtool/Makefile (Version linux-6.12-rc7) and /tools/objtool/Makefile (Version linux-4.11.12)


  1 # SPDX-License-Identifier: GPL-2.0             << 
  2 include ../scripts/Makefile.include                 1 include ../scripts/Makefile.include
  3 include ../scripts/Makefile.arch                    2 include ../scripts/Makefile.arch
  4                                                     3 
                                                   >>   4 ifeq ($(ARCH),x86_64)
                                                   >>   5 ARCH := x86
                                                   >>   6 endif
                                                   >>   7 
                                                   >>   8 # always use the host compiler
                                                   >>   9 CC = gcc
                                                   >>  10 LD = ld
                                                   >>  11 AR = ar
                                                   >>  12 
  5 ifeq ($(srctree),)                                 13 ifeq ($(srctree),)
  6 srctree := $(patsubst %/,%,$(dir $(CURDIR)))       14 srctree := $(patsubst %/,%,$(dir $(CURDIR)))
  7 srctree := $(patsubst %/,%,$(dir $(srctree)))      15 srctree := $(patsubst %/,%,$(dir $(srctree)))
  8 endif                                              16 endif
  9                                                    17 
 10 LIBSUBCMD_DIR = $(srctree)/tools/lib/subcmd/   !!  18 SUBCMD_SRCDIR           = $(srctree)/tools/lib/subcmd/
 11 ifneq ($(OUTPUT),)                             !!  19 LIBSUBCMD_OUTPUT        = $(if $(OUTPUT),$(OUTPUT),$(CURDIR)/)
 12   LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libs !!  20 LIBSUBCMD               = $(LIBSUBCMD_OUTPUT)libsubcmd.a
 13 else                                           << 
 14   LIBSUBCMD_OUTPUT = $(CURDIR)/libsubcmd       << 
 15 endif                                          << 
 16 LIBSUBCMD = $(LIBSUBCMD_OUTPUT)/libsubcmd.a    << 
 17                                                    21 
 18 OBJTOOL    := $(OUTPUT)objtool                     22 OBJTOOL    := $(OUTPUT)objtool
 19 OBJTOOL_IN := $(OBJTOOL)-in.o                      23 OBJTOOL_IN := $(OBJTOOL)-in.o
 20                                                    24 
 21 LIBELF_FLAGS := $(shell $(HOSTPKG_CONFIG) libe << 
 22 LIBELF_LIBS  := $(shell $(HOSTPKG_CONFIG) libe << 
 23                                                << 
 24 all: $(OBJTOOL)                                    25 all: $(OBJTOOL)
 25                                                    26 
 26 INCLUDES := -I$(srctree)/tools/include \       !!  27 INCLUDES := -I$(srctree)/tools/include -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi
 27             -I$(srctree)/tools/arch/$(HOSTARCH !!  28 CFLAGS   += -Wall -Werror $(EXTRA_WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES)
 28             -I$(srctree)/tools/arch/$(SRCARCH) !!  29 LDFLAGS  += -lelf $(LIBSUBCMD)
 29             -I$(srctree)/tools/objtool/include << 
 30             -I$(srctree)/tools/objtool/arch/$( << 
 31             -I$(LIBSUBCMD_OUTPUT)/include      << 
 32 # Note, EXTRA_WARNINGS here was determined for << 
 33 # is passed here to match a legacy behavior.   << 
 34 WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-defa << 
 35 OBJTOOL_CFLAGS := -Werror $(WARNINGS) $(KBUILD << 
 36 OBJTOOL_LDFLAGS := $(LIBELF_LIBS) $(LIBSUBCMD) << 
 37                                                    30 
 38 # Allow old libelf to be used:                     31 # Allow old libelf to be used:
 39 elfshdr := $(shell echo '$(pound)include <libe !!  32 elfshdr := $(shell echo '\#include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
 40 OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_US !!  33 CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
 41                                                << 
 42 # Always want host compilation.                << 
 43 HOST_OVERRIDES := CC="$(HOSTCC)" LD="$(HOSTLD) << 
 44                                                    34 
 45 AWK = awk                                          35 AWK = awk
 46 MKDIR = mkdir                                  << 
 47                                                << 
 48 ifeq ($(V),1)                                  << 
 49   Q =                                          << 
 50 else                                           << 
 51   Q = @                                        << 
 52 endif                                          << 
 53                                                << 
 54 BUILD_ORC := n                                 << 
 55                                                << 
 56 ifeq ($(SRCARCH),x86)                          << 
 57         BUILD_ORC := y                         << 
 58 endif                                          << 
 59                                                << 
 60 ifeq ($(SRCARCH),loongarch)                    << 
 61         BUILD_ORC := y                         << 
 62 endif                                          << 
 63                                                << 
 64 export BUILD_ORC                               << 
 65 export srctree OUTPUT CFLAGS SRCARCH AWK           36 export srctree OUTPUT CFLAGS SRCARCH AWK
 66 include $(srctree)/tools/build/Makefile.includ     37 include $(srctree)/tools/build/Makefile.include
 67                                                    38 
 68 $(OBJTOOL_IN): fixdep $(LIBSUBCMD) FORCE       !!  39 $(OBJTOOL_IN): fixdep FORCE
 69         $(Q)$(CONFIG_SHELL) ./sync-check.sh    !!  40         @$(MAKE) $(build)=objtool
 70         $(Q)$(MAKE) $(build)=objtool $(HOST_OV << 
 71                 LDFLAGS="$(OBJTOOL_LDFLAGS)"   << 
 72                                                << 
 73                                                    41 
                                                   >>  42 # Busybox's diff doesn't have -I, avoid warning in that case
                                                   >>  43 #
 74 $(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)             44 $(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
 75         $(QUIET_LINK)$(HOSTCC) $(OBJTOOL_IN) $ !!  45         @(diff -I 2>&1 | grep -q 'option requires an argument' && \
 76                                                !!  46         test -d ../../kernel -a -d ../../tools -a -d ../objtool && (( \
 77                                                !!  47         diff -I'^#include' arch/x86/insn/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
 78 $(LIBSUBCMD_OUTPUT):                           !!  48         diff -I'^#include' arch/x86/insn/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
 79         $(Q)$(MKDIR) -p $@                     !!  49         diff arch/x86/insn/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
                                                   >>  50         diff arch/x86/insn/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \
                                                   >>  51         diff -I'^#include' arch/x86/insn/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
                                                   >>  52         diff -I'^#include' arch/x86/insn/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
                                                   >>  53         diff -I'^#include' arch/x86/insn/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
                                                   >>  54         || echo "warning: objtool: x86 instruction decoder differs from kernel" >&2 )) || true
                                                   >>  55         $(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@
 80                                                    56 
 81 $(LIBSUBCMD): fixdep $(LIBSUBCMD_OUTPUT) FORCE << 
 82         $(Q)$(MAKE) -C $(LIBSUBCMD_DIR) O=$(LI << 
 83                 DESTDIR=$(LIBSUBCMD_OUTPUT) pr << 
 84                 $(HOST_OVERRIDES) EXTRA_CFLAGS << 
 85                 $@ install_headers             << 
 86                                                    57 
 87 $(LIBSUBCMD)-clean:                            !!  58 $(LIBSUBCMD): fixdep FORCE
 88         $(call QUIET_CLEAN, libsubcmd)         !!  59         $(Q)$(MAKE) -C $(SUBCMD_SRCDIR) OUTPUT=$(LIBSUBCMD_OUTPUT)
 89         $(Q)$(RM) -r -- $(LIBSUBCMD_OUTPUT)    << 
 90                                                    60 
 91 clean: $(LIBSUBCMD)-clean                      !!  61 clean:
 92         $(call QUIET_CLEAN, objtool) $(RM) $(O     62         $(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL)
 93         $(Q)find $(OUTPUT) -name '*.o' -delete     63         $(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
 94         $(Q)$(RM) $(OUTPUT)arch/x86/lib/inat-t !!  64         $(Q)$(RM) $(OUTPUT)arch/x86/insn/inat-tables.c $(OUTPUT)fixdep
 95                                                    65 
 96 FORCE:                                             66 FORCE:
 97                                                    67 
 98 .PHONY: clean FORCE                                68 .PHONY: clean FORCE
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php