Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated assembler doesn't support -mfpu=softvfp+vfp argument #762

Closed
tpimh opened this issue Nov 2, 2019 · 15 comments
Closed

Integrated assembler doesn't support -mfpu=softvfp+vfp argument #762

tpimh opened this issue Nov 2, 2019 · 15 comments
Assignees
Labels
[ARCH] arm32 This bug impacts ARCH=arm [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.9 This bug was fixed in Linux 5.9 [TOOL] integrated-as The issue is relevant to LLVM integrated assembler

Comments

@tpimh
Copy link

tpimh commented Nov 2, 2019

Build of arm32_v6 kernel with integrated-as enabled failing:

clang: warning: argument unused during compilation: '-mfpu=vfp' [-Wunused-command-line-argument]

clang: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'
@tpimh tpimh added [BUG] Untriaged Something isn't working [TOOL] integrated-as The issue is relevant to LLVM integrated assembler [ARCH] arm32 This bug impacts ARCH=arm labels Nov 2, 2019
@nickdesaulniers
Copy link
Member

cc @jcai19 . I wonder what softvfp vs vfp is? Does Clang support either in isolation? (Maybe one is missing, or the + syntax is unsupported?

@jcai19 jcai19 self-assigned this Nov 4, 2019
@12101111
Copy link

12101111 commented Nov 9, 2019

@tpimh
Copy link
Author

tpimh commented Nov 9, 2019

-Wa,-mfpu=softvfp+vfp is appended to AFLAGS here:

KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp -mfloat-abi=soft)

@nickdesaulniers
Copy link
Member

That should use += rather than :=$(KBUILD_AFLAGS:.

@jcai19 jcai19 removed their assignment Dec 2, 2019
@smithp35
Copy link

smithp35 commented Dec 4, 2019

The softvfp+vfp argument is reminiscent of Arm's old proprietary compiler armcc I'll double check tomorrow but I'm pretty sure it will be the equivalent of the compiler option -mfloat-abi=softfp in other words permit use of floating point, but use integer registers to pass floating point parameters. For the assembler this doesn't mean a lot as it is up to the programmer to conform to the procedure call standard, what this might do is set the appropriate build attribute which declares that the file is softfp.

The manual page for armcc on the meaning of softvfp+vfp http://infocenter.arm.com/help/topic/com.arm.doc.dui0472m/chr1359124920656.html

@jcai19
Copy link
Member

jcai19 commented Dec 4, 2019

The softvfp+vfp argument is reminiscent of Arm's old proprietary compiler armcc I'll double check tomorrow but I'm pretty sure it will be the equivalent of the compiler option -mfloat-abi=softfp in other words permit use of floating point, but use integer registers to pass floating point parameters. For the assembler this doesn't mean a lot as it is up to the programmer to conform to the procedure call standard, what this might do is set the appropriate build attribute which declares that the file is softfp.

The manual page for armcc on the meaning of softvfp+vfp http://infocenter.arm.com/help/topic/com.arm.doc.dui0472m/chr1359124920656.html

Thanks a lot for the clarification! Some follow-up questions I have:

  1. Does that mean we could replace this option in the kernel with -Wa,-mfloat-abi=softfp? We do need to add its support in LLVM as the integrated assembler does not support this option either.

  2. Do we need a flag for the vfp part?

  3. The build log (attached below) showed the failure contains both --target=arm-linux-gnueabihf and -Wa,-mfpu=softvfp+vfp -mfloat-abi=soft, which seem to contradict each other. Should the ABI be soft or hard?

llvm-project/build/release/bin/clang -Wp,-MD,arch/arm/vfp/.entry.o.d -nostdinc -isystem llvm-project/build/release/lib/clang/10.0.0/include -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Qunused-arguments -D__ASSEMBLY__ -fno-PIE --target=arm-linux-gnueabihf --prefix=/usr/bin/ --gcc-toolchain=/usr -Werror=unknown-warning-option -mabi=aapcs-linux -mfpu=vfp -funwind-tables -meabi gnu -marm -Wa,-W -D__LINUX_ARM_ARCH__=7 -march=armv7-a -include asm/unified.h -Wa,-mfpu=softvfp+vfp -mfloat-abi=soft -c -o arch/arm/vfp/entry.o arch/arm/vfp/entry.S

@smithp35
Copy link

smithp35 commented Dec 5, 2019

Looking at binutils-gdb/gas/config the softvfp+vfp option is described in arm_option_fpu_value_table. An extract:
{"softvfp", FPU_ARCH_VFP},
{"softvfp+vfp", FPU_ARCH_VFP_V2},
{"vfp", FPU_ARCH_VFP_V2},
...
{"vfpv2", FPU_ARCH_VFP_V2},

So it looks like the only effect it has is to enable vfpv2. It doesn't have anything to do with the float-abi, which is reasonable as that isn't something that the assembler can validate anyway. It doesn't set any float-abi build attribute either.

Looking at the table I'd say softvfp+vfp is synonymous with vfpv2 which is supported by both clang and gas.

For your specific questions:

  1. No it doesn't look it. After looking at the source, I think it is best to think of softvfp+vfp in the assembler as just -mfpu=vfpv2 , its effect is independent of mfloat-abi
  2. I think all you should need is -mfpu=vfpv2 here to replicate the original behaviour.
  3. Yes -mfloat-abi=soft does contradict -Wa,-mfpu=softvfp+vfp. IIRC -mfloat-abi=soft disables the use of floating point instructions, or at least would in the integrated assembler. Looking at the file in question, it doesn't look like it uses any floating point instructions anyway.

With the answer to 3 in mind it will be worth checking with people familiar with that part of Linux, what that code is doing. It looks like it is emulation code, the original vfp had some functionality that was implemented in software by a support library. This support code may not necessarily need to use floating point instructions.

To summarise I think -mfpu=vfpv2 is an option that would work for both clang and gas, but you may be able to get rid of -mfpu if no floating point instructions are expected to be used.

@smithp35
Copy link

smithp35 commented Dec 5, 2019

One other thing I've just realised is that since clang has switching to github and I changed my email address to my linaro account, gmail, or most likely a rogue filter, has been burying emails in the middle of cfe-commits and llvm-commits so I've probably missed a few conversations. My apologies if I've been cc:ed and not responded, filter is now fixed.

@jcai19
Copy link
Member

jcai19 commented Dec 5, 2019

Looking at binutils-gdb/gas/config the softvfp+vfp option is described in arm_option_fpu_value_table. An extract:
{"softvfp", FPU_ARCH_VFP},
{"softvfp+vfp", FPU_ARCH_VFP_V2},
{"vfp", FPU_ARCH_VFP_V2},
...
{"vfpv2", FPU_ARCH_VFP_V2},

So it looks like the only effect it has is to enable vfpv2. It doesn't have anything to do with the float-abi, which is reasonable as that isn't something that the assembler can validate anyway. It doesn't set any float-abi build attribute either.

Looking at the table I'd say softvfp+vfp is synonymous with vfpv2 which is supported by both clang and gas.

For your specific questions:

  1. No it doesn't look it. After looking at the source, I think it is best to think of softvfp+vfp in the assembler as just -mfpu=vfpv2 , its effect is independent of mfloat-abi
  2. I think all you should need is -mfpu=vfpv2 here to replicate the original behaviour.
  3. Yes -mfloat-abi=soft does contradict -Wa,-mfpu=softvfp+vfp. IIRC -mfloat-abi=soft disables the use of floating point instructions, or at least would in the integrated assembler. Looking at the file in question, it doesn't look like it uses any floating point instructions anyway.

With the answer to 3 in mind it will be worth checking with people familiar with that part of Linux, what that code is doing. It looks like it is emulation code, the original vfp had some functionality that was implemented in software by a support library. This support code may not necessarily need to use floating point instructions.

To summarise I think -mfpu=vfpv2 is an option that would work for both clang and gas, but you may be able to get rid of -mfpu if no floating point instructions are expected to be used.

Thanks for the summary! So it seems the change should be done on Linux. Will defer to the experts. @nickdesaulniers anyone we should talk to regarding this change? Thanks.

@jcai19
Copy link
Member

jcai19 commented Dec 5, 2019

One other thing I've just realised is that since clang has switching to github and I changed my email address to my linaro account, gmail, or most likely a rogue filter, has been burying emails in the middle of cfe-commits and llvm-commits so I've probably missed a few conversations. My apologies if I've been cc:ed and not responded, filter is now fixed.

Glad you sort it out! Can't speak for the others but at least for me it's all good :)

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Dec 6, 2019

STR:

$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make CC=clang AS=clang -j71 aspeed_g5_defconfig
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make CC=clang AS=clang -j71 arch/arm/vfp/entry.o

patch:

From 49f0b8d8eafe7fbd79af332060410235f9dce92b Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers@google.com>
Date: Thu, 5 Dec 2019 17:18:44 -0800
Subject: [PATCH] arm: vfp: prefer vfpv2 to softvfp+vfp

The assembler option -mfpu=softvfp+vfp isn't recognized by Clang's
integrated assembler. GNU AS aliases `softvfp+vfp` to `vfpv2` which
clang does understand.

This also reverts
commit 82b9c18dc0ee ("ARM: vfp: use -mfloat-abi=soft to build vfp")
since the error reported cannot be reproduced with
CROSS_COMPILE=arm-linux-gnueabihf- and AS=as (ie. binutils, not clang).

Link: https://github.com/ClangBuiltLinux/linux/issues/762
Reported-by: Dmitry Golovin <dima@golovin.in>
Suggested-by: Jian Cai <jiancai@google.com>
Suggested-by: Peter Smith <peter.smith@linaro.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/arm/vfp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/vfp/Makefile b/arch/arm/vfp/Makefile
index 9975b63ac3b0..5a36b8c4b4db 100644
--- a/arch/arm/vfp/Makefile
+++ b/arch/arm/vfp/Makefile
@@ -8,6 +8,6 @@
 # ccflags-y := -DDEBUG
 # asflags-y := -DDEBUG
 
-KBUILD_AFLAGS	:=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp -mfloat-abi=soft)
+KBUILD_AFLAGS	+= -Wa,-mfpu=vfpv2
 
 obj-y		+= vfpmodule.o entry.o vfphw.o vfpsingle.o vfpdouble.o
-- 
2.24.0.393.g34dc348eaf-goog

Yes -mfloat-abi=soft does contradict -Wa,-mfpu=softvfp+vfp. IIRC -mfloat-abi=soft disables the use of floating point instructions, or at least would in the integrated assembler. Looking at the file in question, it doesn't look like it uses any floating point instructions anyway.
With the answer to 3 in mind it will be worth checking with people familiar with that part of Linux, what that code is doing. It looks like it is emulation code, the original vfp had some functionality that was implemented in software by a support library. This support code may not necessarily need to use floating point instructions.

Conviently, @arndb wrote that in commit 82b9c18 ("ARM: vfp: use -mfloat-abi=soft to build vfp"):

    ARM: vfp: use -mfloat-abi=soft to build vfp
    
    Distros are starting to ship with toolchains defaulting to
    hardfloat. Using such a compiler to build the kernel fails
    in the VFP directory with
    
    arch/arm/vfp/entry.S:1:0: sorry, unimplemented: -mfloat-abi=hard and VFP
    
    Adding -mfloat-abi=soft to the gcc command line fixes this.

@nickdesaulniers nickdesaulniers added [BUG] linux A bug that should be fixed in the mainline kernel. [PATCH] Exists There is a patch that fixes this issue and removed [BUG] Untriaged Something isn't working labels Dec 6, 2019
@ardbiesheuvel
Copy link

ardbiesheuvel commented Dec 7, 2019

That should use += rather than :=$(KBUILD_AFLAGS:.

I don't think that does what you think it does. AFAICT, this replaces '-msoft-float' with the string after the 'equals' sign, which you cannot achieve with +=

@agners
Copy link

agners commented Mar 30, 2020

Just realized that this is taken care of by this patch:
https://lore.kernel.org/lkml/4165f81a1f1fdc53fe273307d1accb40f8663e01.1583360296.git.stefan@agner.ch/

It is related to #905. The approach to fix #905 I took uses assembler directives to select architecture/floating point units which makes the command line arguments superfluous.

@agners agners self-assigned this Mar 30, 2020
fengguang pushed a commit to 0day-ci/linux that referenced this issue Apr 21, 2020
Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux#762
Signed-off-by: Stefan Agner <stefan@agner.ch>
parthibx24 pushed a commit to parthibx24/android_kernel_mediatek_k80 that referenced this issue Apr 26, 2020
Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762
Signed-off-by: Stefan Agner <stefan@agner.ch>
@nickdesaulniers
Copy link
Member

@nickdesaulniers nickdesaulniers added [PATCH] Submitted A patch has been submitted for review and removed [PATCH] Exists There is a patch that fixes this issue labels Jun 26, 2020
fengguang pushed a commit to 0day-ci/linux that referenced this issue Jun 26, 2020
Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux#762
Signed-off-by: Stefan Agner <stefan@agner.ch>
ruscur pushed a commit to ruscur/linux that referenced this issue Jul 21, 2020
…ents

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
ruscur pushed a commit to ruscur/linux that referenced this issue Jul 22, 2020
…ents

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
@nickdesaulniers
Copy link
Member

Looks like these landed in v5.9-rc1.

  1. a6c3087
  2. ee44033
  3. 2cbd1cc

@nickdesaulniers nickdesaulniers added [FIXED][LINUX] 5.9 This bug was fixed in Linux 5.9 and removed [PATCH] Submitted A patch has been submitted for review labels Feb 22, 2021
mrchapp pushed a commit to mrchapp/linux that referenced this issue Mar 15, 2021
…ents

commit a6c3087 upstream.

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
KonstaT pushed a commit to lineage-rpi/android_kernel_brcm_rpi that referenced this issue Nov 4, 2021
…bler arguments

commit a6c3087 upstream.

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Bug: 141693040
Change-Id: Ie862bd7639d189d77c9fcf9662c716845b2b9a1a
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this issue Jun 30, 2022
…ents

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this issue Jun 30, 2022
…ents

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jun 30, 2022
…ents

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jul 2, 2022
…ents

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jul 2, 2022
…ents

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Jul 2, 2022
…ents

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jul 2, 2022
…ents

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista that referenced this issue Aug 5, 2022
…ents

Source: Kernel.org
MR: 120397
Type: Integration
Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-5.4.y
ChangeID: 472671eec98a9ca2995c34cf9d29873863180047
Description:

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
oraclelinuxkernel pushed a commit to oracle/linux-uek that referenced this issue Aug 26, 2022
…ents

commit a6c3087 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 472671eec98a9ca2995c34cf9d29873863180047)
Signed-off-by: Sherry Yang <sherry.yang@oracle.com>
bengris32 pushed a commit to amazon-oss/android_kernel_amazon_mt8695 that referenced this issue May 1, 2023
…bler arguments

commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ic4d1a41e9674efd89808a8c9c316d3a63014f008
R0rt1z2 pushed a commit to amazon-oss/android_kernel_amazon_mt8695 that referenced this issue May 2, 2023
…bler arguments

commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ic4d1a41e9674efd89808a8c9c316d3a63014f008
R0rt1z2 pushed a commit to amazon-oss/android_kernel_amazon_mt8695 that referenced this issue May 3, 2023
…bler arguments

commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ic4d1a41e9674efd89808a8c9c316d3a63014f008
yuurha12 pushed a commit to yuurha12/moonstone_personal that referenced this issue Jul 30, 2023
…ents

commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 upstream

Explicit FPU selection has been introduced in commit 1a6be26d5b1a
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
R0rt1z2 pushed a commit to amazon-oss/android_kernel_amazon_mt8695 that referenced this issue Sep 30, 2023
 assembler arguments

commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Change-Id: I664f4ea836a7a492bbc0bd456277d9c4cdeec0cf
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
R0rt1z2 pushed a commit to amazon-oss/android_kernel_amazon_mt8695 that referenced this issue Sep 30, 2023
…ents

commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Change-Id: Ia32f37605898b94c38ab989a28e2d02da173de6b
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
R0rt1z2 pushed a commit to amazon-oss/android_kernel_amazon_mt8695 that referenced this issue Sep 30, 2023
…bler arguments

commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 upstream

Explicit FPU selection has been introduced in commit 1a6be26
("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected")
to make use of assembler mnemonics for VFP instructions.

However, clang currently does not support passing assembler flags
like this and errors out with:
clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp'

Make use of the .fpu assembler directives to select the floating point
hardware selectively. Also use the new unified assembler language
mnemonics. This allows to build these procedures with Clang.

Link: ClangBuiltLinux/linux#762

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ic4d1a41e9674efd89808a8c9c316d3a63014f008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ARCH] arm32 This bug impacts ARCH=arm [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.9 This bug was fixed in Linux 5.9 [TOOL] integrated-as The issue is relevant to LLVM integrated assembler
Projects
None yet
Development

No branches or pull requests

7 participants