[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7775cc5e-4a24-1e33-aae5-6181ca018d80@android.com>
Date: Wed, 1 Nov 2017 15:14:03 -0700
From: Mark Salyzyn <salyzyn@...roid.com>
To: linux-kernel@...r.kernel.org
Cc: James Morse <james.morse@....com>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Andy Lutomirski <luto@...capital.net>,
Dmitry Safonov <dsafonov@...tuozzo.com>,
John Stultz <john.stultz@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Laura Abbott <labbott@...hat.com>,
Kees Cook <keescook@...omium.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Andy Gross <andy.gross@...aro.org>,
Kevin Brodsky <kevin.brodsky@....com>,
Andrew Pinski <apinski@...ium.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-arm-kernel@...ts.infradead.org, Jon Masters <jcm@...hat.com>
Subject: Re: [PATCH v4 10/12] arm64: vdso: replace gettimeofday.S with global
vgettimeofday.C
On 10/31/2017 11:32 AM, Mark Salyzyn wrote:
> . . .
> diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
> index 62c84f7cb01b..0925f8908dcb 100644
> --- a/arch/arm64/kernel/vdso/Makefile
> +++ b/arch/arm64/kernel/vdso/Makefile
> @@ -5,18 +5,26 @@
> # Heavily based on the vDSO Makefiles for other archs.
> #
>
> -obj-vdso := gettimeofday.o note.o sigreturn.o
> +obj-vdso := vgettimeofday.o note.o sigreturn.o
>
> # Build rules
> targets := $(obj-vdso) vdso.so vdso.so.dbg
> obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
>
> -ccflags-y := -shared -fno-common -fno-builtin
> +ccflags-y := -shared -fno-common -fno-builtin -fno-stack-protector
> +ccflags-y += -DDISABLE_BRANCH_PROFILING
> ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \
> $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
>
> +# Force -O2 to avoid libgcc dependencies
> +CFLAGS_REMOVE_vgettimeofday.o = -pg -Os
> +CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny
> +
This last stanza breaks clang builds. Suggested fix is:
@@ -18,7 +18,11 @@ ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \
# Force -O2 to avoid libgcc dependencies
CFLAGS_REMOVE_vgettimeofday.o = -pg -Os
+ifeq ($(cc-name),clang)
+CFLAGS_vgettimeofday.o = -O2
+else
CFLAGS_vgettimeofday.o = -O2 -mcmodel=tiny
+endif
# Disable gcov profiling for VDSO code
GCOV_PROFILE := n
Holding off respin or followup patch until after we get a response from
Jon Masters <jcm@...dhat.com> on their QE tests on this patch series.
-- Mark
Powered by blists - more mailing lists