Skip to content

Commit b90a368

Browse files
labbottmasahir0y
authored andcommitted
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>
1 parent 10844ae commit b90a368

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ HOSTCXX = g++
362362
KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
363363
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
364364
KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
365-
HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
365+
KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
366366
HOST_LOADLIBES := $(HOST_LFS_LIBS)
367367

368368
# Make variables (CC, etc...)
@@ -430,7 +430,7 @@ LDFLAGS :=
430430
GCC_PLUGINS_CFLAGS :=
431431

432432
export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
433-
export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
433+
export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS HOST_LOADLIBES
434434
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
435435
export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
436436

‎net/bpfilter/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ifeq ($(CONFIG_BPFILTER_UMH), y)
1212
# builtin bpfilter_umh should be compiled with -static
1313
# since rootfs isn't mounted at the time of __init
1414
# function is called and do_execv won't find elf interpreter
15-
HOSTLDFLAGS += -static
15+
KBUILD_HOSTLDFLAGS += -static
1616
endif
1717

1818
$(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh

‎scripts/Makefile.host‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags)
8484
# Create executable from a single .c file
8585
# host-csingle -> Executable
8686
quiet_cmd_host-csingle = HOSTCC $@
87-
cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \
87+
cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(KBUILD_HOSTLDFLAGS) -o $@ $< \
8888
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
8989
$(host-csingle): $(obj)/%: $(src)/%.c FORCE
9090
$(call if_changed_dep,host-csingle)
9191

9292
# Link an executable based on list of .o files, all plain c
9393
# host-cmulti -> executable
9494
quiet_cmd_host-cmulti = HOSTLD $@
95-
cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \
95+
cmd_host-cmulti = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ \
9696
$(addprefix $(obj)/,$($(@F)-objs)) \
9797
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
9898
$(host-cmulti): FORCE
@@ -109,7 +109,7 @@ $(host-cobjs): $(obj)/%.o: $(src)/%.c FORCE
109109
# Link an executable based on list of .o files, a mixture of .c and .cc
110110
# host-cxxmulti -> executable
111111
quiet_cmd_host-cxxmulti = HOSTLD $@
112-
cmd_host-cxxmulti = $(HOSTCXX) $(HOSTLDFLAGS) -o $@ \
112+
cmd_host-cxxmulti = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -o $@ \
113113
$(foreach o,objs cxxobjs,\
114114
$(addprefix $(obj)/,$($(@F)-$(o)))) \
115115
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
@@ -143,7 +143,7 @@ $(host-cxxshobjs): $(obj)/%.o: $(src)/%.c FORCE
143143
# Link a shared library, based on position independent .o files
144144
# *.o -> .so shared library (host-cshlib)
145145
quiet_cmd_host-cshlib = HOSTLLD -shared $@
146-
cmd_host-cshlib = $(HOSTCC) $(HOSTLDFLAGS) -shared -o $@ \
146+
cmd_host-cshlib = $(HOSTCC) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \
147147
$(addprefix $(obj)/,$($(@F:.so=-objs))) \
148148
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
149149
$(host-cshlib): FORCE
@@ -153,7 +153,7 @@ $(call multi_depend, $(host-cshlib), .so, -objs)
153153
# Link a shared library, based on position independent .o files
154154
# *.o -> .so shared library (host-cxxshlib)
155155
quiet_cmd_host-cxxshlib = HOSTLLD -shared $@
156-
cmd_host-cxxshlib = $(HOSTCXX) $(HOSTLDFLAGS) -shared -o $@ \
156+
cmd_host-cxxshlib = $(HOSTCXX) $(KBUILD_HOSTLDFLAGS) -shared -o $@ \
157157
$(addprefix $(obj)/,$($(@F:.so=-objs))) \
158158
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
159159
$(host-cxxshlib): FORCE

‎tools/build/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $(OUTPUT)fixdep-in.o: FORCE
4343
$(Q)$(MAKE) $(build)=fixdep
4444

4545
$(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o
46-
$(QUIET_LINK)$(HOSTCC) $(HOSTLDFLAGS) -o $@ $<
46+
$(QUIET_LINK)$(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ $<
4747

4848
FORCE:
4949

‎tools/objtool/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ INCLUDES := -I$(srctree)/tools/include \
3232
-I$(srctree)/tools/objtool/arch/$(ARCH)/include
3333
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
3434
CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES)
35-
LDFLAGS += -lelf $(LIBSUBCMD) $(HOSTLDFLAGS)
35+
LDFLAGS += -lelf $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
3636

3737
# Allow old libelf to be used:
3838
elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)

0 commit comments

Comments
 (0)