All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>,
	Mark Charlebois <charlebm@gmail.com>,
	Behan Webster <behanw@converseincode.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] ARM: pass -march=armv7-a when building NEON files with clang
Date: Mon,  8 Feb 2016 15:25:56 +0100	[thread overview]
Message-ID: <1454941613-2775081-1-git-send-email-arnd@arndb.de> (raw)

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 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 6c7a5b715584..5f6c7eb62cc3 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -39,7 +39,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

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: pass -march=armv7-a when building NEON files with clang
Date: Mon,  8 Feb 2016 15:25:56 +0100	[thread overview]
Message-ID: <1454941613-2775081-1-git-send-email-arnd@arndb.de> (raw)

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 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 6c7a5b715584..5f6c7eb62cc3 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -39,7 +39,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

             reply	other threads:[~2016-02-08 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 14:25 Arnd Bergmann [this message]
2016-02-08 14:25 ` [PATCH 1/3] ARM: pass -march=armv7-a when building NEON files with clang Arnd Bergmann
2016-02-08 14:25 ` [PATCH 2/3] ARM: fix copypage-*.c building " Arnd Bergmann
2016-02-08 14:25   ` Arnd Bergmann
2016-02-08 14:25 ` [PATCH 3/3] ARM: kprobes: use "I" constraint for inline assembly offsets Arnd Bergmann
2016-02-08 14:25   ` Arnd Bergmann

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=1454941613-2775081-1-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=behanw@converseincode.com \
    --cc=charlebm@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.