From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] [RESEND] ARM: pass -march=armv7-a when building NEON files with clang
Date: Thu, 18 Feb 2016 18:05:07 +0100 [thread overview]
Message-ID: <1455815113-2562966-2-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1455815113-2562966-1-git-send-email-arnd@arndb.de>
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 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
next prev parent reply other threads:[~2016-02-18 17:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 17:05 [PATCH 0/3] ARM llvmlinux/clang build errors Arnd Bergmann
2016-02-18 17:05 ` Arnd Bergmann [this message]
2016-02-18 17:31 ` [PATCH 1/3] [RESEND] ARM: pass -march=armv7-a when building NEON files with clang Nicolas Pitre
2016-02-19 14:23 ` Arnd Bergmann
2016-02-19 17:08 ` Nicolas Pitre
2016-02-18 17:05 ` [PATCH 2/3] [RESEND] ARM: fix copypage-*.c building " Arnd Bergmann
2016-02-18 17:34 ` Nicolas Pitre
2016-02-18 17:05 ` [PATCH 3/3] [RESEND] ARM: kprobes: use "I" constraint for inline assembly offsets Arnd Bergmann
2016-02-18 18:12 ` Jon Medhurst (Tixy)
2016-02-18 18:59 ` Robin Murphy
2016-02-19 9:34 ` Jon Medhurst (Tixy)
2016-02-18 18:24 ` Nicolas Pitre
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=1455815113-2562966-2-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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