diff options
Diffstat (limited to 'libgcc/configure')
-rwxr-xr-x | libgcc/configure | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/libgcc/configure b/libgcc/configure index 26bf757..284e4db 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -1353,7 +1353,7 @@ Optional Features: enable decimal float extension to C. Selecting 'bid' or 'dpd' choses which decimal floating point format to use - --enable-cet enable Intel CET in target libraries [default=no] + --enable-cet enable Intel CET in target libraries [default=auto] --enable-explicit-exception-frame-registration register exception tables explicitly at module start, for use e.g. for compatibility with @@ -4900,19 +4900,22 @@ if test "${enable_cet+set}" = set; then : esac else - enable_cet=no + enable_cet=auto fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# NB: Avoid nested save_CFLAGS and save_LDFLAGS. case "$host" in i[34567]86-*-linux* | x86_64-*-linux*) case "$enable_cet" in auto) # Check if target supports multi-byte NOPs # and if assembler supports CET insn. + cet_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4936,6 +4939,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -5326,19 +5330,17 @@ esac # This is after config.host so we can augment tmake_file. case ${host} in xtensa*-*) - cat > conftest.c <<EOF - #ifdef __XTENSA_CALL0_ABI__ - #error - #endif -EOF - if { ac_try='${CC-cc} -E -o conftest.i conftest.c 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - tmake_file="${tmake_file} xtensa/t-windowed" - fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __XTENSA_CALL0_ABI__ + #error + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + tmake_file="${tmake_file} xtensa/t-windowed" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac |