Thread (4 messages) 4 messages, 4 authors, 2019-01-10

Re: [PATCH] powerpc/vdso32: Drop -mabi=elfv1 for 32 bit objects

flat view

From: Christophe Leroy <hidden>
Date: 2019-01-10 07:12:23


Le 10/01/2019 à 02:42, Joel Stanley a écrit :
quoted hunk ↗ jump to hunk
From: Daniel Axtens <redacted>

All 64-bit objects need to specify the flag to be compiled correctly, we
just don't need it for 32-bit objects. GCC just ignored it, but clang
doesn't.

Link: https://github.com/ClangBuiltLinux/linux/issues/240
Signed-off-by: Daniel Axtens <redacted>
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
  arch/powerpc/kernel/vdso32/Makefile | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
index 50112d4473bb..6bd41756e0c7 100644
--- a/arch/powerpc/kernel/vdso32/Makefile
+++ b/arch/powerpc/kernel/vdso32/Makefile
@@ -34,6 +34,20 @@ obj-y += vdso32_wrapper.o
  extra-y += vdso32.lds
  CPPFLAGS_vdso32.lds += -P -C -Upowerpc
  
+# clang refuses to accept -mabi=elfv1 for when using the
+# 64-bit target in 32-bit mode
+ifdef CONFIG_CC_IS_CLANG
If -mabi=elfv1 is unneeded even for GCC, why depend on CLANG ?
quoted hunk ↗ jump to hunk
+ifdef CONFIG_PPC64
+AFLAGS_REMOVE_getcpu.o += -mabi=elfv1
+endif
Why only this one is inside the ifdef ? powerpc Makefile only set -mabi=elfv1 when CONFIG_PPC64 is set, so all objects should be handled the same way.

And would it harm just doing it all the time, regardless of CONFIG_PPC64 ?

Christophe
quoted hunk ↗ jump to hunk
+AFLAGS_REMOVE_sigtramp.o += -mabi=elfv1
+AFLAGS_REMOVE_gettimeofday.o += -mabi=elfv1
+AFLAGS_REMOVE_datapage.o += -mabi=elfv1
+AFLAGS_REMOVE_cacheflush.o += -mabi=elfv1
+AFLAGS_REMOVE_note.o += -mabi=elfv1
+endif
+
+
  # Force dependency (incbin is bad)
  $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help