* [PATCH 6.1 0/4] Update as-{instr,option} to use KBUILD_AFLAGS
@ 2023-06-14 18:04 Nathan Chancellor
2023-06-14 18:04 ` [PATCH 6.1 2/4] MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option Nathan Chancellor
2023-06-19 7:51 ` [PATCH 6.1 0/4] Update as-{instr,option} to use KBUILD_AFLAGS Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2023-06-14 18:04 UTC (permalink / raw)
To: gregkh, sashal, ndesaulniers
Cc: naresh.kamboju, stable, llvm, Masahiro Yamada, Nathan Chancellor,
Linux Kernel Functional Testing, Anders Roxell, tsbogend,
linux-mips, Philippe Mathieu-Daudé
Hi all,
This series backports commit d5c8d6e0fa61 ("kbuild: Update assembler
calls to use proper flags and language target") to linux-6.1.y to
address a recent issue caused by a change in behavior in clang:
https://lore.kernel.org/CA+G9fYsJq0sPC+q6vLNKUgBqCGmmjDrfeP4R1-95Eu28FJRY_A@mail.gmail.com/
https://lore.kernel.org/20230612185424.GA2891387@dev-arch.thelio-3990X/
While that was not the original intention of the aforementioned change,
it ends up resolving the issue for the same reason, by not passing flags
that are not supported or necessary for the current language target
(KBUILD_CFLAGS for .c files and KBUILD_AFLAGS for .S files) when testing
flags for that language target.
All patches except the second one are direct backports from mainline.
The second patch is a stable specific patch because the upstream
solution could break stable due to the minimum supported version of
binutils in mainline being a newer version than 6.1 and earlier; it
chooses to do the more conservative fix, which was alluded to in the
changelog of the upstream commit.
For now, this is just a 6.1 issue. If the issue occurs in older
releases, I will send separate backports. If there are any issues or
objections to this series, please let me know.
Cheers,
Nathan
---
Nathan Chancellor (2):
MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option
MIPS: Prefer cc-option for additions to cflags
Nick Desaulniers (2):
x86/boot/compressed: prefer cc-option for CFLAGS additions
kbuild: Update assembler calls to use proper flags and language target
arch/mips/Makefile | 4 ++--
arch/mips/loongson2ef/Platform | 2 +-
arch/x86/boot/compressed/Makefile | 2 +-
scripts/Kconfig.include | 2 +-
scripts/Makefile.compiler | 8 ++++----
scripts/as-version.sh | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
---
base-commit: ca87e77a2ef8b298aa9f69658d5898e72ee450fe
change-id: 20230612-6-1-asssembler-target-llvm-17-3f8101fc008f
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 6.1 2/4] MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option
2023-06-14 18:04 [PATCH 6.1 0/4] Update as-{instr,option} to use KBUILD_AFLAGS Nathan Chancellor
@ 2023-06-14 18:04 ` Nathan Chancellor
2023-06-19 7:51 ` [PATCH 6.1 0/4] Update as-{instr,option} to use KBUILD_AFLAGS Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2023-06-14 18:04 UTC (permalink / raw)
To: gregkh, sashal, ndesaulniers
Cc: naresh.kamboju, stable, llvm, Nathan Chancellor, tsbogend,
linux-mips
This patch is for linux-6.1.y and earlier, it has no direct mainline
equivalent.
In order to backport commit d5c8d6e0fa61 ("kbuild: Update assembler
calls to use proper flags and language target") to resolve a separate
issue regarding PowerPC, the problem noticed and fixed by
commit 80a20d2f8288 ("MIPS: Always use -Wa,-msoft-float and eliminate
GAS_HAS_SET_HARDFLOAT") needs to be addressed. Unfortunately, 6.1 and
earlier do not contain commit e4412739472b ("Documentation: raise
minimum supported version of binutils to 2.25"), so it cannot be assumed
that all supported versions of GNU as have support for -msoft-float.
In order to switch from KBUILD_CFLAGS to KBUILD_AFLAGS in as-option
without consequence, move the '-Wa,-msoft-float' check to cc-option,
including '$(cflags-y)' directly to avoid the issue mentioned in
commit 80a20d2f8288 ("MIPS: Always use -Wa,-msoft-float and eliminate
GAS_HAS_SET_HARDFLOAT").
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
Cc: tsbogend@alpha.franken.de
Cc: linux-mips@vger.kernel.org
---
arch/mips/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index b296e33f8e33..de8d508f27af 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -109,7 +109,7 @@ endif
# (specifically newer than 2.24.51.20140728) we then also need to explicitly
# set ".set hardfloat" in all files which manipulate floating point registers.
#
-ifneq ($(call as-option,-Wa$(comma)-msoft-float,),)
+ifneq ($(call cc-option,$(cflags-y) -Wa$(comma)-msoft-float,),)
cflags-y += -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float
endif
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.1 0/4] Update as-{instr,option} to use KBUILD_AFLAGS
2023-06-14 18:04 [PATCH 6.1 0/4] Update as-{instr,option} to use KBUILD_AFLAGS Nathan Chancellor
2023-06-14 18:04 ` [PATCH 6.1 2/4] MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option Nathan Chancellor
@ 2023-06-19 7:51 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2023-06-19 7:51 UTC (permalink / raw)
To: Nathan Chancellor
Cc: sashal, ndesaulniers, naresh.kamboju, stable, llvm,
Masahiro Yamada, Linux Kernel Functional Testing, Anders Roxell,
tsbogend, linux-mips, Philippe Mathieu-Daudé
On Wed, Jun 14, 2023 at 11:04:34AM -0700, Nathan Chancellor wrote:
> Hi all,
>
> This series backports commit d5c8d6e0fa61 ("kbuild: Update assembler
> calls to use proper flags and language target") to linux-6.1.y to
> address a recent issue caused by a change in behavior in clang:
>
> https://lore.kernel.org/CA+G9fYsJq0sPC+q6vLNKUgBqCGmmjDrfeP4R1-95Eu28FJRY_A@mail.gmail.com/
> https://lore.kernel.org/20230612185424.GA2891387@dev-arch.thelio-3990X/
>
> While that was not the original intention of the aforementioned change,
> it ends up resolving the issue for the same reason, by not passing flags
> that are not supported or necessary for the current language target
> (KBUILD_CFLAGS for .c files and KBUILD_AFLAGS for .S files) when testing
> flags for that language target.
>
> All patches except the second one are direct backports from mainline.
> The second patch is a stable specific patch because the upstream
> solution could break stable due to the minimum supported version of
> binutils in mainline being a newer version than 6.1 and earlier; it
> chooses to do the more conservative fix, which was alluded to in the
> changelog of the upstream commit.
>
> For now, this is just a 6.1 issue. If the issue occurs in older
> releases, I will send separate backports. If there are any issues or
> objections to this series, please let me know.
All now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-19 7:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14 18:04 [PATCH 6.1 0/4] Update as-{instr,option} to use KBUILD_AFLAGS Nathan Chancellor
2023-06-14 18:04 ` [PATCH 6.1 2/4] MIPS: Move '-Wa,-msoft-float' check from as-option to cc-option Nathan Chancellor
2023-06-19 7:51 ` [PATCH 6.1 0/4] Update as-{instr,option} to use KBUILD_AFLAGS Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).