linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	Daniel Axtens <dja@axtens.net>
Subject: [PATCH] powerpc/vdso32: Drop -mabi=elfv1 for 32 bit objects
Date: Thu, 10 Jan 2019 12:42:58 +1100	[thread overview]
Message-ID: <20190110014258.20963-1-joel@jms.id.au> (raw)

From: Daniel Axtens <dja@axtens.net>

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 <dja@axtens.net>
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
+ifdef CONFIG_PPC64
+AFLAGS_REMOVE_getcpu.o += -mabi=elfv1
+endif
+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
 
-- 
2.19.1


             reply	other threads:[~2019-01-10  1:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10  1:42 Joel Stanley [this message]
2019-01-10  7:10 ` [PATCH] powerpc/vdso32: Drop -mabi=elfv1 for 32 bit objects Christophe Leroy
2019-01-10 14:45   ` Daniel Axtens
2019-01-10 15:28   ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110014258.20963-1-joel@jms.id.au \
    --to=joel@jms.id.au \
    --cc=dja@axtens.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).