mirror of
https://github.com/thead-yocto-mirror/meta-riscv
synced 2026-09-16 20:22:38 +02:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 1f96faa30ec089d13045e1c3ba398f812ed4c055 Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Tue, 3 Oct 2017 23:36:56 -0700
|
|
Subject: [PATCH] Use compiler to find libgcc
|
|
|
|
This helps in compiling with toolchains which are relocated
|
|
and may not have same runtime sysroot as build time sysroot
|
|
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
---
|
|
arch/riscv/kernel/vdso/Makefile | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
|
|
index 523d0a8ac8db..d4fa82ccef5b 100644
|
|
--- a/arch/riscv/kernel/vdso/Makefile
|
|
+++ b/arch/riscv/kernel/vdso/Makefile
|
|
@@ -1,5 +1,6 @@
|
|
# Copied from arch/tile/kernel/vdso/Makefile
|
|
|
|
+LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
|
# Symbols present in the vdso
|
|
vdso-syms = rt_sigreturn
|
|
|
|
@@ -48,7 +49,7 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
|
|
# Make sure only to export the intended __vdso_xxx symbol offsets.
|
|
quiet_cmd_vdsold = VDSOLD $@
|
|
cmd_vdsold = $(CC) $(KCFLAGS) -nostdlib $(SYSCFLAGS_$(@F)) \
|
|
- -Wl,-T,$(filter-out FORCE,$^) -o $@.tmp -lgcc && \
|
|
+ -Wl,-T,$(filter-out FORCE,$^) -o $@.tmp $(LIBGCC) && \
|
|
$(CROSS_COMPILE)objcopy \
|
|
$(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@
|
|
|
|
--
|
|
2.14.2
|
|
|