diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-07-27 15:49:52 -0300 |
|---|---|---|
| committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-23 04:32:51 +0800 |
| commit | 2271e0d2b606637870daa2a39894eb8d8bbfe5dc (patch) | |
| tree | 973c6b2225ed0e6c31cb7d56c8ea852aafd5e772 /configure.ac | |
| parent | 325db5ab7ff6983d9e46dc3118ebfe8085d76eb9 (diff) | |
| download | glibc-2271e0d2b606637870daa2a39894eb8d8bbfe5dc.tar.xz glibc-2271e0d2b606637870daa2a39894eb8d8bbfe5dc.zip | |
Check if TEST_CC supports -Wno-restrict before using it
Check if TEST_CC supports -Wno-restrict before using it to avoid Clang
error:
error: unknown warning option '-Wno-restrict' [-Werror,-Wunknown-warning-option]
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 829f4be0ec..8c2eecf9a6 100644 --- a/configure.ac +++ b/configure.ac @@ -1579,6 +1579,16 @@ LIBC_TRY_TEST_CC_COMMAND([support for trampolines], LIBC_CONFIG_VAR([have-test-cc-trampoline], [$libc_cv_test_cc_trampolines]) +dnl Check if TEST_CC supports -Wno-restrict. +LIBC_TRY_TEST_CC_OPTION([-Wno-restrict], + [-c -Werror -Wno-restrict], + libc_cv_test_cflags_wno_restrict, + [libc_cv_test_cflags_wno_restrict=-Wno-restrict], + [libc_cv_test_cflags_wno_restrict=] +) +LIBC_CONFIG_VAR([test-config-cflags-wno-restrict], + [$libc_cv_test_cflags_wno_restrict]) + dnl Check if TEST_CC supports -finput-charset=ascii. LIBC_TRY_TEST_CC_OPTION([-finput-charset=ascii], [-c -Werror -finput-charset=ascii], |
