Makefile: disallow data races on gcc-10 as well
PATCH 1/1 Makefile: disallow data races on gcc-10 as well
gcc-10 will rename --param=allow-store-data-races=0 to -fno-allow-store-data-races.
The flag change happened at https://gcc.gnu.org/PR92046.
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -714,6 +714,7 @@ endif # Tell gcc to never replace conditional load with a non-conditional one KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) +KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races) include scripts/Makefile.kcov include scripts/Makefile.gcc-plugins
Signature · 1 line
2.25.1
Quoted 19 lines · Sergei Trofimovich
gcc-10 will rename --param=allow-store-data-races=0 to -fno-allow-store-data-races.
The flag change happened at https://gcc.gnu.org/PR92046.
CC Jiri Kosina <[email protected]>CC Masahiro Yamada <[email protected]>CC Michal Marek <[email protected]>Signed-off-by Sergei Trofimovich <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +0
-0
Makefile endif · line 717
Quoted 4 lines
Makefile +1
-0@@ -714,6 +714,7 @@ endif # Tell gcc to never replace conditional load with a non-conditional one KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) +KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races)
I have to say I can't really read gcc sources without major cerebral pain, so let me me dense here: what happens to gcc<10 if you pass -fno-allow-store-data-races to it?
My expectation would be that it would just blow up in fatal error, meaning that after we apply your patch, kernel couldn't be successfully compiled by any compiler that doesn't understand '-fno-allow-store-data-races' (which is just about any compiler on this planet).
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Jiri Kosina
Acked-byQuoted 17 lines · Jiri Kosina
Quoted 17 lines
The flag change happened at https://gcc.gnu.org/PR92046.
CC Jiri Kosina <[email protected]>CC Masahiro Yamada <[email protected]>CC Michal Marek <[email protected]>Signed-off-by Sergei Trofimovich <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +0
-0@@ -714,6 +714,7 @@ endif
Quoted 7 lines
Makefile endif · line 717
Quoted 3 lines
Makefile +1
-0# Tell gcc to never replace conditional load with a non-conditional one KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) +KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races)I have to say I can't really read gcc sources without major cerebral pain, so let me me dense here: what happens to gcc<10 if you pass -fno-allow-store-data-races to it?
Sorry, brainfart on my side, your patch is good :)
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 30 lines · Jiri Kosina
Quoted 17 lines · Jiri Kosina
Quoted 17 lines
The flag change happened at https://gcc.gnu.org/PR92046.
CC Jiri Kosina <[email protected]>CC Masahiro Yamada <[email protected]>CC Michal Marek <[email protected]>Signed-off-by Sergei Trofimovich <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +0
-0@@ -714,6 +714,7 @@ endifQuoted 7 lines
Makefile endif · line 717
Quoted 3 lines
Makefile +1
-0# Tell gcc to never replace conditional load with a non-conditional one KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) +KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races)I have to say I can't really read gcc sources without major cerebral pain, so let me me dense here: what happens to gcc<10 if you pass -fno-allow-store-data-races to it?
Sorry, brainfart on my side, your patch is good :)
Quoted 8 lines
Acked-by Jiri Kosina <[email protected]>Thanks,
--
Jiri Kosina
SUSE Labs
Applied to linux-kbuild with Jiri's Ack.
Thanks.
Signature · 2 lines
Best Regards Masahiro Yamada