summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2018-07-09 20:46:00 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-17 12:18:05 -0400
commitb90a368000abe5e015e0b045ca2ff7c2173b94c0 (patch)
treecdb76131faf50cefd643cb1cb3006129a99a4203
parent10844aebf44851a981ddaa714351ae61c4b29103 (diff)
kbuild: Rename HOSTLDFLAGS to KBUILD_HOSTLDFLAGS
In preparation for enabling command line LDFLAGS, re-name HOSTLDFLAGS to KBUILD_HOSTLDFLAGS as the internal use only flags. This should not have any visible effects. Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--Makefile4
-rw-r--r--net/bpfilter/Makefile2
-rw-r--r--scripts/Makefile.host10
-rw-r--r--tools/build/Makefile2
-rw-r--r--tools/objtool/Makefile2
5 files changed, 10 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 3d2fff178eb6..d8104dcc0b4f 100644
--- a/Makefile
+++ b/Makefile
@@ -362,7 +362,7 @@ HOSTCXX = g++
362KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \ 362KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
363 -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS) 363 -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
364KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) 364KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
365HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) 365KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
366HOST_LOADLIBES := $(HOST_LFS_LIBS) 366HOST_LOADLIBES := $(HOST_LFS_LIBS)
367 367
368# Make variables (CC, etc...) 368# Make variables (CC, etc...)
@@ -430,7 +430,7 @@ LDFLAGS :=
430GCC_PLUGINS_CFLAGS := 430GCC_PLUGINS_CFLAGS :=
431 431
432export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC 432export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
433export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES 433export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS HOST_LOADLIBES
434export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE 434export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
435export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 435export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
436 436
diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile
index 70beeb4ad806..0947ee7f70d5 100644
--- a/net/bpfilter/Makefile
+++ b/net/bpfilter/Makefile
@@ -12,7 +12,7 @@ ifeq ($(CONFIG_BPFILTER_UMH), y)
12# builtin bpfilter_umh should be compiled with -static 12# builtin bpfilter_umh should be compiled with -static
13# since rootfs isn't mounted at the time of __init 13# since rootfs isn't mounted at the time of __init
14# function is called and do_execv won't find elf interpreter 14# function is called and do_execv won't find elf interpreter
15HOSTLDFLAGS += -static 15KBUILD_HOSTLDFLAGS += -static
16endif 16endif
17 17
18$(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh 18$(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 455d85aa1d37..c019d781b2c9 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -84,7 +84,7 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags)
84# Create executable from a single .c file 84# Create executable from a single .c file
85# host-csingle -> Executable 85# host-csingle -> Executable
86quiet_cmd_host-csingle = HOSTCC $@ 86quiet_cmd_host-csingle = HOSTCC $@
87 cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \ 87 cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(KBUILD_HOSTLDFLAGS) -o $@ $< \
88 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) 88 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
89$(host-csingle): $(obj)/%: $(src)/%.c FORCE 89$(host-csingle): $(obj)/%: $(src)/%.c FORCE
90 $(call if_changed_dep,host-csingle) 90 $(call if_changed_dep,host-csingle)
@@ -92,7 +92,7 @@ $(host-csingle): $(obj)/%: $(src)/%.c FORCE
92# Link an executable based on list of .o files, all plain c 92# Link an executable based on list of .o files, all plain c
93# host-cmulti -> executable 93# host-cmulti -> executable
94quiet_cmd_host-cmulti = HOSTLD $@ 94quiet_cmd_host-cmulti = HOSTLD $@
95 cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \ 95 cmd_host-cmulti = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ \
96 $(addprefix $(obj)/,$($(@F)-objs)) \ 96 $(addprefix $(obj)/,$($(@F)-objs)) \
97 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) 97 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
98$(host-cmulti): FORCE 98$(host-cmulti): FORCE
@@ -109,7 +109,7 @@ $(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE
109# Link an executable based on list of .o files, a mixture of .c and .cc 109# Link an executable based on list of .o files, a mixture of .c and .cc
110# host-cxxmulti -> executable 110# host-cxxmulti -> executable
111quiet_cmd_host-cxxmulti = HOSTLD $@ 111quiet_cmd_host-cxxmulti = HOSTLD $@
112 cmd_host-cxxmulti = $(HOSTCXX) $(HOSTLDFLAGS) -o $@ \ 112 cmd_host-cxxmulti = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -o $@ \
113 $(foreach o,objs cxxobjs,\ 113 $(foreach o,objs cxxobjs,\
114 $(addprefix $(obj)/,$($(@F)-$(o)))) \ 114 $(addprefix $(obj)/,$($(@F)-$(o)))) \
115 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) 115 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
@@ -143,7 +143,7 @@ $(host-cxxshobjs): $(obj)/%.o: $(src)/%.c FORCE
143# Link a shared library, based on position independent .o files 143# Link a shared library, based on position independent .o files
144# *.o -> .so shared library (host-cshlib) 144# *.o -> .so shared library (host-cshlib)
145quiet_cmd_host-cshlib = HOSTLLD -shared $@ 145quiet_cmd_host-cshlib = HOSTLLD -shared $@
146 cmd_host-cshlib = $(HOSTCC) $(HOSTLDFLAGS) -shared -o $@ \ 146 cmd_host-cshlib = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \
147 $(addprefix $(obj)/,$($(@F:.so=-objs))) \ 147 $(addprefix $(obj)/,$($(@F:.so=-objs))) \
148 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) 148 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
149$(host-cshlib): FORCE 149$(host-cshlib): FORCE
@@ -153,7 +153,7 @@ $(call multi_depend, $(host-cshlib), .so, -objs)
153# Link a shared library, based on position independent .o files 153# Link a shared library, based on position independent .o files
154# *.o -> .so shared library (host-cxxshlib) 154# *.o -> .so shared library (host-cxxshlib)
155quiet_cmd_host-cxxshlib = HOSTLLD -shared $@ 155quiet_cmd_host-cxxshlib = HOSTLLD -shared $@
156 cmd_host-cxxshlib = $(HOSTCXX) $(HOSTLDFLAGS) -shared -o $@ \ 156 cmd_host-cxxshlib = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \
157 $(addprefix $(obj)/,$($(@F:.so=-objs))) \ 157 $(addprefix $(obj)/,$($(@F:.so=-objs))) \
158 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) 158 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
159$(host-cxxshlib): FORCE 159$(host-cxxshlib): FORCE
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 5edf65e684ab..727050c40f09 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -43,7 +43,7 @@ $(OUTPUT)fixdep-in.o: FORCE
43 $(Q)$(MAKE) $(build)=fixdep 43 $(Q)$(MAKE) $(build)=fixdep
44 44
45$(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o 45$(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o
46 $(QUIET_LINK)$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< 46 $(QUIET_LINK)$(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ $<
47 47
48FORCE: 48FORCE:
49 49
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index b5d8c2964b52..c9d038f91af6 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -32,7 +32,7 @@ INCLUDES := -I$(srctree)/tools/include \
32 -I$(srctree)/tools/objtool/arch/$(ARCH)/include 32 -I$(srctree)/tools/objtool/arch/$(ARCH)/include
33WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed 33WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
34CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) 34CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES)
35LDFLAGS += -lelf $(LIBSUBCMD) $(HOSTLDFLAGS) 35LDFLAGS += -lelf $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
36 36
37# Allow old libelf to be used: 37# Allow old libelf to be used:
38elfshdr := $(shell echo '$(pound)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)