diff options
author | Tom Tromey <tromey@adacore.com> | 2021-09-29 12:51:15 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2021-10-19 13:14:48 -0600 |
commit | 5dfe4bfcb96945dc5cc1f8717be454f1f7f6bbec (patch) | |
tree | aae9e022c794f4887ad3e9ac759bcb0de647e183 /gdb/configure | |
parent | 05fb05a94729473cb04b1299fe5c36e06525c78f (diff) | |
download | fsf-binutils-gdb-5dfe4bfcb96945dc5cc1f8717be454f1f7f6bbec.zip fsf-binutils-gdb-5dfe4bfcb96945dc5cc1f8717be454f1f7f6bbec.tar.gz fsf-binutils-gdb-5dfe4bfcb96945dc5cc1f8717be454f1f7f6bbec.tar.bz2 |
Fix format_pieces selftest on Windows
The format_pieces selftest currently fails on Windows hosts.
The selftest doesn't handle the "%ll" -> "%I64" rewrite that the
formatter may perform, but also gdbsupport was missing a configure
check for PRINTF_HAS_LONG_LONG. This patch fixes both issues.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/gdb/configure b/gdb/configure index 1876cbf..d5c1883 100755 --- a/gdb/configure +++ b/gdb/configure @@ -15282,6 +15282,52 @@ fi fi fi + # Check if the compiler and runtime support printing long longs. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 +$as_echo_n "checking for long long support in printf... " >&6; } +if ${gdb_cv_printf_has_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gdb_cv_printf_has_long_long=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +char buf[32]; + long long l = 0; + l = (l << 16) + 0x0123; + l = (l << 16) + 0x4567; + l = (l << 16) + 0x89ab; + l = (l << 16) + 0xcdef; + sprintf (buf, "0x%016llx", l); + return (strcmp ("0x0123456789abcdef", buf)); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gdb_cv_printf_has_long_long=yes +else + gdb_cv_printf_has_long_long=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 +$as_echo "$gdb_cv_printf_has_long_long" >&6; } + if test "$gdb_cv_printf_has_long_long" = yes; then + +$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h + + fi + $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h @@ -16176,52 +16222,6 @@ if test "$gdb_cv_c_long_long" != yes; then as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 fi -# Check if the compiler and runtime support printing long longs. - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 -$as_echo_n "checking for long long support in printf... " >&6; } -if ${gdb_cv_printf_has_long_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gdb_cv_printf_has_long_long=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -char buf[32]; - long long l = 0; - l = (l << 16) + 0x0123; - l = (l << 16) + 0x4567; - l = (l << 16) + 0x89ab; - l = (l << 16) + 0xcdef; - sprintf (buf, "0x%016llx", l); - return (strcmp ("0x0123456789abcdef", buf)); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gdb_cv_printf_has_long_long=yes -else - gdb_cv_printf_has_long_long=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 -$as_echo "$gdb_cv_printf_has_long_long" >&6; } -if test "$gdb_cv_printf_has_long_long" = yes; then - -$as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h - -fi - # Check if the compiler and runtime support printing decfloats. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |