From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933480AbdKAWOH (ORCPT ); Wed, 1 Nov 2017 18:14:07 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:47551 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933333AbdKAWOF (ORCPT ); Wed, 1 Nov 2017 18:14:05 -0400 X-Google-Smtp-Source: ABhQp+TOz7y+5UOUp4kPnSIyzG8gdpLLscxKRhr/Y4Lvutcvt8MNPAAIGOMg3xkM2ViqKzw6q9x80Q== Subject: Re: [PATCH v4 10/12] arm64: vdso: replace gettimeofday.S with global vgettimeofday.C To: linux-kernel@vger.kernel.org Cc: James Morse , Russell King , Catalin Marinas , Will Deacon , Andy Lutomirski , Dmitry Safonov , John Stultz , Mark Rutland , Laura Abbott , Kees Cook , Ard Biesheuvel , Andy Gross , Kevin Brodsky , Andrew Pinski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Jon Masters References: <20171031183306.81375-1-salyzyn@android.com> From: Mark Salyzyn Message-ID: <7775cc5e-4a24-1e33-aae5-6181ca018d80@android.com> Date: Wed, 1 Nov 2017 15:14:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171031183306.81375-1-salyzyn@android.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 on their QE tests on this patch series. -- Mark