mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-24 13:36:31 +00:00
Add linux build
This commit is contained in:
parent
3d5be3835f
commit
83cd155bd1
@ -0,0 +1,46 @@
|
||||
|
||||
m ad8804326df075a9935a3751f61e5ad1a2865736 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sun, 4 Mar 2018 22:31:17 +0100
|
||||
Subject: [PATCH] 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>
|
||||
---
|
||||
linux/linux.mk | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/linux/linux.mk b/linux/linux.mk
|
||||
index b724b66..7f318a0 100644
|
||||
--- a/linux/linux.mk
|
||||
+++ b/linux/linux.mk
|
||||
@@ -99,8 +99,7 @@ LINUX_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
|
||||
endif
|
||||
|
||||
LINUX_MAKE_FLAGS = \
|
||||
- HOSTCC="$(HOSTCC)" \
|
||||
- HOSTCFLAGS="$(HOSTCFLAGS)" \
|
||||
+ HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" \
|
||||
ARCH=$(KERNEL_ARCH) \
|
||||
INSTALL_MOD_PATH=$(TARGET_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
--
|
||||
2.7.4
|
||||
|
@ -103,8 +103,7 @@ LINUX_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
|
||||
endif
|
||||
|
||||
LINUX_MAKE_FLAGS = \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
HOSTCFLAGS="$(HOSTCFLAGS)" \
|
||||
HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" \
|
||||
ARCH=$(KERNEL_ARCH) \
|
||||
INSTALL_MOD_PATH=$(TARGET_DIR) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user