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 | |
parent | 325db5ab7ff6983d9e46dc3118ebfe8085d76eb9 (diff) | |
download | glibc-2271e0d2b606637870daa2a39894eb8d8bbfe5dc.zip glibc-2271e0d2b606637870daa2a39894eb8d8bbfe5dc.tar.gz glibc-2271e0d2b606637870daa2a39894eb8d8bbfe5dc.tar.bz2 |
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')
-rwxr-xr-x | configure | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -7969,6 +7969,40 @@ have-test-cc-trampoline = $libc_cv_test_cc_trampolines" saved_CC="$CC" CC="$TEST_CC" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -Wno-restrict in testing" >&5 +printf %s "checking -Wno-restrict in testing... " >&6; } +if test ${libc_cv_test_cflags_wno_restrict+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if { ac_try='${CC-cc} -c -Werror -Wno-restrict -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + libc_cv_test_cflags_wno_restrict=-Wno-restrict +else case e in #( + e) libc_cv_test_cflags_wno_restrict= + ;; +esac +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_cflags_wno_restrict" >&5 +printf "%s\n" "$libc_cv_test_cflags_wno_restrict" >&6; } + +CC="$saved_CC" + + +config_vars="$config_vars +test-config-cflags-wno-restrict = $libc_cv_test_cflags_wno_restrict" + + + +saved_CC="$CC" +CC="$TEST_CC" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -finput-charset=ascii in testing" >&5 printf %s "checking -finput-charset=ascii in testing... " >&6; } if test ${libc_cv_test_cflags_finput_charset_ascii+y} |