Compiler Attributes: fix __has_attribute(__no_sanitize_coverage__) for GCC 4
authorMarco Elver <elver@google.com>
Wed, 14 Jul 2021 15:01:59 +0000 (17:01 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 15 Jul 2021 23:06:44 +0000 (01:06 +0200)
Fix __has_attribute(__no_sanitize_coverage__) for GCC 4 by defining
__GCC4_has_attribute___no_sanitize_coverage__.

Fixes: 540540d06e9d ("kcov: add __no_sanitize_coverage to fix noinstr for all architectures")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
include/linux/compiler_attributes.h

index 183ddd5fd07243a02729da72dadd91d8ccad856e..7b1fa5c3016911e6cc3039bc666bbd83bba66afc 100644 (file)
@@ -36,6 +36,7 @@
 # define __GCC4_has_attribute___nonstring__           0
 # define __GCC4_has_attribute___no_sanitize_address__ (__GNUC_MINOR__ >= 8)
 # define __GCC4_has_attribute___no_sanitize_undefined__ (__GNUC_MINOR__ >= 9)
+# define __GCC4_has_attribute___no_sanitize_coverage__ 0
 # define __GCC4_has_attribute___fallthrough__         0
 #endif