blob: d4fe49ae6efa37c9e9eb20cc3ec10d7769b7b4f3 [file] [log] [blame]
Andrew Geisslerfc7e7972023-09-11 08:24:07 -04001From ef156578c1f7100b339ddfe956ff2cd89d61e0d4 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>
Patrick Williams8dd68482022-10-04 07:57:18 -050014---
15 build/linux/linux.gni | 1 +
16 1 file changed, 1 insertion(+)
17
Brad Bishopbec4ebc2022-08-03 09:55:16 -040018diff --git a/build/linux/linux.gni b/build/linux/linux.gni
Andrew Geisslerfc7e7972023-09-11 08:24:07 -040019index 497915290106..0e0167d5f485 100644
Brad Bishopbec4ebc2022-08-03 09:55:16 -040020--- a/build/linux/linux.gni
21+++ b/build/linux/linux.gni
Andrew Geisslerfc7e7972023-09-11 08:24:07 -040022@@ -54,6 +54,7 @@ template("linux_kernel") {
Brad Bishopbec4ebc2022-08-03 09:55:16 -040023 "LLVM=1",
24 "LLVM_IAS=1",
25 "CROSS_COMPILE=aarch64-linux-gnu-",
26+ "HOSTLDFLAGS=" + getenv("BUILD_LDFLAGS"),
Patrick Williams8dd68482022-10-04 07:57:18 -050027
Brad Bishopbec4ebc2022-08-03 09:55:16 -040028 # Build out-of-tree in `target_out_dir`.
29 "O=" + rebase_path(target_out_dir),