aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2018-07-09 20:46:02 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-17 12:18:05 -0400
commitf92d19e0ef9bbbb2984845682e740934ad45473b (patch)
treebaa208d84abaa2d8bcddf07b358cdd33bb081ac2
parent8377bd2b9ee1be35b39b5523f640a2b75ddd7c4e (diff)
kbuild: Use HOST*FLAGS options from the command line
Now that we have the rename in place, reuse the HOST*FLAGS options as something that can be set from the command line and included with the rest of the flags. Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--Documentation/kbuild/kbuild.txt16
-rw-r--r--Makefile9
2 files changed, 21 insertions, 4 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index 114c7ce7b58d..8390c360d4b3 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -50,6 +50,22 @@ LDFLAGS_MODULE
50-------------------------------------------------- 50--------------------------------------------------
51Additional options used for $(LD) when linking modules. 51Additional options used for $(LD) when linking modules.
52 52
53HOSTCFLAGS
54--------------------------------------------------
55Additional flags to be passed to $(HOSTCC) when building host programs.
56
57HOSTCXXFLAGS
58--------------------------------------------------
59Additional flags to be passed to $(HOSTCXX) when building host programs.
60
61HOSTLDFLAGS
62--------------------------------------------------
63Additional flags to be passed when linking host programs.
64
65HOSTLDLIBS
66--------------------------------------------------
67Additional libraries to link against when building host programs.
68
53KBUILD_KCONFIG 69KBUILD_KCONFIG
54-------------------------------------------------- 70--------------------------------------------------
55Set the top-level Kconfig file to the value of this environment 71Set the top-level Kconfig file to the value of this environment
diff --git a/Makefile b/Makefile
index caad81c802a4..433f87015c1d 100644
--- a/Makefile
+++ b/Makefile
@@ -360,10 +360,11 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
360HOSTCC = gcc 360HOSTCC = gcc
361HOSTCXX = g++ 361HOSTCXX = 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) 364 $(HOSTCFLAGS)
365KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) 365KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
366KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) 366KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
367KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
367 368
368# Make variables (CC, etc...) 369# Make variables (CC, etc...)
369AS = $(CROSS_COMPILE)as 370AS = $(CROSS_COMPILE)as