From: Vincenzo Frascino <vincenzo.frascino@arm.com>
To: Qian Cai <cai@lca.pw>
Cc: ndesaulniers@google.com,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
natechancellor@gmail.com, Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org
Subject: Re: "arm64: vdso: Substitute gettimeofday() with C implementation" breaks clang build
Date: Tue, 25 Jun 2019 15:54:37 +0100 [thread overview]
Message-ID: <668bbe72-b32b-8cee-ccad-d1f6110c6728@arm.com> (raw)
In-Reply-To: <1561472887.5154.72.camel@lca.pw>
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
Hi Qian,
...
>
> but clang 7.0 is still use in many distros by default, so maybe this commit can
> be fixed by adding a conditional check to use "small" if clang version < 8.0.
>
Could you please verify that the patch below works for you?
Thanks,
Vincenzo
--->8----
[-- Attachment #2: 0001-arm64-vdso-Fix-compilation-with-clang-8.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]
From 0546f3bbea910cd26df8c2ff9ed1a59945bb1bec Mon Sep 17 00:00:00 2001
From: Vincenzo Frascino <vincenzo.frascino@arm.com>
Date: Tue, 25 Jun 2019 15:49:37 +0100
Subject: [PATCH] arm64: vdso: Fix compilation with clang < 8
clang versions previous to 8 do not support -mcmodel=tiny.
Add a check to the vDSO Makefile for arm64 to remove the flag when these
versions of the compiler are detected.
Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
arch/arm64/kernel/vdso/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index ec81d28aeb5d..c11cbf71073f 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -38,6 +38,11 @@ else
CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny -include $(c-gettimeofday-y)
endif
+# Clang versions less than 8 do not support -mcmodel=tiny
+ifeq ($(shell test $(CONFIG_CLANG_VERSION) -lt 80000; echo $$?),0)
+CFLAGS_REMOVE_vgettimeofday.o = -mcmodel=tiny
+endif
+
# Disable gcov profiling for VDSO code
GCOV_PROFILE := n
--
2.22.0
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-06-25 14:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 12:16 "arm64: vdso: Substitute gettimeofday() with C implementation" breaks clang build Qian Cai
2019-06-25 12:47 ` Vincenzo Frascino
2019-06-25 12:56 ` Qian Cai
2019-06-25 13:40 ` Vincenzo Frascino
2019-06-25 13:51 ` Qian Cai
2019-06-25 14:11 ` Vincenzo Frascino
2019-06-25 14:28 ` Qian Cai
2019-06-25 14:30 ` Vincenzo Frascino
2019-06-25 14:54 ` Vincenzo Frascino [this message]
2019-06-25 15:16 ` Qian Cai
2019-06-25 16:26 ` Nick Desaulniers
2019-06-25 17:00 ` Vincenzo Frascino
2019-06-25 17:31 ` Qian Cai
2019-06-25 17:33 ` Vincenzo Frascino
2019-06-26 9:38 ` Will Deacon
2019-06-26 9:45 ` Vincenzo Frascino
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=668bbe72-b32b-8cee-ccad-d1f6110c6728@arm.com \
--to=vincenzo.frascino@arm.com \
--cc=cai@lca.pw \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.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).