mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 02:36:21 +00:00
kbuild: Rename HOSTCFLAGS to KBUILD_HOSTCFLAGS
In preparation for enabling command line CFLAGS, re-name HOSTCFLAGS to KBUILD_HOSTCFLAGS 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>
This commit is contained in:
parent
efa75c4923
commit
96f14fe738
@ -661,7 +661,7 @@ Both possibilities are described in the following.
|
|||||||
|
|
||||||
When compiling host programs, it is possible to set specific flags.
|
When compiling host programs, it is possible to set specific flags.
|
||||||
The programs will always be compiled utilising $(HOSTCC) passed
|
The programs will always be compiled utilising $(HOSTCC) passed
|
||||||
the options specified in $(HOSTCFLAGS).
|
the options specified in $(KBUILD_HOSTCFLAGS).
|
||||||
To set flags that will take effect for all host programs created
|
To set flags that will take effect for all host programs created
|
||||||
in that Makefile, use the variable HOST_EXTRACFLAGS.
|
in that Makefile, use the variable HOST_EXTRACFLAGS.
|
||||||
|
|
||||||
|
4
Makefile
4
Makefile
@ -359,7 +359,7 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
|
|||||||
|
|
||||||
HOSTCC = gcc
|
HOSTCC = gcc
|
||||||
HOSTCXX = g++
|
HOSTCXX = g++
|
||||||
HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
|
||||||
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
|
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
|
||||||
HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
|
HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
|
||||||
HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
|
HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
|
||||||
@ -429,7 +429,7 @@ KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
|
|||||||
LDFLAGS :=
|
LDFLAGS :=
|
||||||
GCC_PLUGINS_CFLAGS :=
|
GCC_PLUGINS_CFLAGS :=
|
||||||
|
|
||||||
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
|
export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC
|
||||||
export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
|
export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
|
||||||
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
|
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE
|
||||||
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
|
||||||
|
@ -14,7 +14,7 @@ targets := vmlinux.gz vmlinux \
|
|||||||
tools/bootpzh bootloader bootpheader bootpzheader
|
tools/bootpzh bootloader bootpheader bootpzheader
|
||||||
OBJSTRIP := $(obj)/tools/objstrip
|
OBJSTRIP := $(obj)/tools/objstrip
|
||||||
|
|
||||||
HOSTCFLAGS := -Wall -I$(objtree)/usr/include
|
KBUILD_HOSTCFLAGS := -Wall -I$(objtree)/usr/include
|
||||||
BOOTCFLAGS += -I$(objtree)/$(obj) -I$(srctree)/$(obj)
|
BOOTCFLAGS += -I$(objtree)/$(obj) -I$(srctree)/$(obj)
|
||||||
|
|
||||||
# SRM bootable image. Copy to offset 512 of a partition.
|
# SRM bootable image. Copy to offset 512 of a partition.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
hostprogs-y := bpfilter_umh
|
hostprogs-y := bpfilter_umh
|
||||||
bpfilter_umh-objs := main.o
|
bpfilter_umh-objs := main.o
|
||||||
HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
|
KBUILD_HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi
|
||||||
HOSTCC := $(CC)
|
HOSTCC := $(CC)
|
||||||
|
|
||||||
ifeq ($(CONFIG_BPFILTER_UMH), y)
|
ifeq ($(CONFIG_BPFILTER_UMH), y)
|
||||||
|
@ -164,11 +164,11 @@ always += xdpsock_kern.o
|
|||||||
always += xdp_fwd_kern.o
|
always += xdp_fwd_kern.o
|
||||||
always += task_fd_query_kern.o
|
always += task_fd_query_kern.o
|
||||||
|
|
||||||
HOSTCFLAGS += -I$(objtree)/usr/include
|
KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include
|
||||||
HOSTCFLAGS += -I$(srctree)/tools/lib/
|
KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/
|
||||||
HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
|
KBUILD_HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
|
||||||
HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
|
KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
|
||||||
HOSTCFLAGS += -I$(srctree)/tools/perf
|
KBUILD_HOSTCFLAGS += -I$(srctree)/tools/perf
|
||||||
|
|
||||||
HOSTCFLAGS_bpf_load.o += -I$(objtree)/usr/include -Wno-unused-variable
|
HOSTCFLAGS_bpf_load.o += -I$(objtree)/usr/include -Wno-unused-variable
|
||||||
HOSTCFLAGS_trace_helpers.o += -I$(srctree)/tools/lib/bpf/
|
HOSTCFLAGS_trace_helpers.o += -I$(srctree)/tools/lib/bpf/
|
||||||
|
@ -126,7 +126,7 @@ cc-option = $(call __cc-option, $(CC),\
|
|||||||
# hostcc-option
|
# hostcc-option
|
||||||
# Usage: cflags-y += $(call hostcc-option,-march=winchip-c6,-march=i586)
|
# Usage: cflags-y += $(call hostcc-option,-march=winchip-c6,-march=i586)
|
||||||
hostcc-option = $(call __cc-option, $(HOSTCC),\
|
hostcc-option = $(call __cc-option, $(HOSTCC),\
|
||||||
$(HOSTCFLAGS) $(HOST_EXTRACFLAGS),$(1),$(2))
|
$(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS),$(1),$(2))
|
||||||
|
|
||||||
# cc-option-yn
|
# cc-option-yn
|
||||||
# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
|
# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
|
||||||
|
@ -62,7 +62,7 @@ host-cxxshobjs := $(addprefix $(obj)/,$(host-cxxshobjs))
|
|||||||
#####
|
#####
|
||||||
# Handle options to gcc. Support building with separate output directory
|
# Handle options to gcc. Support building with separate output directory
|
||||||
|
|
||||||
_hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
|
_hostc_flags = $(KBUILD_HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
|
||||||
$(HOSTCFLAGS_$(basetarget).o)
|
$(HOSTCFLAGS_$(basetarget).o)
|
||||||
_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
|
_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
|
||||||
$(HOSTCXXFLAGS_$(basetarget).o)
|
$(HOSTCXXFLAGS_$(basetarget).o)
|
||||||
|
@ -98,4 +98,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXX
|
|||||||
###
|
###
|
||||||
## HOSTCC C flags
|
## HOSTCC C flags
|
||||||
|
|
||||||
host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(HOSTCFLAGS) -D"BUILD_STR(s)=\#s" $(HOSTCFLAGS_$(basetarget).o) $(HOSTCFLAGS_$(obj))
|
host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(KBUILD_HOSTCFLAGS) -D"BUILD_STR(s)=\#s" $(HOSTCFLAGS_$(basetarget).o) $(HOSTCFLAGS_$(obj))
|
||||||
|
@ -31,7 +31,7 @@ INCLUDES := -I$(srctree)/tools/include \
|
|||||||
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
|
-I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
|
||||||
-I$(srctree)/tools/objtool/arch/$(ARCH)/include
|
-I$(srctree)/tools/objtool/arch/$(ARCH)/include
|
||||||
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
|
WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
|
||||||
CFLAGS += -Werror $(WARNINGS) $(HOSTCFLAGS) -g $(INCLUDES)
|
CFLAGS += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES)
|
||||||
LDFLAGS += -lelf $(LIBSUBCMD) $(HOSTLDFLAGS)
|
LDFLAGS += -lelf $(LIBSUBCMD) $(HOSTLDFLAGS)
|
||||||
|
|
||||||
# Allow old libelf to be used:
|
# Allow old libelf to be used:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user