blob: 5c69b788385a094bfe472c0dcb574a1b7eb6b477 [file] [log] [blame]
Patrick Williams7784c422022-11-17 07:29:11 -06001From b54c7b4d325b7effbebe5bdd86d0cfceedb66b9d Mon Sep 17 00:00:00 2001
Patrick Williams8dd68482022-10-04 07:57:18 -05002From: Ross Burton <ross.burton@arm.com>
3Date: Tue, 9 Nov 2021 23:31:22 +0000
4Subject: [PATCH] arm/hafnium: fix kernel tool linking
5
Brad Bishopbec4ebc2022-08-03 09:55:16 -04006We need to be sure that the host linker flags are passed to the kernel build,
7as otherwise it is possible that binaries are incorrectly linked. For example:
8
9HOSTCC scripts/extract-cert
10ld: .../recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libcrypto.so: undefined reference to `pthread_once@GLIBC_2.34'
11
12Upstream-Status: Inappropriate
13Signed-off-by: Ross Burton <ross.burton@arm.com>
14
Patrick Williams8dd68482022-10-04 07:57:18 -050015---
16 build/linux/linux.gni | 1 +
17 1 file changed, 1 insertion(+)
18
Brad Bishopbec4ebc2022-08-03 09:55:16 -040019diff --git a/build/linux/linux.gni b/build/linux/linux.gni
Patrick Williams7784c422022-11-17 07:29:11 -060020index 45860fab..b0102544 100644
Brad Bishopbec4ebc2022-08-03 09:55:16 -040021--- a/build/linux/linux.gni
22+++ b/build/linux/linux.gni
23@@ -60,6 +60,7 @@ template("linux_kernel") {
24 "LLVM=1",
25 "LLVM_IAS=1",
26 "CROSS_COMPILE=aarch64-linux-gnu-",
27+ "HOSTLDFLAGS=" + getenv("BUILD_LDFLAGS"),
Patrick Williams8dd68482022-10-04 07:57:18 -050028
Brad Bishopbec4ebc2022-08-03 09:55:16 -040029 # Build out-of-tree in `target_out_dir`.
30 "O=" + rebase_path(target_out_dir),