Skip to contentSkip to conversation

revert-kbuild-disable-clangs-default-use-of-fmerge-all-constants.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 14, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: Revert "kbuild: disable clang's default use of -fmerge-all-constants"
has been removed from the -mm tree. Its filename was
revert-kbuild-disable-clangs-default-use-of-fmerge-all-constants.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Nick Desaulniers <[email protected]>
Subject: Revert "kbuild: disable clang's default use of -fmerge-all-constants"

This reverts commit 87e0d4f0f37fb0c8c4aeeac46fff5e957738df79.

-fno-merge-all-constants has been the default since clang-6; the minimum supported version of clang in the kernel is clang-10 (10.0.1).

---

 Makefile |    9 ---------
 1 file changed, 9 deletions(-)
Makefile renamed from Makefile~revert-kbuild-disable-clangs-default-use-of-fmerge-all-constants +0 -9
@@ -921,15 +921,6 @@ KBUILD_CFLAGS += $(call cc-disable-warni
 # disable invalid "can't wrap" optimizations for signed / pointers
 KBUILD_CFLAGS	+= $(call cc-option,-fno-strict-overflow)
 
-# clang sets -fmerge-all-constants by default as optimization, but this
-# is non-conforming behavior for C and in fact breaks the kernel, so we
-# need to disable it here generally.
-KBUILD_CFLAGS	+= $(call cc-option,-fno-merge-all-constants)
-
-# for gcc -fno-merge-all-constants disables everything, but it is fine
-# to have actual conforming behavior enabled.
-KBUILD_CFLAGS	+= $(call cc-option,-fmerge-constants)
-
 # Make sure -fstack-check isn't enabled (like gentoo apparently did)
 KBUILD_CFLAGS  += $(call cc-option,-fno-stack-check,)
 

_

Patches currently in -mm which might be from [email protected] are