]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
linux: fix passing of host CFLAGS and LDFLAGS
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 4 Mar 2018 21:31:17 +0000 (22:31 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 6 Mar 2018 14:25:08 +0000 (15:25 +0100)
commitdde090c299b0357fdb1a4ec44ad8d332ac57f65e
tree133b6d9bec51623684a2b0711cdea9dbe601d72b
parent9f13f8c2374e8240c1b85c702257341df80bd797
linux: fix passing of host CFLAGS and LDFLAGS

We were passing HOSTCFLAGS="$(HOSTCFLAGS)" to Linux. However:

 - HOSTCFLAGS in Buildroot doesn't exist, and is empty, so this
   assignment never did anything. The name of the variable in
   Buildroot in HOST_CFLAGS.

 - HOSTCFLAGS in Linux isn't used everywhere, and passing it overrides
   the default HOSTCFLAGS value defined in the main Linux kernel
   Makefile.

In addition, there is no way to pass additional host LDFLAGS in the
Linux kernel build system.

Therefore, we simply shoehorn our HOST_CFLAGS and HOST_LDFLAGS while
passing HOSTCC to the Linux kernel build system. This has been tested
to work fine with host OpenSSL and host libelf only available in
$(HOST_DIR).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
linux/linux.mk