From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946789AbcBRRbj (ORCPT ); Thu, 18 Feb 2016 12:31:39 -0500 Received: from mail-qk0-f174.google.com ([209.85.220.174]:34054 "EHLO mail-qk0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1945930AbcBRRbi (ORCPT ); Thu, 18 Feb 2016 12:31:38 -0500 Date: Thu, 18 Feb 2016 12:31:35 -0500 (EST) From: Nicolas Pitre To: Arnd Bergmann cc: Russell King , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Jon Medhurst , Marc Zyngier , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] [RESEND] ARM: pass -march=armv7-a when building NEON files with clang In-Reply-To: <1455815113-2562966-2-git-send-email-arnd@arndb.de> Message-ID: References: <1455815113-2562966-1-git-send-email-arnd@arndb.de> <1455815113-2562966-2-git-send-email-arnd@arndb.de> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Feb 2016, Arnd Bergmann wrote: > clang ignores the -mfpu=neon flag when building with -march=armv6: > > In file included from lib/raid6/neon1.c:27: > clang/3.8.0/include/arm_neon.h:28:2: error: "NEON support not enabled" > > There is no real need to build the file with -march=armv6 in a > multi-CPU enabled kernel, as nothing in here will ever get called > on an ARMv6 CPU. Adding -march=armv7 doesn't hurt and can only > improve the code quality. Is this enough to override a previous -mfpu for gcc? > > Signed-off-by: Arnd Bergmann > --- > arch/arm/lib/Makefile | 2 +- > lib/raid6/Makefile | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile > index d8a780799506..a86c6c8e0648 100644 > --- a/arch/arm/lib/Makefile > +++ b/arch/arm/lib/Makefile > @@ -35,7 +35,7 @@ $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S > $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S > > ifeq ($(CONFIG_KERNEL_MODE_NEON),y) > - NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon > + NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon -march=armv7-a > CFLAGS_xor-neon.o += $(NEON_FLAGS) > obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o > endif > diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile > index 3b10a48fa040..4ef3e800fb39 100644 > --- a/lib/raid6/Makefile > +++ b/lib/raid6/Makefile > @@ -23,7 +23,7 @@ endif > ifeq ($(CONFIG_KERNEL_MODE_NEON),y) > NEON_FLAGS := -ffreestanding > ifeq ($(ARCH),arm) > -NEON_FLAGS += -mfloat-abi=softfp -mfpu=neon > +NEON_FLAGS += -mfloat-abi=softfp -mfpu=neon -march=armv7-a > endif > ifeq ($(ARCH),arm64) > CFLAGS_REMOVE_neon1.o += -mgeneral-regs-only > -- > 2.7.0 > >