~ [ 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-5.9.16)


  1 # SPDX-License-Identifier: GPL-2.0                  1 # SPDX-License-Identifier: GPL-2.0
  2 include ../scripts/Makefile.include                 2 include ../scripts/Makefile.include
  3 include ../scripts/Makefile.arch                    3 include ../scripts/Makefile.arch
  4                                                     4 
                                                   >>   5 # always use the host compiler
                                                   >>   6 ifneq ($(LLVM),)
                                                   >>   7 HOSTAR  ?= llvm-ar
                                                   >>   8 HOSTCC  ?= clang
                                                   >>   9 HOSTLD  ?= ld.lld
                                                   >>  10 else
                                                   >>  11 HOSTAR  ?= ar
                                                   >>  12 HOSTCC  ?= gcc
                                                   >>  13 HOSTLD  ?= ld
                                                   >>  14 endif
                                                   >>  15 AR       = $(HOSTAR)
                                                   >>  16 CC       = $(HOSTCC)
                                                   >>  17 LD       = $(HOSTLD)
                                                   >>  18 
  5 ifeq ($(srctree),)                                 19 ifeq ($(srctree),)
  6 srctree := $(patsubst %/,%,$(dir $(CURDIR)))       20 srctree := $(patsubst %/,%,$(dir $(CURDIR)))
  7 srctree := $(patsubst %/,%,$(dir $(srctree)))      21 srctree := $(patsubst %/,%,$(dir $(srctree)))
  8 endif                                              22 endif
  9                                                    23 
 10 LIBSUBCMD_DIR = $(srctree)/tools/lib/subcmd/   !!  24 SUBCMD_SRCDIR           = $(srctree)/tools/lib/subcmd/
 11 ifneq ($(OUTPUT),)                             !!  25 LIBSUBCMD_OUTPUT        = $(if $(OUTPUT),$(OUTPUT),$(CURDIR)/)
 12   LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libs !!  26 LIBSUBCMD               = $(LIBSUBCMD_OUTPUT)libsubcmd.a
 13 else                                           << 
 14   LIBSUBCMD_OUTPUT = $(CURDIR)/libsubcmd       << 
 15 endif                                          << 
 16 LIBSUBCMD = $(LIBSUBCMD_OUTPUT)/libsubcmd.a    << 
 17                                                    27 
 18 OBJTOOL    := $(OUTPUT)objtool                     28 OBJTOOL    := $(OUTPUT)objtool
 19 OBJTOOL_IN := $(OBJTOOL)-in.o                      29 OBJTOOL_IN := $(OBJTOOL)-in.o
 20                                                    30 
 21 LIBELF_FLAGS := $(shell $(HOSTPKG_CONFIG) libe !!  31 LIBELF_FLAGS := $(shell pkg-config libelf --cflags 2>/dev/null)
 22 LIBELF_LIBS  := $(shell $(HOSTPKG_CONFIG) libe !!  32 LIBELF_LIBS  := $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
 23                                                    33 
 24 all: $(OBJTOOL)                                    34 all: $(OBJTOOL)
 25                                                    35 
 26 INCLUDES := -I$(srctree)/tools/include \           36 INCLUDES := -I$(srctree)/tools/include \
 27             -I$(srctree)/tools/arch/$(HOSTARCH     37             -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
 28             -I$(srctree)/tools/arch/$(SRCARCH)     38             -I$(srctree)/tools/arch/$(SRCARCH)/include  \
 29             -I$(srctree)/tools/objtool/include !!  39             -I$(srctree)/tools/objtool/arch/$(SRCARCH)/include
 30             -I$(srctree)/tools/objtool/arch/$( !!  40 WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
 31             -I$(LIBSUBCMD_OUTPUT)/include      !!  41 CFLAGS   := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
 32 # Note, EXTRA_WARNINGS here was determined for !!  42 LDFLAGS  += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
 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                                                    43 
 38 # Allow old libelf to be used:                     44 # Allow old libelf to be used:
 39 elfshdr := $(shell echo '$(pound)include <libe !!  45 elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
 40 OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_US !!  46 CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
 41                                                << 
 42 # Always want host compilation.                << 
 43 HOST_OVERRIDES := CC="$(HOSTCC)" LD="$(HOSTLD) << 
 44                                                    47 
 45 AWK = awk                                          48 AWK = awk
 46 MKDIR = mkdir                                  << 
 47                                                << 
 48 ifeq ($(V),1)                                  << 
 49   Q =                                          << 
 50 else                                           << 
 51   Q = @                                        << 
 52 endif                                          << 
 53                                                    49 
 54 BUILD_ORC := n                                 !!  50 SUBCMD_CHECK := n
                                                   >>  51 SUBCMD_ORC := n
 55                                                    52 
 56 ifeq ($(SRCARCH),x86)                              53 ifeq ($(SRCARCH),x86)
 57         BUILD_ORC := y                         !!  54         SUBCMD_CHECK := y
 58 endif                                          !!  55         SUBCMD_ORC := y
 59                                                << 
 60 ifeq ($(SRCARCH),loongarch)                    << 
 61         BUILD_ORC := y                         << 
 62 endif                                              56 endif
 63                                                    57 
 64 export BUILD_ORC                               !!  58 export SUBCMD_CHECK SUBCMD_ORC
 65 export srctree OUTPUT CFLAGS SRCARCH AWK           59 export srctree OUTPUT CFLAGS SRCARCH AWK
 66 include $(srctree)/tools/build/Makefile.includ     60 include $(srctree)/tools/build/Makefile.include
 67                                                    61 
 68 $(OBJTOOL_IN): fixdep $(LIBSUBCMD) FORCE       !!  62 $(OBJTOOL_IN): fixdep FORCE
 69         $(Q)$(CONFIG_SHELL) ./sync-check.sh    !!  63         @$(CONFIG_SHELL) ./sync-check.sh
 70         $(Q)$(MAKE) $(build)=objtool $(HOST_OV !!  64         @$(MAKE) $(build)=objtool
 71                 LDFLAGS="$(OBJTOOL_LDFLAGS)"   << 
 72                                                << 
 73                                                    65 
 74 $(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)             66 $(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
 75         $(QUIET_LINK)$(HOSTCC) $(OBJTOOL_IN) $ !!  67         $(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@
 76                                                << 
 77                                                << 
 78 $(LIBSUBCMD_OUTPUT):                           << 
 79         $(Q)$(MKDIR) -p $@                     << 
 80                                                    68 
 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                                                    69 
 87 $(LIBSUBCMD)-clean:                            !!  70 $(LIBSUBCMD): fixdep FORCE
 88         $(call QUIET_CLEAN, libsubcmd)         !!  71         $(Q)$(MAKE) -C $(SUBCMD_SRCDIR) OUTPUT=$(LIBSUBCMD_OUTPUT)
 89         $(Q)$(RM) -r -- $(LIBSUBCMD_OUTPUT)    << 
 90                                                    72 
 91 clean: $(LIBSUBCMD)-clean                      !!  73 clean:
 92         $(call QUIET_CLEAN, objtool) $(RM) $(O     74         $(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL)
 93         $(Q)find $(OUTPUT) -name '*.o' -delete     75         $(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
 94         $(Q)$(RM) $(OUTPUT)arch/x86/lib/inat-t !!  76         $(Q)$(RM) $(OUTPUT)arch/x86/inat-tables.c $(OUTPUT)fixdep
 95                                                    77 
 96 FORCE:                                             78 FORCE:
 97                                                    79 
 98 .PHONY: clean FORCE                                80 .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