Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame^] | 1 | From b54c7b4d325b7effbebe5bdd86d0cfceedb66b9d Mon Sep 17 00:00:00 2001 |
Patrick Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame] | 2 | From: Ross Burton <ross.burton@arm.com> |
| 3 | Date: Tue, 9 Nov 2021 23:31:22 +0000 |
| 4 | Subject: [PATCH] arm/hafnium: fix kernel tool linking |
| 5 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 6 | We need to be sure that the host linker flags are passed to the kernel build, |
| 7 | as otherwise it is possible that binaries are incorrectly linked. For example: |
| 8 | |
| 9 | HOSTCC scripts/extract-cert |
| 10 | ld: .../recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/libcrypto.so: undefined reference to `pthread_once@GLIBC_2.34' |
| 11 | |
| 12 | Upstream-Status: Inappropriate |
| 13 | Signed-off-by: Ross Burton <ross.burton@arm.com> |
| 14 | |
Patrick Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame] | 15 | --- |
| 16 | build/linux/linux.gni | 1 + |
| 17 | 1 file changed, 1 insertion(+) |
| 18 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 19 | diff --git a/build/linux/linux.gni b/build/linux/linux.gni |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame^] | 20 | index 45860fab..b0102544 100644 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 21 | --- 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 Williams | 8dd6848 | 2022-10-04 07:57:18 -0500 | [diff] [blame] | 28 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 29 | # Build out-of-tree in `target_out_dir`. |
| 30 | "O=" + rebase_path(target_out_dir), |