mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
- Issue #14324: Fix configure tests for cross builds.
when using gcc, use a compilation test for the cross build check for long long format.
This commit is contained in:
parent
93a0ef16c9
commit
3b739b149b
3 changed files with 49 additions and 2 deletions
18
configure.ac
18
configure.ac
|
@ -4128,7 +4128,23 @@ then
|
|||
]]])],
|
||||
[ac_cv_have_long_long_format=yes],
|
||||
[ac_cv_have_long_long_format=no],
|
||||
[ac_cv_have_long_long_format=no])
|
||||
[ac_cv_have_long_long_format="cross -- assuming no"
|
||||
if test x$GCC = xyes; then
|
||||
save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -Werror -Wformat"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
]], [[
|
||||
char *buffer;
|
||||
sprintf(buffer, "%lld", (long long)123);
|
||||
sprintf(buffer, "%lld", (long long)-123);
|
||||
sprintf(buffer, "%llu", (unsigned long long)123);
|
||||
]])],
|
||||
ac_cv_have_long_long_format=yes
|
||||
)
|
||||
CFLAGS=$save_CFLAGS
|
||||
fi])
|
||||
)
|
||||
AC_MSG_RESULT($ac_cv_have_long_long_format)
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue