blob: 2a34239050f657bd584ca81f7f50ac3c2aba2873 [file] [log] [blame]
Patrick Williams8dd68482022-10-04 07:57:18 -05001From 9b1b93184c365a07b340c9404a6a0581e971bd54 Mon Sep 17 00:00:00 2001
2From: 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 Williams8dd68482022-10-04 07:57:18 -050020index 45860fa..b010254 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),