Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit 047a943

Browse files
committed
patches: Add a patch for ppc64
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
1 parent 3196157 commit 047a943

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From 959a7892b40ce6553827343b1d25a0aad507b467 Mon Sep 17 00:00:00 2001
2+
From: Daniel Axtens <dja@axtens.net>
3+
Date: Thu, 10 Jan 2019 12:42:58 +1100
4+
Subject: [PATCH] powerpc/vdso32: Drop -mabi=elfv1 for 32 bit objects
5+
6+
All 64-bit objects need to specify the flag to be compiled correctly, we
7+
just don't need it for 32-bit objects. GCC just ignored it, but clang
8+
doesn't.
9+
10+
Link: https://github.com/ClangBuiltLinux/linux/issues/240
11+
Signed-off-by: Daniel Axtens <dja@axtens.net>
12+
Signed-off-by: Joel Stanley <joel@jms.id.au>
13+
(am from https://lore.kernel.org/linuxppc-dev/20190110014258.20963-1-joel@jms.id.au/)
14+
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
15+
---
16+
arch/powerpc/kernel/vdso32/Makefile | 14 ++++++++++++++
17+
1 file changed, 14 insertions(+)
18+
19+
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
20+
index 06f54d947057..d50978ec2ee5 100644
21+
--- a/arch/powerpc/kernel/vdso32/Makefile
22+
+++ b/arch/powerpc/kernel/vdso32/Makefile
23+
@@ -34,6 +34,20 @@ obj-y += vdso32_wrapper.o
24+
extra-y += vdso32.lds
25+
CPPFLAGS_vdso32.lds += -P -C -Upowerpc
26+
27+
+# clang refuses to accept -mabi=elfv1 for when using the
28+
+# 64-bit target in 32-bit mode
29+
+ifdef CONFIG_CC_IS_CLANG
30+
+ifdef CONFIG_PPC64
31+
+AFLAGS_REMOVE_getcpu.o += -mabi=elfv1
32+
+endif
33+
+AFLAGS_REMOVE_sigtramp.o += -mabi=elfv1
34+
+AFLAGS_REMOVE_gettimeofday.o += -mabi=elfv1
35+
+AFLAGS_REMOVE_datapage.o += -mabi=elfv1
36+
+AFLAGS_REMOVE_cacheflush.o += -mabi=elfv1
37+
+AFLAGS_REMOVE_note.o += -mabi=elfv1
38+
+endif
39+
+
40+
+
41+
# Force dependency (incbin is bad)
42+
$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
43+
44+
--
45+
2.22.0
46+

0 commit comments

Comments
 (0)