From c348ef1ad1d4ffb64b25c4e48521abe9fec3b608 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Sun, 16 Mar 2014 23:05:59 -0700 Subject: Version bump to 3.5, step 2. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 25e1dc88d5..abade0f669 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl * Please run autoreconf to test your changes! * dnl *********************************************** # Set VERSION so we only need to edit in one place (i.e., here) -m4_define(PYTHON_VERSION, 3.4) +m4_define(PYTHON_VERSION, 3.5) AC_PREREQ(2.65) -- cgit v1.2.1 From dff5c306a08b09cb59f5c5acc80fee8bd4e43166 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Tue, 15 Apr 2014 23:50:06 +0530 Subject: Closes Issue 17861: Autogenerate Include/opcode.h from opcode.py. It includes required changes in Makefile.pre.in and configure.ac among other files. --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index abade0f669..457819b0a3 100644 --- a/configure.ac +++ b/configure.ac @@ -1036,6 +1036,15 @@ else ASDLGEN="$PYTHON" fi +AC_SUBST(OPCODEHGEN) +AC_CHECK_PROGS(PYTHON, python$PACKAGE_VERSION python3 python, not-found) +if test "$PYTHON" = not-found; then + OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py" +else + OPCODEHGEN="$PYTHON" +fi + + case $MACHDEP in bsdos*|hp*|HP*) -- cgit v1.2.1 From 0255df41b9cc48d9dd3f98ccc70b191939f3719f Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 17 Apr 2014 00:00:31 -0400 Subject: support setting fpu precision on m68k (closes #20904) Patch from Andreas Schwab. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 457819b0a3..f2e4b1ce1b 100644 --- a/configure.ac +++ b/configure.ac @@ -3810,6 +3810,19 @@ then [Define if we can use gcc inline assembler to get and set x87 control word]) fi +AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set mc68881 fpcr) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ + unsigned int fpcr; + __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr)); + __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr)); +]])],[have_gcc_asm_for_mc68881=yes],[have_gcc_asm_for_mc68881=no]) +AC_MSG_RESULT($have_gcc_asm_for_mc68881) +if test "$have_gcc_asm_for_mc68881" = yes +then + AC_DEFINE(HAVE_GCC_ASM_FOR_MC68881, 1, + [Define if we can use gcc inline assembler to get and set mc68881 fpcr]) +fi + # Detect whether system arithmetic is subject to x87-style double # rounding issues. The result of this test has little meaning on non # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding -- cgit v1.2.1 From dc91a772d955f6dd4af3ce0070d03159c4b6c3b2 Mon Sep 17 00:00:00 2001 From: Charles-Fran?ois Natali Date: Thu, 8 May 2014 23:08:51 +0100 Subject: Issue #21037: Add a build option to enable AddressSanitizer support. --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b2f519f5fa..a6f613ae25 100644 --- a/configure.ac +++ b/configure.ac @@ -2314,6 +2314,17 @@ esac ], [AC_MSG_RESULT(default)]) +AC_MSG_CHECKING(for --with-address-sanitizer) +AC_ARG_WITH(address_sanitizer, + AS_HELP_STRING([--with-address-sanitizer], + [enable AddressSanitizer]), +[ +AC_MSG_RESULT($withval) +BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS" +LDFLAGS="-fsanitize=address $LDFLAGS" +], +[AC_MSG_RESULT(no)]) + # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4 AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets -- cgit v1.2.1 From c23496749bf0e0d518b5d3c5eeac6a08f51039bf Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Fri, 25 Jul 2014 12:41:31 -0700 Subject: Issue #18093: Create Programs directory in build location for out-of-tree builds. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3b3a73481f..3e8c49cf48 100644 --- a/configure.ac +++ b/configure.ac @@ -4734,7 +4734,7 @@ do done AC_SUBST(SRCDIRS) -SRCDIRS="Parser Grammar Objects Python Modules Mac" +SRCDIRS="Parser Grammar Objects Python Modules Mac Programs" AC_MSG_CHECKING(for build directories) for dir in $SRCDIRS; do if test ! -d $dir; then -- cgit v1.2.1 From 43bbf5f85468041bf6915c165a78f68dc72c91c1 Mon Sep 17 00:00:00 2001 From: Charles-Fran?ois Natali Date: Fri, 1 Aug 2014 21:57:49 +0100 Subject: Issue #22110: Enable extra compilation warnings. --- configure.ac | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3e8c49cf48..f396984697 100644 --- a/configure.ac +++ b/configure.ac @@ -1234,6 +1234,52 @@ yes) BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement" fi + AC_MSG_CHECKING(if we can turn on $CC mixed sign comparison warning) + ac_save_cc="$CC" + CC="$CC -Wsign-compare" + save_CFLAGS="$CFLAGS" + AC_CACHE_VAL(ac_cv_enable_sign_compare_warning, + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([[]], [[]]) + ],[ + ac_cv_enable_sign_compare_warning=yes + ],[ + ac_cv_enable_sign_compare_warning=no + ])) + CFLAGS="$save_CFLAGS" + CC="$ac_save_cc" + AC_MSG_RESULT($ac_cv_enable_sign_compare_warning) + + if test $ac_cv_enable_sign_compare_warning = yes + then + BASECFLAGS="$BASECFLAGS -Wsign-compare" + fi + + AC_MSG_CHECKING(if we can turn on $CC unreachable code warning) + ac_save_cc="$CC" + CC="$CC -Wunreachable-code" + save_CFLAGS="$CFLAGS" + AC_CACHE_VAL(ac_cv_enable_unreachable_code_warning, + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([[]], [[]]) + ],[ + ac_cv_enable_unreachable_code_warning=yes + ],[ + ac_cv_enable_unreachable_code_warning=no + ])) + CFLAGS="$save_CFLAGS" + CC="$ac_save_cc" + AC_MSG_RESULT($ac_cv_enable_unreachable_code_warning) + + # Don't enable unreachable code warning in debug mode, since it usually + # results in non-standard code paths. + if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true" + then + BASECFLAGS="$BASECFLAGS -Wunreachable-code" + fi + # if using gcc on alpha, use -mieee to get (near) full IEEE 754 # support. Without this, treatment of subnormals doesn't follow # the standard. -- cgit v1.2.1 From 6aaa574410a548108d521372d30a2427394a7793 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 29 Aug 2014 15:41:08 +0200 Subject: Issue #22287: On UNIX, _PyTime_gettimeofday() now uses clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now depends on the librt library on Solaris and on Linux (only with glibc older than 2.17). --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 086bdd4e48..05dc0e69c5 100644 --- a/configure.ac +++ b/configure.ac @@ -3319,6 +3319,7 @@ AC_CHECK_FUNCS(gettimeofday, AC_CHECK_FUNCS(clock_gettime, [], [ AC_CHECK_LIB(rt, clock_gettime, [ + LIBS="$LIBS -lrt" AC_DEFINE(HAVE_CLOCK_GETTIME, 1) AC_DEFINE(TIMEMODULE_LIB, [rt], [Library needed by timemodule.c: librt may be needed for clock_gettime()]) -- cgit v1.2.1 From e884ac9e6968cd7c6eb804b2a979f7d0f9293dd7 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 26 Nov 2014 14:35:12 -0600 Subject: only support append_history if readline has it --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 05dc0e69c5..c12622bbb9 100644 --- a/configure.ac +++ b/configure.ac @@ -4308,6 +4308,10 @@ then [Define if you can turn off readline's signal handling.]), ) fi +AC_CHECK_LIB(readline, append_history, + AC_DEFINE(HAVE_RL_APPEND_HISTORY, 1, + [Define if readline supports append_history]), ,$READLINE_LIBS) + # End of readline checks: restore LIBS LIBS=$LIBS_no_readline -- cgit v1.2.1 From e7faceda502a72b3b24914a7869786e00cb1351f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 28 Nov 2014 13:28:25 +0100 Subject: Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The availability of the function is checked during the compilation. Patch written by Bernard Spil. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c12622bbb9..99d430c100 100644 --- a/configure.ac +++ b/configure.ac @@ -2293,6 +2293,9 @@ AC_MSG_RESULT($SHLIBS) AC_CHECK_LIB(sendfile, sendfile) AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX +AC_CHECK_LIB(crypto, RAND_egd, + AC_DEFINE(HAVE_RAND_EGD, 1, + [Define if the libcrypto has RAND_egd])) # only check for sem_init if thread support is requested if test "$with_threads" = "yes" -o -z "$with_threads"; then -- cgit v1.2.1 From 915c27520fb658ee0aa2e4d95487af700ceb5192 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 21 Dec 2014 01:16:38 +0100 Subject: Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(), instead of reading /dev/urandom, to get pseudo-random bytes. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8ab9d26692..c7504a27dd 100644 --- a/configure.ac +++ b/configure.ac @@ -3004,7 +3004,7 @@ fi AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \ fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ - futimens futimes gai_strerror \ + futimens futimes gai_strerror getentropy \ getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ if_nameindex \ -- cgit v1.2.1 From f6350e4f6255b00991a0fc9f7a7c516932dfd6c6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 9 Jan 2015 02:13:19 +0100 Subject: Issue #22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for atomic memory access if available. Patch written by Vitor de Lima and Gustavo Temple. --- configure.ac | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c7504a27dd..da096a7c88 100644 --- a/configure.ac +++ b/configure.ac @@ -4884,6 +4884,45 @@ if test "$have_gcc_asm_for_x87" = yes; then esac fi +# Check for stdatomic.h +AC_MSG_CHECKING(for stdatomic.h) +AC_LINK_IFELSE( +[ + AC_LANG_SOURCE([[ + #include + _Atomic int value = ATOMIC_VAR_INIT(1); + int main() { + int loaded_value = atomic_load(&value); + return 0; + } + ]]) +],[have_stdatomic_h=yes],[have_stdatomic_h=no]) + +AC_MSG_RESULT($have_stdatomic_h) + +if test "$have_stdatomic_h" = yes; then + AC_DEFINE(HAVE_STD_ATOMIC, 1, [Has stdatomic.h]) +fi + +# Check for GCC >= 4.7 __atomic builtins +AC_MSG_CHECKING(for GCC >= 4.7 __atomic builtins) +AC_LINK_IFELSE( +[ + AC_LANG_SOURCE([[ + volatile int val = 1; + int main() { + __atomic_load_n(&val, __ATOMIC_SEQ_CST); + return 0; + } + ]]) +],[have_builtin_atomic=yes],[have_builtin_atomic=no]) + +AC_MSG_RESULT($have_builtin_atomic) + +if test "$have_builtin_atomic" = yes; then + AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Has builtin atomics]) +fi + # ensurepip option AC_MSG_CHECKING(for ensurepip) AC_ARG_WITH(ensurepip, -- cgit v1.2.1 From 2b1b634b20c08bf7df7e3c53defc93514411d616 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 14 Jan 2015 16:01:46 +0100 Subject: Issue #22038, configure: HAVE_STD_ATOMIC now also check that "atomic_int" and "_Atomic void*" types work. Change needed on FreeBSD 10 where stdatomic.h is available but the compiler fails on "_Atomic void*" with "_Atomic cannot be applied to incomplete type 'void'". --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index da096a7c88..c7516225fa 100644 --- a/configure.ac +++ b/configure.ac @@ -4890,7 +4890,8 @@ AC_LINK_IFELSE( [ AC_LANG_SOURCE([[ #include - _Atomic int value = ATOMIC_VAR_INIT(1); + atomic_int value = ATOMIC_VAR_INIT(1); + _Atomic void *py_atomic_address = (void*) &value; int main() { int loaded_value = atomic_load(&value); return 0; @@ -4901,7 +4902,8 @@ AC_LINK_IFELSE( AC_MSG_RESULT($have_stdatomic_h) if test "$have_stdatomic_h" = yes; then - AC_DEFINE(HAVE_STD_ATOMIC, 1, [Has stdatomic.h]) + AC_DEFINE(HAVE_STD_ATOMIC, 1, + [Has stdatomic.h, atomic_int and _Atomic void* types work]) fi # Check for GCC >= 4.7 __atomic builtins -- cgit v1.2.1 From ea83cf646de5c274ca6528be1a78e886192e0780 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 8 Mar 2015 02:59:09 +0100 Subject: Issue #22524: Fix os.scandir() for platforms which don't have a d_type field in the dirent structure (ex: OpenIndiana). --- configure.ac | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a2c5eb4632..263ae15555 100644 --- a/configure.ac +++ b/configure.ac @@ -4944,6 +4944,26 @@ AS_CASE($with_ensurepip, AC_MSG_RESULT($ENSUREPIP) AC_SUBST(ENSUREPIP) +# check if the dirent structure of a d_type field and DT_UNKNOWN is defined +AC_MSG_CHECKING(if the dirent structure of a d_type field) +AC_LINK_IFELSE( +[ + AC_LANG_SOURCE([[ + #include + + int main() { + struct dirent entry; + return entry.d_type == DT_UNKNOWN; + } + ]]) +],[have_dirent_d_type=yes],[have_dirent_d_type=no]) +AC_MSG_RESULT($have_dirent_d_type) + +if test "$have_dirent_d_type" = yes; then + AC_DEFINE(HAVE_DIRENT_D_TYPE, 1, + [Define to 1 if the dirent structure has a d_type field]) +fi + # generate output files AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh) AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) -- cgit v1.2.1 From 8f6bfd38c9b88f8f0eb1a4fa2bee3e53506d0ae0 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 8 Mar 2015 20:43:10 +0100 Subject: Issue #22980: Under Linux, C extensions now include bitness in the file name, to make it easy to test 32-bit and 64-bit builds in the same working tree. --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 263ae15555..c9bb90bd0b 100644 --- a/configure.ac +++ b/configure.ac @@ -4175,7 +4175,15 @@ AC_SUBST(SOABI) AC_MSG_CHECKING(ABIFLAGS) AC_MSG_RESULT($ABIFLAGS) AC_MSG_CHECKING(SOABI) -SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS} + +case $ac_sys_system in + Linux*|GNU*) + BITNESS_SUFFIX=-$(($ac_cv_sizeof_void_p * 8))b;; + *) + BITNESS_SUFFIX=;; +esac +SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${BITNESS_SUFFIX} + AC_MSG_RESULT($SOABI) AC_SUBST(EXT_SUFFIX) -- cgit v1.2.1 From 82ab525ae487e6f735821276641415ab58213fd6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 19 Mar 2015 22:21:49 +0100 Subject: Issue #22181: The availability of the getrandom() is now checked in configure, and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define. Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom(). --- configure.ac | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c9bb90bd0b..a6eaadc1e4 100644 --- a/configure.ac +++ b/configure.ac @@ -4972,6 +4972,30 @@ if test "$have_dirent_d_type" = yes; then [Define to 1 if the dirent structure has a d_type field]) fi +# check if the Linux getrandom() syscall is available +AC_MSG_CHECKING(for the Linux getrandom() syscall) +AC_LINK_IFELSE( +[ + AC_LANG_SOURCE([[ + #include + + int main() { + const int flags = 0; + char buffer[1]; + int n; + /* ignore the result, Python checks for ENOSYS at runtime */ + (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags); + return 0; + } + ]]) +],[have_getrandom_syscall=yes],[have_getrandom_syscall=no]) +AC_MSG_RESULT($have_getrandom_syscall) + +if test "$have_getrandom_syscall" = yes; then + AC_DEFINE(HAVE_GETRANDOM_SYSCALL, 1, + [Define to 1 if the Linux getrandom() syscall is available]) +fi + # generate output files AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh) AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) -- cgit v1.2.1 From 335ec8c6c381ed0c0dacf192dd514baeef6fb178 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 9 Apr 2015 22:29:52 +0200 Subject: Issue #23817: FreeBSD now uses "1.0" the the SOVERSION as other operating systems, instead of just "1". --- configure.ac | 5 ----- 1 file changed, 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a6eaadc1e4..6218bd25a7 100644 --- a/configure.ac +++ b/configure.ac @@ -960,11 +960,6 @@ if test $enable_shared = "yes"; then LDLIBRARY='libpython$(LDVERSION).so' BLDLIBRARY='-L. -lpython$(LDVERSION)' RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - case $ac_sys_system in - FreeBSD*) - SOVERSION=`echo $SOVERSION|cut -d "." -f 1` - ;; - esac INSTSONAME="$LDLIBRARY".$SOVERSION if test "$with_pydebug" != yes then -- cgit v1.2.1 From e43bbe2166fa92c5a574a4cbfe70423291816733 Mon Sep 17 00:00:00 2001 From: Larry Hastings Date: Mon, 13 Apr 2015 17:48:40 -0400 Subject: Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES. Patch courtesy of Joe Jevnik. --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 69f7b7dd11..d15f26426d 100644 --- a/configure.ac +++ b/configure.ac @@ -2876,6 +2876,16 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then fi fi +AC_MSG_CHECKING(for CAN_RAW_FD_FRAMES) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* CAN_RAW_FD_FRAMES available check */ +#include ]], +[[int can_raw_fd_frames = CAN_RAW_FD_FRAMES;]])],[ + AC_DEFINE(HAVE_LINUX_CAN_RAW_FD_FRAMES, 1, [Define if compiling using Linux 3.6 or later.]) + AC_MSG_RESULT(yes) +],[ + AC_MSG_RESULT(no) +]) + AC_MSG_CHECKING(for OSX 10.5 SDK or later) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[#include ]], [[FSIORefNum fRef = 0]]) -- cgit v1.2.1 From 2ae243a11a042a9ed8a8d9f120bf37bc6a19f355 Mon Sep 17 00:00:00 2001 From: doko Date: Wed, 15 Apr 2015 20:23:14 +0200 Subject: - Issue #22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include the architecture triplet in the extension name, to make it easy to test builds for different ABIs in the same working tree. --- configure.ac | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 130 insertions(+), 14 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d15f26426d..e22918aee6 100644 --- a/configure.ac +++ b/configure.ac @@ -425,7 +425,7 @@ if test "$cross_compiling" = yes; then esac _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" fi - + # Some systems cannot stand _XOPEN_SOURCE being defined at all; they # disable features if it is defined, without any means to access these # features as extensions. For these systems, we skip the definition of @@ -667,6 +667,8 @@ then fi fi AC_PROG_CC +AC_PROG_CPP +AC_PROG_GREP AC_SUBST(CXX) AC_SUBST(MAINCC) @@ -724,6 +726,132 @@ then fi +MULTIARCH=$($CC --print-multiarch 2>/dev/null) +AC_SUBST(MULTIARCH) + +AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) +cat >> conftest.c <conftest.out 2>/dev/null; then + PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '` + AC_MSG_RESULT([$PLATFORM_TRIPLET]) +else + AC_MSG_RESULT([none]) +fi +rm -f conftest.c conftest.out + +if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then + if test x$PLATFORM_TRIPLET != x$MULTIARCH; then + AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report]) + fi +fi +PLATDIR=plat-$MACHDEP +AC_SUBST(PLATDIR) +AC_SUBST(PLATFORM_TRIPLET) + + AC_MSG_CHECKING([for -Wl,--no-as-needed]) save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--no-as-needed" @@ -791,10 +919,6 @@ hp*|HP*) esac;; esac -MULTIARCH=$($CC --print-multiarch 2>/dev/null) -AC_SUBST(MULTIARCH) - - AC_SUBST(LIBRARY) AC_MSG_CHECKING(LIBRARY) if test -z "$LIBRARY" @@ -4183,15 +4307,7 @@ AC_SUBST(SOABI) AC_MSG_CHECKING(ABIFLAGS) AC_MSG_RESULT($ABIFLAGS) AC_MSG_CHECKING(SOABI) - -case $ac_sys_system in - Linux*|GNU*) - BITNESS_SUFFIX=-$(($ac_cv_sizeof_void_p * 8))b;; - *) - BITNESS_SUFFIX=;; -esac -SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${BITNESS_SUFFIX} - +SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} AC_MSG_RESULT($SOABI) AC_SUBST(EXT_SUFFIX) -- cgit v1.2.1 From 4ecd479f3ba65c7fd0c5350a90588c9411c1e32b Mon Sep 17 00:00:00 2001 From: doko Date: Wed, 15 Apr 2015 20:45:33 +0200 Subject: - configure.ac: remove duplicate PLATDIR definition --- configure.ac | 3 --- 1 file changed, 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e22918aee6..aab01a4fcf 100644 --- a/configure.ac +++ b/configure.ac @@ -556,9 +556,6 @@ then fi AC_MSG_RESULT($MACHDEP) -AC_SUBST(PLATDIR) -PLATDIR=plat-$MACHDEP - # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, # it may influence the way we can build extensions, so distutils # needs to check it -- cgit v1.2.1 From 02cc1a53ec79471c0f55efd53c3c5a8aff508c8f Mon Sep 17 00:00:00 2001 From: doko Date: Wed, 15 Apr 2015 23:31:02 +0200 Subject: #22980: fix triplet configure test for powerpc-linux-gnu --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index aab01a4fcf..26d7b361f4 100644 --- a/configure.ac +++ b/configure.ac @@ -730,6 +730,7 @@ AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) cat >> conftest.c < Date: Wed, 15 Apr 2015 17:11:47 -0700 Subject: Issues #22980, 23969: For OS X, use PEP 3149-style file names for extension module binaries, with a platform triple of just "darwin", resulting in file names like: _ssl.cpython-35m-darwin.so rather than just _ssl.so as previously. Instead of attempting to encode differences in CPU architecture and OS X deployment targets in the file name as is done on other platforms, these continue to be managed by the use of Apple multi-architecture ("fat") files, by the system dynamic loader, and by logic in higher-levels like sysconfig.get_platform() and pip. --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 26d7b361f4..73a0a2f2ae 100644 --- a/configure.ac +++ b/configure.ac @@ -826,6 +826,8 @@ cat >> conftest.c < Date: Sun, 19 Apr 2015 14:44:05 +0200 Subject: - #22980: fix triplet configure test for more targets --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 73a0a2f2ae..9b12dbfd1a 100644 --- a/configure.ac +++ b/configure.ac @@ -728,9 +728,16 @@ AC_SUBST(MULTIARCH) AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) cat >> conftest.c < Date: Wed, 27 May 2015 23:29:00 -0500 Subject: update configure version to 3.6 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4030e338bf..3e9d31a26c 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl * Please run autoreconf to test your changes! * dnl *********************************************** # Set VERSION so we only need to edit in one place (i.e., here) -m4_define(PYTHON_VERSION, 3.5) +m4_define(PYTHON_VERSION, 3.6) AC_PREREQ(2.65) -- cgit v1.2.1 From d10868c4ee511a38632289d969e79c89157a7b53 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Sat, 30 May 2015 10:57:56 -0400 Subject: Reverting my previous commit. Something went horribly wrong when I was doing `hg rebase`. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3e9d31a26c..4030e338bf 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl * Please run autoreconf to test your changes! * dnl *********************************************** # Set VERSION so we only need to edit in one place (i.e., here) -m4_define(PYTHON_VERSION, 3.6) +m4_define(PYTHON_VERSION, 3.5) AC_PREREQ(2.65) -- cgit v1.2.1 From 206332b811097dd8ca94690d49b8931074b09b13 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Thu, 2 Jul 2015 20:27:56 +0200 Subject: Issue #24543: Use AC_LINK instead of AC_COMPILE in order to prevent false positives with the -flto option (gcc >= 4.9.0 and clang). --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4030e338bf..56a73df233 100644 --- a/configure.ac +++ b/configure.ac @@ -3910,7 +3910,7 @@ fi], # ************************************** AC_MSG_CHECKING(for x64 gcc inline assembler) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ +AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[ __asm__ __volatile__ ("movq %rcx, %rax"); ]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no]) AC_MSG_RESULT($have_gcc_asm_for_x64) @@ -4008,7 +4008,7 @@ fi # so we try it on all platforms. AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ +AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[ unsigned short cw; __asm__ __volatile__ ("fnstcw %0" : "=m" (cw)); __asm__ __volatile__ ("fldcw %0" : : "m" (cw)); @@ -4021,7 +4021,7 @@ then fi AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set mc68881 fpcr) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ +AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[ unsigned int fpcr; __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr)); __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr)); -- cgit v1.2.1 From 4fee788ed390fb6b9c34cf52f8f5b702601192c0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 18 Sep 2015 15:38:37 +0200 Subject: Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom() function instead of the getentropy() function. The getentropy() function is blocking to generate very good quality entropy, os.urandom() doesn't need such high-quality entropy. --- configure.ac | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 668234d7e2..180a421f70 100644 --- a/configure.ac +++ b/configure.ac @@ -5111,11 +5111,11 @@ AC_LINK_IFELSE( #include int main() { - const int flags = 0; char buffer[1]; - int n; + const size_t buflen = sizeof(buffer); + const int flags = 0; /* ignore the result, Python checks for ENOSYS at runtime */ - (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags); + (void)syscall(SYS_getrandom, buffer, buflen, flags); return 0; } ]]) @@ -5127,6 +5127,31 @@ if test "$have_getrandom_syscall" = yes; then [Define to 1 if the Linux getrandom() syscall is available]) fi +# check if the getrandom() function is available +# the test was written for the Solaris function of +AC_MSG_CHECKING(for the getrandom() function) +AC_LINK_IFELSE( +[ + AC_LANG_SOURCE([[ + #include + + int main() { + char buffer[1]; + const size_t buflen = sizeof(buffer); + const int flags = 0; + /* ignore the result, Python checks for ENOSYS at runtime */ + (void)getrandom(buffer, buflen, flags); + return 0; + } + ]]) +],[have_getrandom=yes],[have_getrandom=no]) +AC_MSG_RESULT($have_getrandom) + +if test "$have_getrandom" = yes; then + AC_DEFINE(HAVE_GETRANDOM, 1, + [Define to 1 if the getrandom() function is available]) +fi + # generate output files AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh) AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) -- cgit v1.2.1 From 5f6fd63f998e32bbe732fe7e9ac3d3de4841e37b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 18 Sep 2015 15:13:44 -0700 Subject: Issue #24915: Add Clang support to PGO builds and use the test suite for profile data. Thanks to Alecsandru Patrascu of Intel for the initial patch. --- configure.ac | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 56a73df233..792f580c12 100644 --- a/configure.ac +++ b/configure.ac @@ -1218,6 +1218,49 @@ else AC_MSG_RESULT(no); Py_DEBUG='false' fi], [AC_MSG_RESULT(no)]) +# Enable PGO flags. +AC_SUBST(PGO_PROF_GEN_FLAG) +AC_SUBST(PGO_PROF_USE_FLAG) +AC_SUBST(LLVM_PROF_MERGER) +AC_SUBST(LLVM_PROF_FILE) +AC_SUBST(LLVM_PROF_ERR) +AC_SUBST(LLVM_PROF_FOUND) +AC_CHECK_PROG(LLVM_PROF_FOUND, llvm-profdata, found, not-found) +LLVM_PROF_ERR=no +case $CC in + *clang*) + # Any changes made here should be reflected in the GCC+Darwin case below + PGO_PROF_GEN_FLAG="-fprofile-instr-generate" + PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd" + LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr" + LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\"" + if test $LLVM_PROF_FOUND = not-found + then + LLVM_PROF_ERR=yes + fi + ;; + *gcc*) + case $ac_sys_system in + Darwin*) + PGO_PROF_GEN_FLAG="-fprofile-instr-generate" + PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd" + LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr" + LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\"" + if test $LLVM_PROF_FOUND = not-found + then + LLVM_PROF_ERR=yes + fi + ;; + *) + PGO_PROF_GEN_FLAG="-fprofile-generate" + PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction" + LLVM_PROF_MERGER="true" + LLVM_PROF_FILE="" + ;; + esac + ;; +esac + # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be # merged with this chunk of code? -- cgit v1.2.1 From f4e099852a666678e2d66fc0b446805da3107d65 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 1 Oct 2015 09:47:30 +0200 Subject: Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom() function instead of the getentropy() function. The getentropy() function is blocking to generate very good quality entropy, os.urandom() doesn't need such high-quality entropy. --- configure.ac | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 792f580c12..694293e8be 100644 --- a/configure.ac +++ b/configure.ac @@ -5154,11 +5154,11 @@ AC_LINK_IFELSE( #include int main() { - const int flags = 0; char buffer[1]; - int n; + const size_t buflen = sizeof(buffer); + const int flags = 0; /* ignore the result, Python checks for ENOSYS at runtime */ - (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags); + (void)syscall(SYS_getrandom, buffer, buflen, flags); return 0; } ]]) @@ -5170,6 +5170,31 @@ if test "$have_getrandom_syscall" = yes; then [Define to 1 if the Linux getrandom() syscall is available]) fi +# check if the getrandom() function is available +# the test was written for the Solaris function of +AC_MSG_CHECKING(for the getrandom() function) +AC_LINK_IFELSE( +[ + AC_LANG_SOURCE([[ + #include + + int main() { + char buffer[1]; + const size_t buflen = sizeof(buffer); + const int flags = 0; + /* ignore the result, Python checks for ENOSYS at runtime */ + (void)getrandom(buffer, buflen, flags); + return 0; + } + ]]) +],[have_getrandom=yes],[have_getrandom=no]) +AC_MSG_RESULT($have_getrandom) + +if test "$have_getrandom" = yes; then + AC_DEFINE(HAVE_GETRANDOM, 1, + [Define to 1 if the getrandom() function is available]) +fi + # generate output files AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh) AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) -- cgit v1.2.1 From 26b842a82d9ae7d30c692080bf352a0ef78a626c Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Mon, 21 Dec 2015 12:09:17 -0600 Subject: Issue #25827: Add support for ICC to configure --- configure.ac | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 694293e8be..94632f2645 100644 --- a/configure.ac +++ b/configure.ac @@ -593,6 +593,22 @@ AC_ARG_WITH(gcc, esac]) AC_MSG_RESULT($without_gcc) +AC_MSG_CHECKING(for --with-icc) +AC_ARG_WITH(icc, + AS_HELP_STRING([--with-icc], [build with icc]), +[ + case $withval in + no) CC=${CC:-cc} + with_icc=no;; + yes) CC=icc + CXX=icpc + with_icc=yes;; + *) CC=$withval + with_icc=$withval;; + esac], [ + with_icc=no]) +AC_MSG_RESULT($with_icc) + # If the user switches compilers, we can't believe the cache if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" then @@ -699,6 +715,7 @@ then gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;; cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;; clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;; + icc|*/icc) AC_PATH_TOOL(CXX, [icpc], [icpc], [notfound]) ;; esac if test "$CXX" = "notfound" then @@ -1259,6 +1276,12 @@ case $CC in ;; esac ;; + *icc*) + PGO_PROF_GEN_FLAG="-prof-gen" + PGO_PROF_USE_FLAG="-prof-use" + LLVM_PROF_MERGER="true" + LLVM_PROF_FILE="" + ;; esac # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be @@ -1370,6 +1393,13 @@ yes) BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" fi + # ICC doesn't recognize the option, but only emits a warning + ## XXX does it emit an unused result warning and can it be disabled? + case "$CC" in + *icc*) + ac_cv_disable_unused_result_warning=no + ;; + *) AC_MSG_CHECKING(if we can turn off $CC unused result warning) ac_save_cc="$CC" CC="$CC -Wunused-result -Werror" @@ -1386,6 +1416,8 @@ yes) CFLAGS="$save_CFLAGS" CC="$ac_save_cc" AC_MSG_RESULT($ac_cv_disable_unused_result_warning) + ;; + esac if test $ac_cv_disable_unused_result_warning = yes then @@ -1608,6 +1640,13 @@ yes) ;; esac +# ICC needs -fp-model strict or floats behave badly +case "$CC" in +*icc*) + CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" + ;; +esac + if test "$Py_DEBUG" = 'true'; then : else -- cgit v1.2.1 From f9ea2feec6b4dee3e858eb37def4f6ecee6f9dbc Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 8 Mar 2016 00:28:37 -0500 Subject: Issue #24324: Do not enable unreachable code warnings when using gcc as the option does not work correctly in older versions of gcc and has been silently removed as of gcc-4.5. --- configure.ac | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 94632f2645..bacb7b06a1 100644 --- a/configure.ac +++ b/configure.ac @@ -1483,14 +1483,23 @@ yes) ])) CFLAGS="$save_CFLAGS" CC="$ac_save_cc" - AC_MSG_RESULT($ac_cv_enable_unreachable_code_warning) # Don't enable unreachable code warning in debug mode, since it usually # results in non-standard code paths. - if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true" + # Issue #24324: Unfortunately, the unreachable code warning does not work + # correctly on gcc and has been silently removed from the compiler. + # It is supported on clang but on OS X systems gcc may be an alias + # for clang. Try to determine if the compiler is not really gcc and, + # if so, only then enable the warning. + if test $ac_cv_enable_unreachable_code_warning = yes && \ + test "$Py_DEBUG" != "true" && \ + test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`" then BASECFLAGS="$BASECFLAGS -Wunreachable-code" + else + ac_cv_enable_unreachable_code_warning=no fi + AC_MSG_RESULT($ac_cv_enable_unreachable_code_warning) # if using gcc on alpha, use -mieee to get (near) full IEEE 754 # support. Without this, treatment of subnormals doesn't follow -- cgit v1.2.1 From 583ffdd3925fcfec9ab9084752f360c0a370116b Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Fri, 18 Mar 2016 02:36:41 +0000 Subject: Issue #17603: Check for st_blocks field without requiring fileblocks.o --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bacb7b06a1..282610a3dc 100644 --- a/configure.ac +++ b/configure.ac @@ -3727,7 +3727,7 @@ AC_CHECK_MEMBERS([struct stat.st_blksize]) AC_CHECK_MEMBERS([struct stat.st_flags]) AC_CHECK_MEMBERS([struct stat.st_gen]) AC_CHECK_MEMBERS([struct stat.st_birthtime]) -AC_STRUCT_ST_BLOCKS +AC_CHECK_MEMBERS([struct stat.st_blocks]) AC_MSG_CHECKING(for time.h that defines altzone) AC_CACHE_VAL(ac_cv_header_time_altzone,[ -- cgit v1.2.1 From 8d42903a3dba7e0cfe15445906d07f33b2867229 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Tue, 26 Apr 2016 01:09:18 +0200 Subject: Issue #20306: The pw_gecos and pw_passwd fields are not required by POSIX. If they aren't present, set them to an empty string. --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7a6b5be211..bfd2b04051 100644 --- a/configure.ac +++ b/configure.ac @@ -3762,6 +3762,10 @@ AC_CHECK_MEMBERS([struct stat.st_flags]) AC_CHECK_MEMBERS([struct stat.st_gen]) AC_CHECK_MEMBERS([struct stat.st_birthtime]) AC_CHECK_MEMBERS([struct stat.st_blocks]) +AC_CHECK_MEMBERS([struct passwd.pw_gecos, struct passwd.pw_passwd], [], [], [[ + #include + #include +]]) AC_MSG_CHECKING(for time.h that defines altzone) AC_CACHE_VAL(ac_cv_header_time_altzone,[ -- cgit v1.2.1 From b7f049ff2025c759f7c52ced5204cc05ef22fe86 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 4 May 2016 09:44:44 +0300 Subject: Issue #26932: Fixed support of RTLD_* constants defined as enum values, not via macros (in particular on Android). Patch by Chi Hsuan Yen. --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bfd2b04051..f947af95d7 100644 --- a/configure.ac +++ b/configure.ac @@ -4342,6 +4342,8 @@ then [define to 1 if your sem_getvalue is broken.]) fi +AC_CHECK_DECLS([RTLD_LAZY, RTLD_NOW, RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND], [], [], [[#include ]]) + # determine what size digit to use for Python's longs AC_MSG_CHECKING([digit size for Python's longs]) AC_ARG_ENABLE(big-digits, -- cgit v1.2.1 From 008c426d4a560e63e9a5c56491de91c72417c68b Mon Sep 17 00:00:00 2001 From: doko Date: Tue, 14 Jun 2016 08:55:19 +0200 Subject: - Issue #23968: Rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install the platform specifc _sysconfigdata module into the platform directory and rename it to include the ABIFLAGS. --- configure.ac | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1fbc655d44..fa1bdec138 100644 --- a/configure.ac +++ b/configure.ac @@ -872,10 +872,17 @@ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report]) fi fi -PLATDIR=plat-$MACHDEP +if test x$PLATFORM_TRIPLET = x; then + PLATDIR=plat-$MACHDEP +else + PLATDIR=plat-$PLATFORM_TRIPLET +fi AC_SUBST(PLATDIR) AC_SUBST(PLATFORM_TRIPLET) - +if test x$MULTIARCH != x; then + MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\"" +fi +AC_SUBST(MULTIARCH_CPPFLAGS) AC_MSG_CHECKING([for -Wl,--no-as-needed]) save_LDFLAGS="$LDFLAGS" @@ -4462,7 +4469,11 @@ AC_MSG_RESULT($LDVERSION) dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) -LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" +if test x$PLATFORM_TRIPLET = x; then + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" +else + LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" +fi AC_SUBST(LIBPL) # Check whether right shifting a negative integer extends the sign bit -- cgit v1.2.1 From 029ca9d149065ab046b0837244cffa7bf51fbdd4 Mon Sep 17 00:00:00 2001 From: doko Date: Tue, 14 Jun 2016 10:15:25 +0200 Subject: - Don't use largefile support for GNU/Hurd. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index fa1bdec138..39d12e98de 100644 --- a/configure.ac +++ b/configure.ac @@ -1986,6 +1986,11 @@ if test "$sol_lfs_bug" = "yes"; then use_lfs=no fi +# Don't use largefile support for GNU/Hurd +case $ac_sys_system in GNU*) + use_lfs=no +esac + if test "$use_lfs" = "yes"; then # Two defines needed to enable largefile support on various platforms # These may affect some typedefs -- cgit v1.2.1 From fae53910737da07bcd257db4ef77f26c8c577629 Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Thu, 7 Jul 2016 18:00:22 +0200 Subject: Issue #27434: Version of interpreter running a cross-build and source version must be the same. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 60e8089d67..9b65ec16a4 100644 --- a/configure.ac +++ b/configure.ac @@ -62,7 +62,7 @@ if test "$cross_compiling" = yes; then if test -z "$PYTHON_FOR_BUILD"; then for interp in python$PACKAGE_VERSION python3 python; do which $interp >/dev/null 2>&1 || continue - if $interp -c 'import sys;sys.exit(not sys.version_info@<:@:2@:>@ >= (3,3))'; then + if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info@<:@:2@:>@) == '$PACKAGE_VERSION')"; then break fi interp= -- cgit v1.2.1 From 29f7064bcbbbf24ec5f5da1318c5cb4a9a108c73 Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Sat, 9 Jul 2016 11:05:42 +0200 Subject: Issue #27442: Expose the Android API level in sysconfig.get_config_vars() as 'ANDROID_API_LEVEL'. --- configure.ac | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9b65ec16a4..7c83ca685c 100644 --- a/configure.ac +++ b/configure.ac @@ -899,6 +899,25 @@ AC_SUBST(NO_AS_NEEDED) # checks for UNIX variants that set C preprocessor variables AC_USE_SYSTEM_EXTENSIONS +AC_MSG_CHECKING([for the Android API level]) +cat >> conftest.c < +__ANDROID_API__ +#else +#error not Android +#endif +EOF + +if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then + ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'` + AC_MSG_RESULT([$ANDROID_API_LEVEL]) + AC_DEFINE_UNQUOTED(ANDROID_API_LEVEL, $ANDROID_API_LEVEL, [The Android API level.]) +else + AC_MSG_RESULT([not Android]) +fi +rm -f conftest.c conftest.out + # Check for unsupported systems case $ac_sys_system/$ac_sys_release in atheos*|Linux*/1*) -- cgit v1.2.1 From b9504180a682b838b56c91420f59d432fde442d9 Mon Sep 17 00:00:00 2001 From: doko Date: Mon, 29 Aug 2016 20:03:25 +0200 Subject: - Issue #23968, keep platform_triplet and multiarch macros in sync --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 64c844dc54..2e0cb397ce 100644 --- a/configure.ac +++ b/configure.ac @@ -882,6 +882,8 @@ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then if test x$PLATFORM_TRIPLET != x$MULTIARCH; then AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report]) fi +elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then + MULTIARCH=$PLATFORM_TRIPLET fi if test x$PLATFORM_TRIPLET = x; then PLATDIR=plat-$MACHDEP -- cgit v1.2.1 From 4846ba81c69ebc815b35a89ed54fef7b5ffb1417 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Tue, 30 Aug 2016 10:47:49 -0700 Subject: Issue #27895: Spelling fixes (Contributed by Ville Skytt?). --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2e0cb397ce..f68069dd4f 100644 --- a/configure.ac +++ b/configure.ac @@ -1639,7 +1639,7 @@ yes) # Calculate an appropriate deployment target for this build: # The deployment target value is used explicitly to enable certain # features are enabled (such as builtin libedit support for readline) - # through the use of Apple's Availabiliy Macros and is used as a + # through the use of Apple's Availability Macros and is used as a # component of the string returned by distutils.get_platform(). # # Use the value from: -- cgit v1.2.1 From b0d0b8118fdb895d314f8bd079a781225b194aa4 Mon Sep 17 00:00:00 2001 From: doko Date: Thu, 1 Sep 2016 22:05:20 +0200 Subject: - Issue #27917: Set platform triplets for Android builds. --- configure.ac | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f68069dd4f..56fd29cdb9 100644 --- a/configure.ac +++ b/configure.ac @@ -768,7 +768,31 @@ cat >> conftest.c < Date: Mon, 5 Sep 2016 23:54:41 +0200 Subject: Issue #27744: Add AF_ALG (Linux Kernel crypto) to socket module. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 56fd29cdb9..088511f33c 100644 --- a/configure.ac +++ b/configure.ac @@ -3862,6 +3862,19 @@ if test $ac_cv_struct_sockaddr_storage = yes; then AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [struct sockaddr_storage (sys/socket.h)]) fi +AC_MSG_CHECKING(for sockaddr_alg) +AC_CACHE_VAL(ac_cv_struct_sockaddr_alg, +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +# include +# include +# include ]], [[struct sockaddr_alg s]])], + [ac_cv_struct_sockaddr_alg=yes], + [ac_cv_struct_sockaddr_alg=no])) +AC_MSG_RESULT($ac_cv_struct_sockaddr_alg) +if test $ac_cv_struct_sockaddr_alg = yes; then + AC_DEFINE(HAVE_SOCKADDR_ALG, 1, [struct sockaddr_alg (linux/if_alg.h)]) +fi + # checks for compiler characteristics AC_C_CHAR_UNSIGNED -- cgit v1.2.1 From 907ccded8b6fa68f6f572ae5de6760595df0d5a1 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 5 Sep 2016 17:44:18 -0700 Subject: require a long long data type (closes #27961) --- configure.ac | 116 +++++++++++++++++++++++++---------------------------------- 1 file changed, 49 insertions(+), 67 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 088511f33c..68ed2f2495 100644 --- a/configure.ac +++ b/configure.ac @@ -2092,6 +2092,7 @@ AC_CHECK_TYPE(__uint128_t, # ANSI C requires sizeof(char) == 1, so no need to check it AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) +AC_CHECK_SIZEOF(long long, 8) AC_CHECK_SIZEOF(void *, 4) AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(float, 4) @@ -2100,17 +2101,6 @@ AC_CHECK_SIZEOF(fpos_t, 4) AC_CHECK_SIZEOF(size_t, 4) AC_CHECK_SIZEOF(pid_t, 4) -AC_MSG_CHECKING(for long long support) -have_long_long=no -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[ - AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.]) - have_long_long=yes -],[]) -AC_MSG_RESULT($have_long_long) -if test "$have_long_long" = yes ; then -AC_CHECK_SIZEOF(long long, 8) -fi - AC_MSG_CHECKING(for long double support) have_long_double=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long double x; x = (long double)0;]])],[ @@ -2150,8 +2140,6 @@ AC_CHECK_SIZEOF(off_t, [], [ ]) AC_MSG_CHECKING(whether to enable large file support) -if test "$have_long_long" = yes -then if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1, @@ -2163,9 +2151,6 @@ if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ else AC_MSG_RESULT(no) fi -else - AC_MSG_RESULT(no) -fi AC_CHECK_SIZEOF(time_t, [], [ #ifdef HAVE_SYS_TYPES_H @@ -4925,63 +4910,60 @@ if test "x$ac_cv_file__dev_ptc" = xyes; then [Define to 1 if you have the /dev/ptc device file.]) fi -if test "$have_long_long" = yes -then - AC_MSG_CHECKING(for %lld and %llu printf() format support) - AC_CACHE_VAL(ac_cv_have_long_long_format, - AC_RUN_IFELSE([AC_LANG_SOURCE([[[ - #include - #include - #include +AC_MSG_CHECKING(for %lld and %llu printf() format support) +AC_CACHE_VAL(ac_cv_have_long_long_format, +AC_RUN_IFELSE([AC_LANG_SOURCE([[[ +#include +#include +#include - #ifdef HAVE_SYS_TYPES_H - #include - #endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif - int main() - { - char buffer[256]; +int main() +{ +char buffer[256]; - if (sprintf(buffer, "%lld", (long long)123) < 0) - return 1; - if (strcmp(buffer, "123")) - return 1; +if (sprintf(buffer, "%lld", (long long)123) < 0) +return 1; +if (strcmp(buffer, "123")) +return 1; - if (sprintf(buffer, "%lld", (long long)-123) < 0) - return 1; - if (strcmp(buffer, "-123")) - return 1; +if (sprintf(buffer, "%lld", (long long)-123) < 0) +return 1; +if (strcmp(buffer, "-123")) +return 1; - if (sprintf(buffer, "%llu", (unsigned long long)123) < 0) - return 1; - if (strcmp(buffer, "123")) - return 1; +if (sprintf(buffer, "%llu", (unsigned long long)123) < 0) +return 1; +if (strcmp(buffer, "123")) +return 1; - return 0; - } - ]]])], - [ac_cv_have_long_long_format=yes], - [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 - #include - ]], [[ - 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 +return 0; +} +]]])], +[ac_cv_have_long_long_format=yes], +[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 +#include +]], [[ +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) if test "$ac_cv_have_long_long_format" = yes then -- cgit v1.2.1 From cf6adf24ceeab86dfeee86c57d3c01e61740b665 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 6 Sep 2016 11:58:01 -0700 Subject: require standard int types to be defined (#17884) --- configure.ac | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 68ed2f2495..29d5527d32 100644 --- a/configure.ac +++ b/configure.ac @@ -1918,7 +1918,7 @@ AC_HEADER_STDC AC_CHECK_HEADERS(asm/types.h conio.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \ -sched.h shadow.h signal.h stdint.h stropts.h termios.h \ +sched.h shadow.h signal.h stropts.h termios.h \ unistd.h utime.h \ poll.h sys/devpoll.h sys/epoll.h sys/poll.h \ sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \ @@ -2060,29 +2060,6 @@ AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is AC_TYPE_SIZE_T AC_TYPE_UID_T -# There are two separate checks for each of the exact-width integer types we -# need. First we check whether the type is available using the usual -# AC_CHECK_TYPE macro with the default includes (which includes -# and where available). We then also use the special type checks of -# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available -# directly, #define's uint32_t to be a suitable type. - -AC_CHECK_TYPE(uint32_t, - AC_DEFINE(HAVE_UINT32_T, 1, [Define if your compiler provides uint32_t.]),,) -AC_TYPE_UINT32_T - -AC_CHECK_TYPE(uint64_t, - AC_DEFINE(HAVE_UINT64_T, 1, [Define if your compiler provides uint64_t.]),,) -AC_TYPE_UINT64_T - -AC_CHECK_TYPE(int32_t, - AC_DEFINE(HAVE_INT32_T, 1, [Define if your compiler provides int32_t.]),,) -AC_TYPE_INT32_T - -AC_CHECK_TYPE(int64_t, - AC_DEFINE(HAVE_INT64_T, 1, [Define if your compiler provides int64_t.]),,) -AC_TYPE_INT64_T - AC_CHECK_TYPE(ssize_t, AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,) AC_CHECK_TYPE(__uint128_t, @@ -2126,12 +2103,8 @@ fi AC_CHECK_TYPES(uintptr_t, [AC_CHECK_SIZEOF(uintptr_t, 4)], - [], [#ifdef HAVE_STDINT_H - #include - #endif - #ifdef HAVE_INTTYPES_H - #include - #endif]) + [], [#include + #include ]) AC_CHECK_SIZEOF(off_t, [], [ #ifdef HAVE_SYS_TYPES_H -- cgit v1.2.1 From aa95399001155e280add7134e5e853c5f99198c0 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 6 Sep 2016 13:33:56 -0700 Subject: require uintptr_t to exist --- configure.ac | 5 ----- 1 file changed, 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 29d5527d32..9358f0a83a 100644 --- a/configure.ac +++ b/configure.ac @@ -2101,11 +2101,6 @@ if test "$have_c99_bool" = yes ; then AC_CHECK_SIZEOF(_Bool, 1) fi -AC_CHECK_TYPES(uintptr_t, - [AC_CHECK_SIZEOF(uintptr_t, 4)], - [], [#include - #include ]) - AC_CHECK_SIZEOF(off_t, [], [ #ifdef HAVE_SYS_TYPES_H #include -- cgit v1.2.1 From a28ea98f03b83e111ff4c652b49fb97fc6bc16f2 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 6 Sep 2016 13:53:14 -0700 Subject: add back SIZEOF_UINTPTR_T --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9358f0a83a..b4c7016368 100644 --- a/configure.ac +++ b/configure.ac @@ -2077,6 +2077,7 @@ AC_CHECK_SIZEOF(double, 8) AC_CHECK_SIZEOF(fpos_t, 4) AC_CHECK_SIZEOF(size_t, 4) AC_CHECK_SIZEOF(pid_t, 4) +AC_CHECK_SIZEOF(uintptr_t) AC_MSG_CHECKING(for long double support) have_long_double=no -- cgit v1.2.1 From 35e2eedb7a28b61076de8efee097e974418274b0 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Tue, 6 Sep 2016 15:09:20 -0700 Subject: Issue #21122: Fix LTO builds on OS X. Patch by Brett Cannon. --- configure.ac | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b4c7016368..1e77c669cb 100644 --- a/configure.ac +++ b/configure.ac @@ -1299,13 +1299,20 @@ fi], if test "$Py_LTO" = 'true' ; then case $CC in *clang*) - # Any changes made here should be reflected in the GCC+Darwin case below - LTOFLAGS="-flto" + case $ac_sys_system in + Darwin*) + # Any changes made here should be reflected in the GCC+Darwin case below + LTOFLAGS="-flto -Wl,-export_dynamic" + ;; + *) + LTOFLAGS="-flto" + ;; + esac ;; *gcc*) case $ac_sys_system in Darwin*) - LTOFLAGS="-flto" + LTOFLAGS="-flto -Wl,-export_dynamic" ;; *) LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" -- cgit v1.2.1 From 79fb79718919ac44afc061044bdf0253555d19d8 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 6 Sep 2016 17:12:40 -0700 Subject: Issue #26359: Add the --with-optimizations configure flag. The flag will activate LTO and PGO build support when available. Thanks to Alecsandur Patrascu of Intel for the original patch. --- configure.ac | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 786796ad16..b511a79ba4 100644 --- a/configure.ac +++ b/configure.ac @@ -1282,6 +1282,37 @@ else AC_MSG_RESULT(no); Py_DEBUG='false' fi], [AC_MSG_RESULT(no)]) +# Enable optimization flags +AC_SUBST(DEF_MAKE_ALL_RULE) +AC_SUBST(DEF_MAKE_RULE) +Py_OPT='false' +AC_MSG_CHECKING(for --with-optimizations) +AC_ARG_WITH(optimizations, AS_HELP_STRING([--with-optimizations], [Enable all optimizations when available (LTO, PGO, etc). Disabled by default.]), +[ +if test "$withval" != no +then + Py_OPT='true' + AC_MSG_RESULT(yes); +else + Py_OPT='false' + AC_MSG_RESULT(no); +fi], +[AC_MSG_RESULT(no)]) +if test "$Py_OPT" = 'true' ; then + Py_LTO='true' + case $ac_sys_system in + Darwin*) + # At least on macOS El Capitan, LTO does not work with PGO. + Py_LTO='false' + ;; + esac + DEF_MAKE_ALL_RULE="profile-opt" + DEF_MAKE_RULE="build_all" +else + DEF_MAKE_ALL_RULE="build_all" + DEF_MAKE_RULE="all" +fi + # Enable LTO flags AC_SUBST(LTOFLAGS) AC_MSG_CHECKING(for --with-lto) @@ -5337,3 +5368,13 @@ $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ -s Modules Modules/Setup.config \ Modules/Setup.local Modules/Setup mv config.c Modules + +if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then + echo "" >&AS_MESSAGE_FD + echo "" >&AS_MESSAGE_FD + echo "If you want a release build with all optimizations active (LTO, PGO, etc)," + echo "please run ./configure --with-optimizations" >&AS_MESSAGE_FD + echo "" >&AS_MESSAGE_FD + echo "" >&AS_MESSAGE_FD +fi + -- cgit v1.2.1 From 06c2472156a7ab7650b0683f656b2a71193f2952 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 7 Sep 2016 11:06:17 -0700 Subject: require C99 bool --- configure.ac | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b511a79ba4..d89ebef608 100644 --- a/configure.ac +++ b/configure.ac @@ -2128,17 +2128,7 @@ if test "$have_long_double" = yes ; then AC_CHECK_SIZEOF(long double, 16) fi - -AC_MSG_CHECKING(for _Bool support) -have_c99_bool=no -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Bool x; x = (_Bool)0;]])],[ - AC_DEFINE(HAVE_C99_BOOL, 1, [Define this if you have the type _Bool.]) - have_c99_bool=yes -],[]) -AC_MSG_RESULT($have_c99_bool) -if test "$have_c99_bool" = yes ; then AC_CHECK_SIZEOF(_Bool, 1) -fi AC_CHECK_SIZEOF(off_t, [], [ #ifdef HAVE_SYS_TYPES_H -- cgit v1.2.1 From 9456c999c4d511610d568aac647ceb9f2424f7d0 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 7 Sep 2016 11:43:22 -0700 Subject: permit intermingled declarations --- configure.ac | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d89ebef608..ec6d61be9c 100644 --- a/configure.ac +++ b/configure.ac @@ -1542,28 +1542,6 @@ yes) BASECFLAGS="$BASECFLAGS -Wno-unused-result" fi - AC_MSG_CHECKING(for -Werror=declaration-after-statement) - ac_save_cc="$CC" - CC="$CC -Werror=declaration-after-statement" - save_CFLAGS="$CFLAGS" - AC_CACHE_VAL(ac_cv_declaration_after_statement_warning, - AC_COMPILE_IFELSE( - [ - AC_LANG_PROGRAM([[]], [[]]) - ],[ - ac_cv_declaration_after_statement_warning=yes - ],[ - ac_cv_declaration_after_statement_warning=no - ])) - CFLAGS="$save_CFLAGS" - CC="$ac_save_cc" - AC_MSG_RESULT($ac_cv_declaration_after_statement_warning) - - if test $ac_cv_declaration_after_statement_warning = yes - then - CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement" - fi - AC_MSG_CHECKING(if we can turn on $CC mixed sign comparison warning) ac_save_cc="$CC" CC="$CC -Wsign-compare" -- cgit v1.2.1 From a2abffdcf2425e08c07b6a3c58dde49c35b81884 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 7 Sep 2016 11:53:55 -0700 Subject: compile with -std=c99 --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index ec6d61be9c..3f723693d6 100644 --- a/configure.ac +++ b/configure.ac @@ -1458,6 +1458,8 @@ then SCO_SV*) OPT="$OPT -m486 -DSCO5" ;; esac + + OPT="$OPT -std=c99" ;; *) -- cgit v1.2.1 From f69d7981b4b0285b351d1b6ad7a4f62f701cf143 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 7 Sep 2016 12:00:06 -0700 Subject: put -std=c99 in CFLAGS_NODIST --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3f723693d6..cd598f0b09 100644 --- a/configure.ac +++ b/configure.ac @@ -1458,8 +1458,6 @@ then SCO_SV*) OPT="$OPT -m486 -DSCO5" ;; esac - - OPT="$OPT -std=c99" ;; *) @@ -1478,6 +1476,8 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS) # tweak BASECFLAGS based on compiler and platform case $GCC in yes) + CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" + # Python doesn't violate C99 aliasing rules, but older versions of # GCC produce warnings for legal Python code. Enable # -fno-strict-aliasing on versions of GCC that support but produce -- cgit v1.2.1 From ed5de88f04ad41178c9cd5e7f593bb613daa64b5 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 8 Sep 2016 11:39:42 +0200 Subject: Issue 28017: Use -std=gnu99 to get C99 with GNU extensions for bluetooth.h on big endian. --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8a87945896..c57a94e4fc 100644 --- a/configure.ac +++ b/configure.ac @@ -1523,7 +1523,9 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS) # tweak BASECFLAGS based on compiler and platform case $GCC in yes) - CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" + # GNU dialect of C99, enables GNU extensions like __attribute__. GNU99 + # is required by bluetooth.h on big endian machines. + CFLAGS_NODIST="$CFLAGS_NODIST -std=gnu99" # Python doesn't violate C99 aliasing rules, but older versions of # GCC produce warnings for legal Python code. Enable -- cgit v1.2.1 From 16bd0974887b5c50b726c4455107daad3b0d41cf Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 8 Sep 2016 09:15:54 -0700 Subject: more PY_LONG_LONG to long long --- configure.ac | 61 ------------------------------------------------------------ 1 file changed, 61 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c57a94e4fc..6f3ca24979 100644 --- a/configure.ac +++ b/configure.ac @@ -4938,67 +4938,6 @@ if test "x$ac_cv_file__dev_ptc" = xyes; then [Define to 1 if you have the /dev/ptc device file.]) fi -AC_MSG_CHECKING(for %lld and %llu printf() format support) -AC_CACHE_VAL(ac_cv_have_long_long_format, -AC_RUN_IFELSE([AC_LANG_SOURCE([[[ -#include -#include -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -int main() -{ -char buffer[256]; - -if (sprintf(buffer, "%lld", (long long)123) < 0) -return 1; -if (strcmp(buffer, "123")) -return 1; - -if (sprintf(buffer, "%lld", (long long)-123) < 0) -return 1; -if (strcmp(buffer, "-123")) -return 1; - -if (sprintf(buffer, "%llu", (unsigned long long)123) < 0) -return 1; -if (strcmp(buffer, "123")) -return 1; - -return 0; -} -]]])], -[ac_cv_have_long_long_format=yes], -[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 -#include -]], [[ -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) - -if test "$ac_cv_have_long_long_format" = yes -then - AC_DEFINE(PY_FORMAT_LONG_LONG, "ll", - [Define to printf format modifier for long long type]) -fi - if test $ac_sys_system = Darwin then LIBS="$LIBS -framework CoreFoundation" -- cgit v1.2.1 From 4b988b10a7941afcac8cb0e5f31c7aad5157592e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 9 Sep 2016 10:22:45 -0700 Subject: compile with -std=c99 instead of -std=gnu99; use kiddie-gloves with bluetooth/bluetooh.h (#28017) --- configure.ac | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 06e6841d79..67d3aefa61 100644 --- a/configure.ac +++ b/configure.ac @@ -1520,9 +1520,7 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS) # tweak BASECFLAGS based on compiler and platform case $GCC in yes) - # GNU dialect of C99, enables GNU extensions like __attribute__. GNU99 - # is required by bluetooth.h on big endian machines. - CFLAGS_NODIST="$CFLAGS_NODIST -std=gnu99" + CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" # Python doesn't violate C99 aliasing rules, but older versions of # GCC produce warnings for legal Python code. Enable @@ -1991,11 +1989,18 @@ sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \ sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \ sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \ libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ -bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \ +linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \ sys/endian.h) AC_HEADER_DIRENT AC_HEADER_MAJOR +# bluetooth/bluetooth.h has been known to not compile with -std=c99. +# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 +SAVE_CFLAGS=$CFLAGS +CFLAGS="-std=c99 $CFLAGS" +AC_CHECK_HEADERS(bluetooth/bluetooth.h) +CFLAGS=$SAVE_CFLAGS + # On Darwin (OS X) net/if.h requires sys/socket.h to be imported first. AC_CHECK_HEADERS([net/if.h], [], [], [#include -- cgit v1.2.1 From 41d4e33a6e5ed2a61ab418864af9ce574e57b961 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 9 Sep 2016 11:37:58 -0700 Subject: remove unused osx10.5 sdk check --- configure.ac | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 67d3aefa61..98f67e1895 100644 --- a/configure.ac +++ b/configure.ac @@ -3203,16 +3203,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* CAN_RAW_FD_FRAMES available check */ AC_MSG_RESULT(no) ]) -AC_MSG_CHECKING(for OSX 10.5 SDK or later) -AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[#include ]], [[FSIORefNum fRef = 0]]) -],[ - AC_DEFINE(HAVE_OSX105_SDK, 1, [Define if compiling using MacOS X 10.5 SDK or later.]) - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) -]) - # Check for --with-doc-strings AC_MSG_CHECKING(for --with-doc-strings) AC_ARG_WITH(doc-strings, -- cgit v1.2.1 From e920f62ce6131c83acb33d0457c8ed05d5acce23 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 9 Sep 2016 12:01:10 -0700 Subject: remove --with(out)-signal-module, since the signal module is non-optional --- configure.ac | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 98f67e1895..94693ea185 100644 --- a/configure.ac +++ b/configure.ac @@ -2814,26 +2814,6 @@ else fi]) AC_MSG_RESULT($with_dbmliborder) -# Determine if signalmodule should be used. -AC_SUBST(USE_SIGNAL_MODULE) -AC_SUBST(SIGNAL_OBJS) -AC_MSG_CHECKING(for --with-signal-module) -AC_ARG_WITH(signal-module, - AS_HELP_STRING([--with-signal-module], [disable/enable signal module])) - -if test -z "$with_signal_module" -then with_signal_module="yes" -fi -AC_MSG_RESULT($with_signal_module) - -if test "${with_signal_module}" = "yes"; then - USE_SIGNAL_MODULE="" - SIGNAL_OBJS="" -else - USE_SIGNAL_MODULE="#" - SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" -fi - # This is used to generate Setup.config AC_SUBST(USE_THREAD_MODULE) USE_THREAD_MODULE="" -- cgit v1.2.1 From 831deb2ea3f31f273438acc797ae12d183a21422 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 9 Sep 2016 14:57:58 -0700 Subject: remove ceval timestamp support --- configure.ac | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 94693ea185..57cf46f277 100644 --- a/configure.ac +++ b/configure.ac @@ -3198,19 +3198,6 @@ then fi AC_MSG_RESULT($with_doc_strings) -# Check if eval loop should use timestamp counter profiling -AC_MSG_CHECKING(for --with-tsc) -AC_ARG_WITH(tsc, - AS_HELP_STRING([--with(out)-tsc],[enable/disable timestamp counter profile]),[ -if test "$withval" != no -then - AC_DEFINE(WITH_TSC, 1, - [Define to profile with the Pentium timestamp counter]) - AC_MSG_RESULT(yes) -else AC_MSG_RESULT(no) -fi], -[AC_MSG_RESULT(no)]) - # Check for Python-specific malloc support AC_MSG_CHECKING(for --with-pymalloc) AC_ARG_WITH(pymalloc, -- cgit v1.2.1 From acd89b11067d2037732bd31ff64dd50726d7bb44 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Fri, 9 Sep 2016 17:01:21 -0700 Subject: Closes #27976: Deprecate bundled full copy of libffi Builds on non-OSX UNIX now default to using the system libffi, and warn if the bundled copy is used. --- configure.ac | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 57cf46f277..269c41ec42 100644 --- a/configure.ac +++ b/configure.ac @@ -2737,9 +2737,25 @@ AC_MSG_RESULT($with_system_expat) # Check for use of the system libffi library AC_MSG_CHECKING(for --with-system-ffi) AC_ARG_WITH(system_ffi, - AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library]), - [], - [with_system_ffi="no"]) + AS_HELP_STRING([--with-system-ffi], [build _ctypes module using an installed ffi library]),,,) + +case "$with_system_ffi" in + "") + case $ac_sys_system in + Darwin) + with_system_ffi="no" + ;; + *) + with_system_ffi="yes" + ;; + esac + ;; + yes|no) + ;; + *) + AC_MSG_ERROR([--with-system-ffi accepts no arguments]) + ;; +esac if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`" -- cgit v1.2.1 From 7d9e9f40d8903147693be8d2bbb4a129005ca49e Mon Sep 17 00:00:00 2001 From: ?ukasz Langa Date: Fri, 9 Sep 2016 17:37:37 -0700 Subject: DTrace support: function calls, GC activity, line execution Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc. Largely based by an initial patch by Jes?s Cea Avi?n, with some influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's unification patch. Things deliberately left out for simplicity: - ustack helpers, I have no way of testing them at this point since they are Solaris-specific - PyFrameObject * in function__entry/function__return, this is SystemTap-specific - SPARC support - dynamic tracing - sys module dtrace facility introspection All of those might be added later. --- configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 269c41ec42..b1af05e43c 100644 --- a/configure.ac +++ b/configure.ac @@ -694,6 +694,7 @@ fi AC_PROG_CC AC_PROG_CPP AC_PROG_GREP +AC_PROG_SED AC_SUBST(CXX) AC_SUBST(MAINCC) @@ -3245,6 +3246,47 @@ if test "$with_valgrind" != no; then OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" fi +# Check for DTrace support +AC_MSG_CHECKING(for --with-dtrace) +AC_ARG_WITH(dtrace, + AC_HELP_STRING(--with(out)-dtrace, [disable/enable DTrace support]),, + with_dtrace=no) +AC_MSG_RESULT($with_dtrace) + +AC_SUBST(DTRACE) +AC_SUBST(DFLAGS) +AC_SUBST(DTRACE_HEADERS) +AC_SUBST(DTRACE_OBJS) +DTRACE= +DFLAGS= +DTRACE_HEADERS= +DTRACE_OBJS= + +if test "$with_dtrace" = "yes" +then + AC_PATH_PROG(DTRACE, [dtrace], [not found]) + if test "$DTRACE" = "not found"; then + AC_MSG_ERROR([dtrace command not found on \$PATH]) + fi + AC_DEFINE(WITH_DTRACE, 1, [Define if you want to compile in DTrace support]) + DTRACE_HEADERS="Include/pydtrace_probes.h" + + # On OS X, DTrace providers do not need to be explicitly compiled and + # linked into the binary. Correspondingly, dtrace(1) is missing the ELF + # generation flag '-G'. We check for presence of this flag, rather than + # hardcoding support by OS, in the interest of robustness. + AC_CACHE_CHECK([whether DTrace probes require linking], + [ac_cv_dtrace_link], [dnl + ac_cv_dtrace_link=no + echo 'BEGIN' > conftest.d + "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ + ac_cv_dtrace_link=yes + ]) + if test "$ac_cv_dtrace_link" = "yes"; then + DTRACE_OBJS="Python/pydtrace.o" + fi +fi + # -I${DLINCLDIR} is added to the compile rule for importdl.o AC_SUBST(DLINCLDIR) DLINCLDIR=. -- cgit v1.2.1 From a5d8092435155dfc8bd6b6c58fb56e22bdb72831 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Fri, 9 Sep 2016 17:59:49 -0700 Subject: Issue #28046: Remove platform-specific directories from sys.path --- configure.ac | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b1af05e43c..328c6105e6 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,7 @@ if test "$cross_compiling" = yes; then AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) fi AC_MSG_RESULT($interp) - PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp + PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib '$interp fi # Used to comment out stuff for rebuilding generated files GENERATED_COMMENT='#' @@ -910,12 +910,6 @@ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then MULTIARCH=$PLATFORM_TRIPLET fi -if test x$PLATFORM_TRIPLET = x; then - PLATDIR=plat-$MACHDEP -else - PLATDIR=plat-$PLATFORM_TRIPLET -fi -AC_SUBST(PLATDIR) AC_SUBST(PLATFORM_TRIPLET) if test x$MULTIARCH != x; then MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\"" -- cgit v1.2.1 From fc4cba6a3f403a3d2b045cd5b351906fb798ea0f Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 10 Sep 2016 17:45:33 -0700 Subject: force gcc to use c99 inline semantics --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 328c6105e6..a3df9a08d2 100644 --- a/configure.ac +++ b/configure.ac @@ -1515,7 +1515,7 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS) # tweak BASECFLAGS based on compiler and platform case $GCC in yes) - CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" + CFLAGS_NODIST="$CFLAGS_NODIST -std=c99 -fno-gnu89-inline" # Python doesn't violate C99 aliasing rules, but older versions of # GCC produce warnings for legal Python code. Enable -- cgit v1.2.1 From 95c026343d95954969fe833ab2853c0f5a6d3698 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 10 Sep 2016 17:53:13 -0700 Subject: Backed out changeset 8460a729e1de --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a3df9a08d2..328c6105e6 100644 --- a/configure.ac +++ b/configure.ac @@ -1515,7 +1515,7 @@ AC_SUBST(UNIVERSAL_ARCH_FLAGS) # tweak BASECFLAGS based on compiler and platform case $GCC in yes) - CFLAGS_NODIST="$CFLAGS_NODIST -std=c99 -fno-gnu89-inline" + CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" # Python doesn't violate C99 aliasing rules, but older versions of # GCC produce warnings for legal Python code. Enable -- cgit v1.2.1 From 4043d4157b1160ae1fd5e2ee7cba32cbfb5771a4 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 11 Sep 2016 21:56:32 +0300 Subject: Issue #23545: Turn on extra warnings on GCC. --- configure.ac | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 328c6105e6..0eaa06c5c1 100644 --- a/configure.ac +++ b/configure.ac @@ -1517,6 +1517,26 @@ case $GCC in yes) CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" + AC_MSG_CHECKING(for -Wextra) + ac_save_cc="$CC" + CC="$CC -Wextra -Werror" + AC_CACHE_VAL(ac_cv_extra_warnings, + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([[]], [[]]) + ],[ + ac_cv_extra_warnings=yes + ],[ + ac_cv_extra_warnings=no + ])) + CC="$ac_save_cc" + AC_MSG_RESULT($ac_cv_extra_warnings) + + if test $ac_cv_extra_warnings = yes + then + CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" + fi + # Python doesn't violate C99 aliasing rules, but older versions of # GCC produce warnings for legal Python code. Enable # -fno-strict-aliasing on versions of GCC that support but produce @@ -1581,6 +1601,47 @@ yes) if test $ac_cv_disable_unused_result_warning = yes then BASECFLAGS="$BASECFLAGS -Wno-unused-result" + CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" + fi + + AC_MSG_CHECKING(if we can turn off $CC unused parameter warning) + ac_save_cc="$CC" + CC="$CC -Wunused-parameter -Werror" + AC_CACHE_VAL(ac_cv_disable_unused_parameter_warning, + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([[]], [[]]) + ],[ + ac_cv_disable_unused_parameter_warning=yes + ],[ + ac_cv_disable_unused_parameter_warning=no + ])) + CC="$ac_save_cc" + AC_MSG_RESULT($ac_cv_disable_unused_parameter_warning) + + if test $ac_cv_disable_unused_parameter_warning = yes + then + CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter" + fi + + AC_MSG_CHECKING(if we can turn off $CC missing field initializers warning) + ac_save_cc="$CC" + CC="$CC -Wmissing-field-initializers -Werror" + AC_CACHE_VAL(ac_cv_disable_missing_field_initializers, + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([[]], [[]]) + ],[ + ac_cv_disable_missing_field_initializers=yes + ],[ + ac_cv_disable_missing_field_initializers=no + ])) + CC="$ac_save_cc" + AC_MSG_RESULT($ac_cv_disable_missing_field_initializers) + + if test $ac_cv_disable_missing_field_initializers = yes + then + CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers" fi AC_MSG_CHECKING(if we can turn on $CC mixed sign comparison warning) -- cgit v1.2.1 From ebadb5ed14af411ee0199a9c3f5d69da0bb3f190 Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Sun, 11 Sep 2016 22:22:24 +0200 Subject: Issue #28046: get_sysconfigdata_name() uses the _PYTHON_SYSCONFIGDATA_NAME environment variable that is defined when cross-compiling. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0eaa06c5c1..731b93087d 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,7 @@ if test "$cross_compiling" = yes; then AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) fi AC_MSG_RESULT($interp) - PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib '$interp + PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp fi # Used to comment out stuff for rebuilding generated files GENERATED_COMMENT='#' -- cgit v1.2.1 From c70561b7894365a98df3ca9c8e4e39de9c0f08e3 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 13 Sep 2016 22:55:09 -0700 Subject: more granular configure checks for clock_* functions (closes #28081) --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 01d8d8a771..0a140dbe96 100644 --- a/configure.ac +++ b/configure.ac @@ -3734,6 +3734,12 @@ AC_CHECK_FUNCS(clock_getres, [], [ ]) ]) +AC_CHECK_FUNCS(clock_settime, [], [ + AC_CHECK_LIB(rt, clock_settime, [ + AC_DEFINE(HAVE_CLOCK_SETTIME, 1) + ]) +]) + AC_MSG_CHECKING(for major, minor, and makedev) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #if defined(MAJOR_IN_MKDEV) -- cgit v1.2.1 From 31cb9f369965c4e70f7db1542686a0e845bb06db Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 20 Sep 2016 20:39:33 -0700 Subject: replace usage of Py_VA_COPY with the (C99) standard va_copy --- configure.ac | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0a140dbe96..d55d38ba67 100644 --- a/configure.ac +++ b/configure.ac @@ -4038,20 +4038,6 @@ x.sa_len = 0;]])], [AC_MSG_RESULT(no)] ) -va_list_is_array=no -AC_MSG_CHECKING(whether va_list is an array) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#ifdef HAVE_STDARG_PROTOTYPES -#include -#else -#include -#endif -]], [[va_list list1, list2; list1 = list2;]])],[],[ - AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define if a va_list is an array of some kind]) - va_list_is_array=yes -]) -AC_MSG_RESULT($va_list_is_array) - # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( AH_TEMPLATE(HAVE_GETHOSTBYNAME_R, [Define this if you have some version of gethostbyname_r()]) -- cgit v1.2.1 From 9ffc4e6cf1964369e0d9b3729659dd947abbb683 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 24 Sep 2016 12:34:25 +0200 Subject: Write configure message to AS_MESSAGE_FD --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d55d38ba67..8ce2ae998e 100644 --- a/configure.ac +++ b/configure.ac @@ -5394,7 +5394,7 @@ mv config.c Modules if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then echo "" >&AS_MESSAGE_FD echo "" >&AS_MESSAGE_FD - echo "If you want a release build with all optimizations active (LTO, PGO, etc)," + echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&AS_MESSAGE_FD echo "please run ./configure --with-optimizations" >&AS_MESSAGE_FD echo "" >&AS_MESSAGE_FD echo "" >&AS_MESSAGE_FD -- cgit v1.2.1 From ced9bb408868f1e2b4fbd8f9c472aae8fb6f8d6b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 3 Nov 2016 16:20:00 -0700 Subject: Issue #28605: Fix the help and What's New entry for --with-optimizations. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8ce2ae998e..73927b1417 100644 --- a/configure.ac +++ b/configure.ac @@ -1282,7 +1282,7 @@ AC_SUBST(DEF_MAKE_ALL_RULE) AC_SUBST(DEF_MAKE_RULE) Py_OPT='false' AC_MSG_CHECKING(for --with-optimizations) -AC_ARG_WITH(optimizations, AS_HELP_STRING([--with-optimizations], [Enable expensive optimizations (PGO, maybe LTO, etc). Disabled by default.]), +AC_ARG_WITH(optimizations, AS_HELP_STRING([--with-optimizations], [Enable expensive optimizations (PGO, etc). Disabled by default.]), [ if test "$withval" != no then @@ -1296,7 +1296,7 @@ fi], if test "$Py_OPT" = 'true' ; then # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not # compile working code using it and both test_distutils and test_gdb are - # broken when you do managed to get a toolchain that works with it. People + # broken when you do manage to get a toolchain that works with it. People # who want LTO need to use --with-lto themselves. DEF_MAKE_ALL_RULE="profile-opt" REQUIRE_PGO="yes" -- cgit v1.2.1 From 7480ba43f3a27b2d9c9cc76bcbf07872fd1c1c22 Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Sat, 10 Dec 2016 17:31:28 +0100 Subject: Issue #28849: Do not define sys.implementation._multiarch on Android. --- configure.ac | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1d63813977..4ab1892928 100644 --- a/configure.ac +++ b/configure.ac @@ -770,29 +770,7 @@ cat >> conftest.c < Date: Tue, 13 Dec 2016 16:04:14 +0100 Subject: Issue #28190: Cross compiling the _curses module does not use anymore /usr/include/ncursesw as a headers search path. --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4ab1892928..af540923ac 100644 --- a/configure.ac +++ b/configure.ac @@ -4885,7 +4885,9 @@ fi # first curses header check ac_save_cppflags="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" +if test "$cross_compiling" = no; then + CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" +fi AC_CHECK_HEADERS(curses.h ncurses.h) -- cgit v1.2.1 From fa2e23427743f2738a8fdac44b235dd26f61286b Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Wed, 21 Dec 2016 12:46:36 +0100 Subject: Issue #28538: Fix the compilation error that occurs because if_nameindex() is available on Android API level 24, but the if_nameindex structure is not defined. --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9013c0eb3a..61fad0098c 100644 --- a/configure.ac +++ b/configure.ac @@ -3384,7 +3384,6 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ futimens futimes gai_strerror getentropy \ getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ - if_nameindex \ initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \ memrchr mbrtowc mkdirat mkfifo \ mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ @@ -3737,6 +3736,19 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ AC_MSG_RESULT(no) ]) +# On Android API level 24 if_nameindex() is available, but the if_nameindex +# structure is not defined. +AC_MSG_CHECKING(for if_nameindex) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_NET_IF_H +# include +#endif +]], [[struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;]])], + [AC_DEFINE(HAVE_IF_NAMEINDEX, 1, Define to 1 if you have the 'if_nameindex' function.) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) +]) + # On OSF/1 V5.1, getaddrinfo is available, but a define # for [no]getaddrinfo in netdb.h. AC_MSG_CHECKING(for getaddrinfo) -- cgit v1.2.1 From 38661766bdcf79704d84b2b5b2a9c43ac10e4fb8 Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Wed, 21 Dec 2016 17:29:59 +0100 Subject: Issue #28538: On Darwin net/if.h requires that sys/socket.h be included beforehand. --- configure.ac | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 61fad0098c..8099e27c77 100644 --- a/configure.ac +++ b/configure.ac @@ -3736,10 +3736,22 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ AC_MSG_RESULT(no) ]) -# On Android API level 24 if_nameindex() is available, but the if_nameindex -# structure is not defined. +# On Android API level 24 with android-ndk-r13, if_nameindex() is available, +# but the if_nameindex structure is not defined. AC_MSG_CHECKING(for if_nameindex) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #ifdef HAVE_NET_IF_H # include #endif -- cgit v1.2.1 From 9485a47655ea9067ce708ba6e8e32f1bde0682ea Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Thu, 22 Dec 2016 10:38:59 +0100 Subject: Issue #28762: lockf() is available on Android API level 24, but the F_LOCK macro is not defined in android-ndk-r13. --- configure.ac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8099e27c77..9ffdfdfd5a 100644 --- a/configure.ac +++ b/configure.ac @@ -3384,7 +3384,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ futimens futimes gai_strerror getentropy \ getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ - initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \ + initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \ memrchr mbrtowc mkdirat mkfifo \ mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ posix_fallocate posix_fadvise pread \ @@ -3761,6 +3761,15 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ [AC_MSG_RESULT(no) ]) +# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK +# macro is not defined in android-ndk-r13. +AC_MSG_CHECKING(for lockf) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]],[[lockf(0, F_LOCK, 0);]])], + [AC_DEFINE(HAVE_LOCKF, 1, Define to 1 if you have the 'lockf' function and the F_LOCK macro.) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) +]) + # On OSF/1 V5.1, getaddrinfo is available, but a define # for [no]getaddrinfo in netdb.h. AC_MSG_CHECKING(for getaddrinfo) -- cgit v1.2.1 From 6135547397e555d0369aee9fb0452761f15cffde Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Wed, 4 Jan 2017 21:51:16 +0100 Subject: Issue #26851: Set Android compilation and link flags. --- configure.ac | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9ffdfdfd5a..64f12f2879 100644 --- a/configure.ac +++ b/configure.ac @@ -379,6 +379,9 @@ then # a lot of different things including 'define_xopen_source' # in the case statement below. case "$host" in + *-*-linux-android*) + ac_sys_system=Linux-android + ;; *-*-linux*) ac_sys_system=Linux ;; @@ -913,16 +916,25 @@ AC_MSG_CHECKING([for the Android API level]) cat >> conftest.c < -__ANDROID_API__ +android_api = __ANDROID_API__ +arm_arch = __ARM_ARCH #else #error not Android #endif EOF if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then - ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'` + ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out` + _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out` AC_MSG_RESULT([$ANDROID_API_LEVEL]) AC_DEFINE_UNQUOTED(ANDROID_API_LEVEL, $ANDROID_API_LEVEL, [The Android API level.]) + + AC_MSG_CHECKING([for the Android arm ABI]) + AC_MSG_RESULT([$_arm_arch]) + if test "$_arm_arch" = 7; then + BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16" + LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8" + fi else AC_MSG_RESULT([not Android]) fi @@ -2535,6 +2547,7 @@ then then CCSHARED="-fPIC"; else CCSHARED="+z"; fi;; + Linux-android*) ;; Linux*|GNU*) CCSHARED="-fPIC";; BSD/OS*/4*) CCSHARED="-fpic";; FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; @@ -2566,6 +2579,7 @@ then LINKFORSHARED="-Wl,-E -Wl,+s";; # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; + Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys Darwin/*) -- cgit v1.2.1