diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2022-01-12 18:46:28 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2022-01-12 18:46:28 +0530 |
commit | 86bf0feb0e3ec8e37872f72499d6ae33406561d7 (patch) | |
tree | 6a769e608b3e78a6bcbe3d0d373bffd5c7b0643a /include | |
parent | 0005e54f762b2ec65cee2c4ecf1e9d42612030f0 (diff) | |
download | glibc-86bf0feb0e3ec8e37872f72499d6ae33406561d7.tar.gz glibc-86bf0feb0e3ec8e37872f72499d6ae33406561d7.tar.xz glibc-86bf0feb0e3ec8e37872f72499d6ae33406561d7.zip |
Enable _FORTIFY_SOURCE=3 for gcc 12 and above
gcc 12 now has support for the __builtin_dynamic_object_size builtin. Adapt the macro checks to enable _FORTIFY_SOURCE=3 on gcc 12 and above. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/features.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/features.h b/include/features.h index 2d4debbe24..ab2b2caac4 100644 --- a/include/features.h +++ b/include/features.h @@ -412,7 +412,9 @@ # warning _FORTIFY_SOURCE requires compiling with optimization (-O) # elif !__GNUC_PREREQ (4, 1) # warning _FORTIFY_SOURCE requires GCC 4.1 or later -# elif _FORTIFY_SOURCE > 2 && __glibc_clang_prereq (9, 0) +# elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0) \ + || __GNUC_PREREQ (12, 0)) + # if _FORTIFY_SOURCE > 3 # warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform # endif |