aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-13 13:37:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-13 13:37:57 -0700
commit80fc62380995b02492245a9971944e4713a5eb63 (patch)
tree248d043f4d68d08330402e7280af366f1290c965 /Makefile
parentMerge tag 'trace-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace (diff)
parentkbuild: Enable Large File Support for hostprogs (diff)
downloadwireguard-linux-80fc62380995b02492245a9971944e4713a5eb63.tar.xz
wireguard-linux-80fc62380995b02492245a9971944e4713a5eb63.zip
Merge tag 'kbuild-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull more Kbuild updates from Masahiro Yamada: - Move generic-y of exported headers to uapi/asm/Kbuild for complete de-coupling of UAPI - Clean up scripts/Makefile.headersinst - Fix host programs for 32 bit machine with XFS file system * tag 'kbuild-v4.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (29 commits) kbuild: Enable Large File Support for hostprogs kbuild: remove wrapper files handling from Makefile.headersinst kbuild: split exported generic header creation into uapi-asm-generic kbuild: do not include old-kbuild-file from Makefile.headersinst xtensa: move generic-y of exported headers to uapi/asm/Kbuild unicore32: move generic-y of exported headers to uapi/asm/Kbuild tile: move generic-y of exported headers to uapi/asm/Kbuild sparc: move generic-y of exported headers to uapi/asm/Kbuild sh: move generic-y of exported headers to uapi/asm/Kbuild parisc: move generic-y of exported headers to uapi/asm/Kbuild openrisc: move generic-y of exported headers to uapi/asm/Kbuild nios2: move generic-y of exported headers to uapi/asm/Kbuild nios2: remove unneeded arch/nios2/include/(generated/)asm/signal.h microblaze: move generic-y of exported headers to uapi/asm/Kbuild metag: move generic-y of exported headers to uapi/asm/Kbuild m68k: move generic-y of exported headers to uapi/asm/Kbuild m32r: move generic-y of exported headers to uapi/asm/Kbuild ia64: remove redundant generic-y += kvm_para.h from asm/Kbuild hexagon: move generic-y of exported headers to uapi/asm/Kbuild h8300: move generic-y of exported headers to uapi/asm/Kbuild ...
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 17 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 547947ff87de..44f5bfd9fa55 100644
--- a/Makefile
+++ b/Makefile
@@ -294,10 +294,17 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
+HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS)
+HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
+HOST_LFS_LIBS := $(shell getconf LFS_LIBS)
+
HOSTCC = gcc
HOSTCXX = g++
-HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
-HOSTCXXFLAGS = -O2
+HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
+ -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
+HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
+HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
+HOST_LOADLIBES := $(HOST_LFS_LIBS)
ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
HOSTCFLAGS += -Wno-unused-value -Wno-unused-parameter \
@@ -408,7 +415,7 @@ KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(S
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
-export CPP AR NM STRIP OBJCOPY OBJDUMP
+export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES
export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
@@ -456,10 +463,11 @@ ifneq ($(KBUILD_SRC),)
endif
# Support for using generic headers in asm-generic
-PHONY += asm-generic
-asm-generic:
+PHONY += asm-generic uapi-asm-generic
+asm-generic: uapi-asm-generic
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
src=asm obj=arch/$(SRCARCH)/include/generated/asm
+uapi-asm-generic:
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm
@@ -1136,7 +1144,7 @@ firmware_install:
#Default location for installed headers
export INSTALL_HDR_PATH = $(objtree)/usr
-# If we do an all arch process set dst to asm-$(hdr-arch)
+# If we do an all arch process set dst to include/arch-$(hdr-arch)
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(hdr-arch), dst=include)
PHONY += archheaders
@@ -1146,7 +1154,7 @@ PHONY += archscripts
archscripts:
PHONY += __headers
-__headers: $(version_h) scripts_basic asm-generic archheaders archscripts
+__headers: $(version_h) scripts_basic uapi-asm-generic archheaders archscripts
$(Q)$(MAKE) $(build)=scripts build_unifdef
PHONY += headers_install_all
@@ -1157,7 +1165,7 @@ PHONY += headers_install
headers_install: __headers
$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
$(error Headers not exportable for the $(SRCARCH) architecture))
- $(Q)$(MAKE) $(hdr-inst)=include/uapi
+ $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst)
PHONY += headers_check_all
@@ -1166,7 +1174,7 @@ headers_check_all: headers_install_all
PHONY += headers_check
headers_check: headers_install
- $(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
+ $(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include HDRCHECK=1
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) HDRCHECK=1
# ---------------------------------------------------------------------------