Commit Graph

777 Commits

Author SHA1 Message Date
Christian Heimes fc9b622819
bpo-45723: Add --with-pkg-config to configure (GH-29517)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-10 23:02:19 +01:00
Christian Heimes 0a9f69539b
bpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-10 20:26:55 +01:00
Erlend Egeberg Aasland 76d14fac72
bpo-45723: Improve and simplify more configure.ac checks (GH-29485) 2021-11-10 16:30:18 +01:00
Erlend Egeberg Aasland 49171aa91a
bpo-45723: Remove dead code for obsolete `--with-dyld` option (GH-29500)
Was commented out by Jack Jansen in 2001-08-15 by commit
b6e9cad34ce46a6a733d8aa5bf5b9d389fa1316f:

"Ripped out Next/OpenStep support, which was broken anyway"

Automerge-Triggered-By: GH:tiran
2021-11-09 13:05:58 -08:00
Christian Heimes 5b7c7cb104
bpo-45763: Detect compression build deps in configure (GH-29483) 2021-11-09 16:42:53 +01:00
Erlend Egeberg Aasland 185533639d
bpo-45723: Remove obsolete AC_EXEEXT from configure.ac (GH-29486)
From the autoconf docs *Obsolete Macros* section:

    Defined the output variable EXEEXT based on the output of the 
    compiler, which is now done automatically. Typically set to empty
    string if Posix and ‘.exe’ if a DOS variant.
2021-11-09 07:32:59 -08:00
Christian Heimes 8fefaad242
bpo-45743: -Wl,-search_paths_first is no longer needed (GH-29464) 2021-11-09 09:06:41 +01:00
Christian Heimes cbab997efb
bpo-45723: Prepare support for autoconf 2.71 (GH-29441) 2021-11-08 19:31:14 +01:00
Erlend Egeberg Aasland 9bd0cf5970
bpo-45723: Add macro for disabling/enabling CC warnings (GH-29466)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-08 18:58:22 +01:00
Christian Heimes 57c50c9c7c
bpo-45723: Add helper macros and more caching to configure.ac (GH-29429)
Almost all checks are now cached by AC_CACHE_CHECK().

Common patterns are replaced by helper macros.

Variable names now use naming scheme ``ac_cv_func_$funcname``,
``ac_cv_lib_$library_$funcname``, or ``ac_cv_header_$headername_h``.

``SYS_SELECT_WITH_SYS_TIME`` is no longer used.

``uuid_create`` and ``uuid_enc_be`` are provided by libc on BSD. It is
safe to use ``AC_CHECK_FUNCS`` here.

Caching speeds up ./configure -C from ~ 4s to 2.6s on my system.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-08 08:06:31 +01:00
Christian Heimes be3cd5c05d
bpo-45723: Detect missing pkg-config (GH-29442) 2021-11-07 11:18:45 +01:00
Christian Heimes e9594f6747
bpo-45731: Handle --enable-loadable-sqlite-extensions in configure (GH-29434) 2021-11-06 10:30:37 +01:00
Christian Heimes 77a1f8d94c
bpo-43158: Use configure values for building _uuid extension (GH-29353) 2021-11-02 12:25:13 +01:00
Christian Heimes 4c95fb4640
bpo-45548: Fix out-of-tree and Debian builds (GH-29263)
Add Modules subdirs to SRCDIRS to generate directories for out-of-tree
object files.

Debian wants ncurses lib. Works on Fedora, too.

Debian also needs pkg-config to detect correct flags.

Remove more outdated comments. Makefile now tracks header dependencies
-lintl is injected by configure when needed. Build _dbm with
gdbm-compat.

Group some modules by purpose. socket, select, and mmap work on Windows,
too.
2021-10-28 11:57:38 +02:00
Christian Heimes 77e3f224d6
bpo-45548: Remove checks for finite and gamma (GH-29206) 2021-10-25 18:25:43 +02:00
Christian Heimes fa26245a1c
bpo-45548: Remove _math.c workarounds for pre-C99 libm (GH-29179)
The :mod:`math` and :mod:`cmath` implementation now require a C99 compatible
``libm`` and no longer ship with workarounds for missing acosh, asinh,
expm1, and log1p functions.

The changeset also removes ``_math.c`` and moves the last remaining
workaround into ``_math.h``. This simplifies static builds with
``Modules/Setup`` and resolves symbol conflicts.

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
Co-authored-by: Brett Cannon <brett@python.org>
Signed-off-by: Christian Heimes <christian@python.org>
2021-10-25 01:25:27 -07:00
Christian Heimes 9942f42a93
bpo-45522: Allow to disable freelists on build time (GH-29056)
Freelists for object structs can now be disabled. A new ``configure``
option ``--without-freelists`` can be used to disable all freelists
except empty tuple singleton. Internal Py*_MAXFREELIST macros can now
be defined as 0 without causing compiler warnings and segfaults.

Signed-off-by: Christian Heimes <christian@python.org>
2021-10-21 06:12:20 -07:00
Christian Heimes 81520fe677
bpo-45536: Check OpenSSL APIs in configure (GH-29088) 2021-10-20 17:18:34 +02:00
Victor Stinner 00ffc4513d
bpo-45440: Remove pymath.c fallbacks (GH-28977)
Remove fallbacks for missing round(), copysign() and hypot() in
Python/pymath.c. Python now requires these functions to build.

These fallbacks were needed on Visual Studio 2012 and older. They are
no longer needed since Visual Stuido 2013. Python is now built with
Visual Studio 2017 or newer since Python 3.6.
2021-10-15 19:45:34 +02:00
Victor Stinner 194a9526d8
bpo-45440: Require math.h isinf() to build (GH-28894)
Building Python now requires a C99 <math.h> header file providing
isinf(), isnan() and isfinite() functions.

Remove the Py_FORCE_DOUBLE() macro. It was used by the
Py_IS_INFINITY() macro.

Changes:

* Remove Py_IS_NAN(), Py_IS_INFINITY() and Py_IS_FINITE()
  in PC/pyconfig.h.
* Remove the _Py_force_double() function.
* configure no longer checks if math.h defines isinf(), isnan() and
  isfinite().
2021-10-13 23:27:50 +02:00
David Bohman 9c4766772c
bpo-45405: Prevent ``internal configure error`` when running ``configure`` with recent versions of non-Apple clang. (#28845)
Change the configure logic to function properly on macOS when the compiler
outputs a platform triplet for option --print-multiarch.

Co-authored-by: Ned Deily <nad@python.org>
2021-10-12 20:10:26 -04:00
Mike Gilbert be21706f37
bpo-45433: Do not link libpython against libcrypt (GH-28881)
Save/restore LIBS when calling AC_SEARCH_LIBS(..., crypt). This avoid
linking libpython with libcrypt.
2021-10-12 01:24:03 +02:00
Inada Naoki ad970e8623
bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Christian Heimes <christian@python.org>
2021-10-10 17:29:46 +09:00
Ned Deily 0af08f343a
bpo-45163: Restrict added libnetwork check to builds on Haiku. (GH-28729)
For example, without the guard the check could cause macOS
installer builds to fail to install on older supported macOS
releases where libnetwork is not available and is not needed
on any release.
2021-10-05 11:02:57 +01:00
Victor Stinner 1ee0f94d16
bpo-41710: PyThread_acquire_lock_timed() uses sem_clockwait() (GH-28662)
On Unix, if the sem_clockwait() function is available in the C
library (glibc 2.30 and newer), the threading.Lock.acquire() method
now uses the monotonic clock (time.CLOCK_MONOTONIC) for the timeout,
rather than using the system clock (time.CLOCK_REALTIME), to not be
affected by system clock changes.

configure now checks if the sem_clockwait() function is available.
2021-10-01 09:55:28 +02:00
Victor Stinner 7834ff26cb
bpo-21302: Add nanosleep() implementation for time.sleep() in Unix (GH-28545)
Co-authored-by: Livius <egyszeregy@freemail.hu>
2021-09-25 14:36:26 +02:00
Livius 85a4748118
bpo-21302: Add clock_nanosleep() implementation for time.sleep() (GH-28111)
In Unix operating systems, time.sleep() now uses the clock_nanosleep() function,
if available, which allows to sleep for an interval specified with nanosecond precision.

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-09-13 14:37:38 +02:00
David CARLIER 5f5b7d0c65
bpo-45163: Haiku build fix. (GH-28269)
linkage issues mainly for shared libs and missing system library,
also little nit into the signal extension as strsignal returns
a constant in this platform.
2021-09-11 11:46:22 +03:00
Łukasz Langa be9de8721d
bpo-34602: Quadruple stack size on macOS when compiling with UBSAN (GH-27309) 2021-09-03 09:32:19 +02:00
Dong-hee Na b2cf2513f9
bpo-44340: Add support for building with clang full/thin lto (GH-27231) 2021-07-19 19:52:56 +09:00
Binbin 17b16e13bb
Fix typos in multiple files (GH-26689)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-12 22:47:44 -04:00
Ned Deily 59acfd4a09
bpo-43109: Fix --with-lto configure option on macOS (GH-26341)
Allow --with-lto configure option to work with Apple-supplied Xcode or
Command Line Tools which do not provide llvm-ar.
2021-05-24 23:00:04 -04:00
Dong-hee Na a9e43615c2
Fix typo for configure.ac (GH-26305) 2021-05-22 08:40:59 +09:00
Pablo Galindo bb3e0c240b
Python 3.11.0a0 2021-05-03 21:25:35 +01:00
Ned Deily 8703178258
bpo-43568: Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 (GH-25827)
Only complain if the config target is >= 10.3 and the current target is
< 10.3. The check was originally added to ensure that incompatible
LDSHARED flags are not used, because -undefined dynamic_lookup is
used when building for 10.3 and later, and is not supported on older OS
versions. Apart from that, there should be no problem in general
with using an older target.

Authored-by: Joshua Root <jmr@macports.org>
2021-05-02 20:28:43 -04:00
Ned Deily 0cb33da1cc
bpo-44009: Provide "python3.x-intel64" for Apple Silicon Macs (GH-25804)
This allows reliably forcing macOS universal2 framework builds
to run under Rosetta 2 Intel-64 emulation on Apple Silicon Macs
if needed for testing or when universal2 wheels are not yet
available.
2021-05-02 04:48:29 -04:00
Christian Heimes e983252b51
bpo-43998: Default to TLS 1.2 and increase cipher suite security (GH-25778)
The ssl module now has more secure default settings. Ciphers without forward
secrecy or SHA-1 MAC are disabled by default. Security level 2 prohibits
weak RSA, DH, and ECC keys with less than 112 bits of security.
:class:`~ssl.SSLContext` defaults to minimum protocol version TLS 1.2.
Settings are based on Hynek Schlawack's research.

```
$ openssl version
OpenSSL 1.1.1k  FIPS 25 Mar 2021
$ openssl ciphers -v '@SECLEVEL=2:ECDH+AESGCM:ECDH+CHACHA20:ECDH+AES:DHE+AES:!aNULL:!eNULL:!aDSS:!SHA1:!AESCCM'
TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any      Au=any  Enc=CHACHA20/POLY1305(256) Mac=AEAD
TLS_AES_128_GCM_SHA256  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(128) Mac=AEAD
TLS_AES_128_CCM_SHA256  TLSv1.3 Kx=any      Au=any  Enc=AESCCM(128) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=CHACHA20/POLY1305(256) Mac=AEAD
ECDHE-RSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH     Au=RSA  Enc=CHACHA20/POLY1305(256) Mac=AEAD
ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AES(256)  Mac=SHA384
ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AES(128)  Mac=SHA256
ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(128)  Mac=SHA256
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH       Au=RSA  Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH       Au=RSA  Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES256-SHA256   TLSv1.2 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA256
DHE-RSA-AES128-SHA256   TLSv1.2 Kx=DH       Au=RSA  Enc=AES(128)  Mac=SHA256
```

Signed-off-by: Christian Heimes <christian@python.org>
2021-05-01 20:53:10 +02:00
Jakub Kulík 9032cf5cb1
bpo-43667: Fix broken Unicode encoding in non-UTF locales on Solaris (GH-25096) 2021-04-30 15:21:42 +02:00
Christian Heimes 39258d3595
bpo-43669: PEP 644: Require OpenSSL 1.1.1 or newer (GH-23014)
- Remove HAVE_X509_VERIFY_PARAM_SET1_HOST check
- Update hashopenssl to require OpenSSL 1.1.1
- multissltests only OpenSSL > 1.1.0
- ALPN is always supported
- SNI is always supported
- Remove deprecated NPN code. Python wrappers are no-op.
- ECDH is always supported
- Remove OPENSSL_VERSION_1_1 macro
- Remove locking callbacks
- Drop PY_OPENSSL_1_1_API macro
- Drop HAVE_SSL_CTX_CLEAR_OPTIONS macro
- SSL_CTRL_GET_MAX_PROTO_VERSION is always defined now
- security level is always available now
- get_num_tickets is available with TLS 1.3
- X509_V_ERR MISMATCH is always available now
- Always set SSL_MODE_RELEASE_BUFFERS
- X509_V_FLAG_TRUSTED_FIRST is always available
- get_ciphers is always supported
- SSL_CTX_set_keylog_callback is always available
- Update Modules/Setup with static link example
- Mention PEP in whatsnew
- Drop 1.0.2 and 1.1.0 from GHA tests
2021-04-17 11:36:35 +02:00
Jessica Clarke dec0757549
bpo-43179: Generalise alignment for optimised string routines (GH-24624)
* Remove m68k-specific hack from ascii_decode

On m68k, alignments of primitives is more relaxed, with 4-byte and
8-byte types only requiring 2-byte alignment, thus using sizeof(size_t)
does not work. Instead, use the portable alternative.

Note that this is a minimal fix that only relaxes the assertion and the
condition for when to use the optimised version remains overly strict.
Such issues will be fixed tree-wide in the next commit.

NB: In C11 we could use _Alignof(size_t) instead, but for compatibility
we use autoconf.

* Optimise string routines for architectures with non-natural alignment

C only requires that sizeof(x) is a multiple of alignof(x), not that the
two are equal. Thus anywhere where we optimise based on alignment we
should be using alignof(x) not sizeof(x).

This is more annoying than it would be in C11 where we could just use
_Alignof(x) (and alignof(x) in C++11), but since we still require only
C99 we must plumb the information all the way from autoconf through the
various typedefs and defines.
2021-03-31 12:12:39 +02:00
Christian Heimes 5d6e8c1c1a
bpo-43617: Check autoconf-archive package in configure.ac (GH-25016)
Signed-off-by: Christian Heimes <christian@python.org>
2021-03-27 14:44:04 +01:00
Victor Stinner 94faa0724f
bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933)
These functions were undocumented and excluded from the limited C
API.

Most names defined by these header files were not prefixed by "Py"
and so could create names conflicts. For example, Python-ast.h
defined a "Yield" macro which was conflict with the "Yield" name used
by the Windows <winbase.h> header.

Use the Python ast module instead.

* Move Include/asdl.h to Include/internal/pycore_asdl.h.
* Move Include/Python-ast.h to Include/internal/pycore_ast.h.
* Remove ast.h header file.
* pycore_symtable.h no longer includes Python-ast.h.
2021-03-23 20:47:40 +01:00
Christian Heimes 32eba61ea4
bpo-43466: Add --with-openssl-rpath configure option (GH-24820) 2021-03-19 10:29:25 +01:00
Ned Deily 0608425944
bpo-43103: Fix build failure with macOS framework builds. (GH-24676) 2021-03-01 02:04:02 -05:00
Manolis Stamatogiannakis d20279494a
bpo-42603: Use pkg-config to get TCL/TK paths for tkinter. (GH-23721) 2021-02-28 22:29:57 -05:00
Victor Stinner 801bb0b503
bpo-43103: Add configure --without-static-libpython (GH-24418)
Add a new configure --without-static-libpython option to not build
the libpythonMAJOR.MINOR.a static library and not install the
python.o object file.

Fix smelly.py and stable_abi.py tools when libpython3.10.a is
missing.
2021-02-17 11:14:42 +01:00
Roland Hieber e1f7769513
bpo-13501: allow choosing between readline and libedit (GH-24189)
In contrast to macOS, libedit is available as its own include file and
library on Linux systems to prevent file name clashes. So if both
libraries are available on the system, readline is currently chosen by
default; and if only libedit is available, it is not found at all. This
patch adds a way to link against libedit by adding the following
arguments to configure:

  --with-readline           link against libreadline (the default)
  --with-readline=editline  link against libeditline
  --with-readline=no        disable building the readline module
  --without-readline        (same)

The runtime detection of libedit vs. readline was already done in commit
7105319ada (2019-12-04, serge-sans-paille: "bpo-38634: Allow
non-apple build to cope with libedit (GH-16986)").

Fixes: GH-12076 ("bpo-13501 Build or disable readline with Editline")
Fixes: bpo-13501 ("Make libedit support more generic; port readline / libedit to FreeBSD")
Co-authored-by: Enji Cooper (ngie-eign)
Co-authored-by: Martin Panter (vadmium)
Co-authored-by: Robert Marshall (kellinm)
2021-02-08 17:05:25 -08:00
Victor Stinner 6790005a9a
bpo-43031: Set a timeout when running tests in PGO build (GH-24339)
Pass --timeout=$(TESTTIMEOUT) option to the default profile task
"./python -m test --pgo" command.
2021-01-27 11:16:15 +01:00
Victor Stinner 75e59a97f5
bpo-42856: Add --with-wheel-pkg-dir=PATH configure option (GH-24210)
Add --with-wheel-pkg-dir=PATH option to the ./configure script. If
specified, the ensurepip module looks for setuptools and pip wheel
packages in this directory: if both are present, these wheel packages
are used instead of ensurepip bundled wheel packages.

Some Linux distribution packaging policies recommend against bundling
dependencies. For example, Fedora installs wheel packages in the
/usr/share/python-wheels/ directory and don't install the
ensurepip._bundled package.

ensurepip: Remove unused runpy import.
2021-01-20 17:07:21 +01:00
Paul Ganssle 0f66498fd8
bpo-42874: Remove grep -qE options for Solaris 10 compatibility (GH-24200)
According to [bpo-42874](), some versions of grep do not support the `-q` and `-E` options. Although both options are used elsewhere in the configure script, this particular bit of validation can be achieved without them,
so there's no real harm in using a grep call with no flags.

Would be good to get some people taking advantage of the `--with-tzpath` arguments in the wild to try this out.. Local testing seems to indicate that this does the same thing, but I don't know that we have any buildbots using this option. Maybe @pablogsal?

[bpo-42874]():
2021-01-12 10:17:52 -08:00
pxinwr 277ce3060b
bpo-27640: Add --disable-test-modules configure option (GH-23886)
Added --disable-test-modules option to the configure script:
don't build nor install test modules.

Patch by Xavier de Gaye, Thomas Petazzoni and Peixing Xin.

Co-Authored-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com>
2020-12-30 13:50:39 +01:00
Victor Stinner 52a327c1cb
bpo-39465: Add pycore_atomic_funcs.h header (GH-20766)
Add pycore_atomic_funcs.h internal header file: similar to
pycore_atomic.h but don't require to declare variables as atomic.

Add _Py_atomic_size_get() and _Py_atomic_size_set() functions.
2020-12-23 03:41:08 +01:00
Matti Picus a44ce6c9f7
bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH-23708)
Now all platforms use a value for the "EXT_SUFFIX" build variable derived
from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so"
instead of ".so"). Previously only Linux, Mac and VxWorks were using a value
for "EXT_SUFFIX" that included "SOABI".

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2020-12-20 02:56:57 +00:00
pxinwr c117426bf8
bpo-31904: Enable libpython3.so shared library for VxWorks (GH-23741) 2020-12-14 23:14:43 +01:00
Joshua Root 674fa0a740
bpo-42598: Fix implicit function declarations in configure (GH-23690)
This is invalid in C99 and later and is an error with some compilers
(e.g. clang in Xcode 12), and can thus cause configure checks to
produce incorrect results.
2020-12-13 15:56:34 -05:00
Ronald Oussoren 0f20bd9042
bpo-38443: Check that the specified universal architectures work (GH-22910)
As [bpo-38443]() says the error message from configure when specifying --enable-universalsdk with a set of architectures that is not supported by the compiler is not very helpful.   This PR explicitly checks if the compiler works and bails out if it doesn't.
2020-11-21 17:13:11 -08:00
Pablo Galindo a57b3d30f6
bpo-41625: Expose the splice() system call in the os module (GH-21947) 2020-11-17 00:00:38 +00:00
Kevin Adler c79667ff79
bpo-42087: Remove support for AIX 5.3 and below (GH-22830)
As AIX 5.3 and below do not support thread_cputime, it was decided in
https://bugs.python.org/issue40680 to require AIX 6.1 and above. This
commit removes workarounds for — and references to — older, unsupported
AIX versions.
2020-11-16 16:16:10 +01:00
Christian Heimes cd9fed6afb
bpo-41001: Add os.eventfd() (#20930)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-11-13 19:48:52 +01:00
Ronald Oussoren 41761933c1
bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)
Co-authored-by:  Lawrence D’Anna <lawrence_danna@apple.com>

* Add support for macOS 11 and Apple Silicon (aka arm64)
   
  As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy

* Support building on recent versions of macOS while deploying to older versions

  This allows building installers on macOS 11 while still supporting macOS 10.9.
2020-11-08 10:05:27 +01:00
Alexey Izbyshev 976da903a7
bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe (GH-11671)
* bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe

When used to run a new executable image, fork() is not a good choice
for process creation, especially if the parent has a large working set:
fork() needs to copy page tables, which is slow, and may fail on systems
where overcommit is disabled, despite that the child is not going to
touch most of its address space.

Currently, subprocess is capable of using posix_spawn() instead, which
normally provides much better performance. However, posix_spawn() does not
support many of child setup operations exposed by subprocess.Popen().
Most notably, it's not possible to express `close_fds=True`, which
happens to be the default, via posix_spawn(). As a result, most users
can't benefit from faster process creation, at least not without
changing their code.

However, Linux provides vfork() system call, which creates a new process
without copying the address space of the parent, and which is actually
used by C libraries to efficiently implement posix_spawn(). Due to sharing
of the address space and even the stack with the parent, extreme care
is required to use vfork(). At least the following restrictions must hold:

* No signal handlers must execute in the child process. Otherwise, they
  might clobber memory shared with the parent, potentially confusing it.

* Any library function called after vfork() in the child must be
  async-signal-safe (as for fork()), but it must also not interact with any
  library state in a way that might break due to address space sharing
  and/or lack of any preparations performed by libraries on normal fork().
  POSIX.1 permits to call only execve() and _exit(), and later revisions
  remove vfork() specification entirely. In practice, however, almost all
  operations needed by subprocess.Popen() can be safely implemented on
  Linux.

* Due to sharing of the stack with the parent, the child must be careful
  not to clobber local variables that are alive across vfork() call.
  Compilers are normally aware of this and take extra care with vfork()
  (and setjmp(), which has a similar problem).

* In case the parent is privileged, special attention must be paid to vfork()
  use, because sharing an address space across different privilege domains
  is insecure[1].

This patch adds support for using vfork() instead of fork() on Linux
when it's possible to do safely given the above. In particular:

* vfork() is not used if credential switch is requested. The reverse case
  (simple subprocess.Popen() but another application thread switches
  credentials concurrently) is not possible for pure-Python apps because
  subprocess.Popen() and functions like os.setuid() are mutually excluded
  via GIL. We might also consider to add a way to opt-out of vfork() (and
  posix_spawn() on platforms where it might be implemented via vfork()) in
  a future PR.

* vfork() is not used if `preexec_fn != None`.

With this change, subprocess will still use posix_spawn() if possible, but
will fallback to vfork() on Linux in most cases, and, failing that,
to fork().

[1] https://ewontfix.com/7

Co-authored-by: Gregory P. Smith [Google LLC] <gps@google.com>
2020-10-23 17:47:01 -07:00
Petr Viktorin c6d7e82d19
bpo-38980: Only apply -fno-semantic-interposition if available (GH-22892) 2020-10-22 18:11:53 +02:00
Pablo Galindo b451b0e9a7
bpo-38980: Add -fno-semantic-interposition when building with optimizations (GH-22862) 2020-10-21 22:46:52 +01:00
Kevin Adler 1dd6d956a3
closes bpo-42030: Remove legacy AIX dynload support (GH-22717)
Since c19c5a6, AIX builds have defaulted to using dynload_shlib over
dynload_aix when dlopen is available. This function has been available
since AIX 4.3, which went out of support in 2003, the same year the
previously referenced commit was made. It has been nearly 20 years
since a version of AIX has been supported which has not used
dynload_shlib so there's no reason to keep this legacy code around.
2020-10-16 13:03:28 -05:00
Kyle Evans 1800c60080
bpo-40423: Optimization: use close_range(2) if available (GH-22651)
close_range(2) should be preferred at all times if it's available, otherwise we'll use closefrom(2) if available with a fallback to fdwalk(3) or plain old loop over fd range in order of most efficient to least.

[note that this version does check for ENOSYS, but currently ignores all other errors]

Automerge-Triggered-By: @pablogsal
2020-10-11 13:18:53 -07:00
Stefan Krah 84a7917b4c
bpo-41721: Add xlc options (GH-22096) 2020-09-04 22:33:17 +02:00
Stefan Krah e6dcd371b2
bpo-19521: Fix parallel build race condition on AIX (GH-21997)
Patch by Michael Haubenwallner.
2020-08-29 17:00:08 +02:00
wasiher 5798f78777
bpo-41340: Removed fallback implementation for strdup (GH-21634) 2020-07-27 12:28:45 +09:00
Ronald Oussoren 8ea6353f60
BPO-41100: Support macOS 11 when building (GH-21113) 2020-06-25 10:55:48 -04:00
Lysandros Nikolaou 314858e276
bpo-40939: Remove the old parser (Part 2) (GH-21005)
Remove some remaining files and Makefile targets for the old parser
2020-06-20 19:07:25 +01:00
Pablo Galindo 1ed83adb0e
bpo-40939: Remove the old parser (GH-20768)
This commit removes the old parser, the deprecated parser module, the old parser compatibility flags and environment variables and all associated support code and documentation.
2020-06-11 17:30:46 +01:00
Victor Stinner 51ae31e5b9
bpo-40684: Fix make install for platlibdir=lib64 (GH-20736)
"make install" now uses the PLATLIBDIR variable for the destination
lib-dynload/ directory when ./configure --with-platlibdir is used.

Update --with-platlibdir comment in configure.
2020-06-09 15:32:43 +02:00
Pablo Galindo d4fe098d1e
Python 3.10.0a0 (GH-20198) 2020-05-19 03:33:01 +01:00
Ned Deily 951ab58024
Revert "bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)" (GH-20182)
This reverts commit 0da5466650.

The commit is causing make failures on a FreeBSD buildbot.
Due to the imminent 3.9.0b1 cutoff, revert this commit for
now pending further investigation.
2020-05-18 11:31:21 -04:00
Ned Deily 0da5466650
bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)
Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc.

Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-05-18 09:17:22 -04:00
Paul Ganssle 62972d9d73
bpo-40503: PEP 615: Tests and implementation for zoneinfo (GH-19909)
This is the initial implementation of PEP 615, the zoneinfo module,
ported from the standalone reference implementation (see
https://www.python.org/dev/peps/pep-0615/#reference-implementation for a
link, which has a more detailed commit history).

This includes (hopefully) all functional elements described in the PEP,
but documentation is found in a separate PR. This includes:

1. A pure python implementation of the ZoneInfo class
2. A C accelerated implementation of the ZoneInfo class
3. Tests with 100% branch coverage for the Python code (though C code
   coverage is less than 100%).
4. A compile-time configuration option on Linux (though not on Windows)

Differences from the reference implementation:

- The module is arranged slightly differently: the accelerated module is
  `_zoneinfo` rather than `zoneinfo._czoneinfo`, which also necessitates
  some changes in the test support function. (Suggested by Victor
  Stinner and Steve Dower.)
- The tests are arranged slightly differently and do not include the
  property tests. The tests live at test/test_zoneinfo/test_zoneinfo.py
  rather than test/test_zoneinfo.py or test/test_zoneinfo/__init__.py
  because we may do some refactoring in the future that would likely
  require this separation anyway; we may:
        - include the property tests
        - automatically run all the tests against both pure Python and C,
          rather than manually constructing C and Python test classes (similar
          to the way this works with test_datetime.py, which generates C
          and Python test cases from datetimetester.py).
- This includes a compile-time configuration option on Linux (though not
  on Windows); added with much help from Thomas Wouters.
- Integration into the CPython build system is obviously different from
  building a standalone zoneinfo module wheel.
- This includes configuration to install the tzdata package as part of
  CI, though only on the coverage jobs. Introducing a PyPI dependency as
  part of the CI build was controversial, and this is seen as less of a
  major change, since the coverage jobs already depend on pip and PyPI.

Additional changes that were introduced as part of this PR, most / all of
which were backported to the reference implementation:

- Fixed reference and memory leaks

    With much debugging help from Pablo Galindo

- Added smoke tests ensuring that the C and Python modules are built

    The import machinery can be somewhat fragile, and the "seamlessly falls
    back to pure Python" nature of this module makes it so that a problem
    building the C extension or a failure to import the pure Python version
    might easily go unnoticed.

- Adjustments to zoneinfo.__dir__

    Suggested by Petr Viktorin.

- Slight refactorings as suggested by Steve Dower.

- Removed unnecessary if check on std_abbr

    Discovered this because of a missing line in branch coverage.
2020-05-16 10:20:06 +02:00
Christian Heimes 9b60e55db2
bpo-40637: Add option to disable builtin hashes (GH-20121)
Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: @tiran
2020-05-15 14:54:53 -07:00
Victor Stinner c5fa364f4e
bpo-40514: Add --with-experimental-isolated-subinterpreters (GH-19926)
Add --with-experimental-isolated-subinterpreters build option to
configure: better isolate subinterpreters, experimental build mode.

When used, force the usage of the libc malloc() memory allocator,
since pymalloc relies on the unique global interpreter lock (GIL).
2020-05-05 16:41:11 +02:00
karl ding 360371f79c
bpo-40291: Add support for CAN_J1939 sockets (GH-19538)
Add support for CAN_J1939 sockets that wrap SAE J1939 protocol
functionality provided by Linux 5.4+ kernels.
2020-04-29 15:31:19 -07:00
Pablo Galindo a25f3c4c8f
bpo-40334: Fix builds outside the source directory and regenerate autoconf files (GH-19667) 2020-04-23 01:38:11 +01:00
Zackery Spytz 97e0de04b8
bpo-25780: Expose CAN_RAW_JOIN_FILTERS in the socket module (GH-19190)
Co-Authored-By: Stefan Tatschner <stefan@rumpelsepp.org>
2020-04-09 13:03:49 +01:00
Petr Viktorin 3c97e1e457
bpo-39761: Fix dtrace build with empty $DFLAGS (GH-18766)
This fixes a regression introduced in bpo-38960.

When DFLAGS was empty, "$DFLAGS" results in an empty argument ("").
Without the quotes, an empty variable will be ignored by the shell.
2020-03-11 14:27:42 +01:00
Victor Stinner 8510f43078
bpo-1294959: Add sys.platlibdir attribute (GH-18381)
Add --with-platlibdir option to the configure script: name of the
platform-specific library directory, stored in the new sys.platlitdir
attribute. It is used to build the path of platform-specific dynamic
libraries and the path of the standard library.

It is equal to "lib" on most platforms. On Fedora and SuSE, it is
equal to "lib64" on 64-bit systems.

Co-Authored-By: Jan Matějek <jmatejek@suse.com>
Co-Authored-By: Matěj Cepl <mcepl@cepl.eu>
Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
2020-03-10 09:53:09 +01:00
Stefan Krah 815280eb16
bpo-39794: Add --without-decimal-contextvar (#18702) 2020-02-29 19:43:42 +01:00
Ian Norton a9edf44a2d
closes bpo-39619 Fix os.chroot on HP-UX 11.31 (GH-18495)
Setting `-D_XOPEN_SOURCE=700` on HP-UX causes system functions such as chroot to be undefined.  This change stops `_XOPEN_SOURCE` begin set on HP-UX

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-02-13 19:09:11 -08:00
David Carlier aabdeb766b bpo-38960: DTrace build fix for FreeBSD. (GH-17451)
DTrace build fix for FreeBSD.

- allowing passing an extra flag as it need to define the arch size.
- casting some probe's arguments.
2020-01-28 13:53:32 +01:00
Victor Stinner b8d1262e8a
bpo-39395: putenv() and unsetenv() always available (GH-18135)
The os.putenv() and os.unsetenv() functions are now always available.

On non-Windows platforms, Python now requires setenv() and unsetenv()
functions to build.

Remove putenv_dict from posixmodule.c: it's not longer needed.
2020-01-24 14:05:48 +01:00
Victor Stinner b477d19a6b
bpo-39406: Implement os.putenv() with setenv() if available (GH-18128)
If setenv() C function is available, os.putenv() is now implemented
with setenv() instead of putenv(), so Python doesn't have to handle
the environment variable memory.
2020-01-22 22:48:16 +01:00
Anthony Shaw 2de064e630 bpo-39160 Align the verbs, grammar and defaults for `./configure --help` (GH-17747) 2020-01-14 01:40:10 -05:00
Michael Felt 39afa2d314 bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303)
Provides a richer platform tag for AIX that we expect to be sufficient for PEP 425
binary distribution identification. Any backports to earlier Python versions will be
handled via setuptools.

Patch by Michael Felt.
2019-12-16 00:17:53 +10:00
Benjamin Peterson 5c0c325453 closes bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)
https://bugs.python.org/issue38713
2019-11-05 21:58:31 -08:00
Victor Stinner 028f7349a0
bpo-37415: Fix stdatomic.h header check for ICC compiler (GH-16717)
Fix stdatomic.h header check for ICC compiler: the ICC implementation
lacks atomic_uintptr_t type which is needed by Python.

Test:

* atomic_int and atomic_uintptr_t types
* atomic_load_explicit() and atomic_store_explicit()
* memory_order_relaxed and memory_order_seq_cst constants

But don't test ATOMIC_VAR_INIT(): it's not used in Python.
2019-10-22 21:53:50 +02:00
Vinay Sajip 0b60f64e43
bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347) 2019-10-15 08:26:12 +01:00
Jesús Cea 52d1b86bde
bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (#16446) 2019-09-28 03:44:32 +02:00
Doyle Rowland 0519d497b0 closes bpo-36002: Use AC_PATH_TOOL to find llvm-profdata and llvm-ar. (GH-14998) 2019-09-13 14:38:07 +01:00
Jakub Kulík e20134f889 bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224)
Use fdwalk() on platforms that support it to implement os.closerange().
2019-09-11 10:11:57 -05:00
Benjamin Peterson f1c19031fd bpo-38068: Clean up gettimeofday configure logic. (GH-15775)
Assume gettimeofday exists and takes two arguments.
2019-09-10 03:37:59 -07:00
Benjamin Peterson bed04b6647
bpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758) 2019-09-09 05:13:00 -07:00
Sergey Fedoseev 52c1a6a15a Remove leftovers from the times when long long wasn't required (GH-15501)
In a38e9d1399 pyconfig.h.in was
manually edited and that edit was overwritten when running autoreconf.
2019-08-26 16:12:47 +01:00
Ronald Oussoren 1a057bab0f
bpo-18049: Sync thread stack size to main thread size on macOS (GH-14748)
This changeset increases the default size of the stack
for threads on macOS to the size of the stack
of the main thread and reenables the relevant
recursion test.
2019-08-01 07:43:07 +02:00
Neil Schemenauer 4e16a4a311
bpo-36044: Reduce number of unit tests run for PGO build (GH-14702)
Reduce the number of unit tests run for the PGO generation task.  This
speeds up the task by a factor of about 15x.  Running the full unit test
suite is slow.  This change may result in a slightly less optimized build
since not as many code branches will be executed.  If you are willing to
wait for the much slower build, the old behavior can be restored using
'./configure [..] PROFILE_TASK="-m test --pgo-extended"'.  We make no
guarantees as to which PGO task set produces a faster build.  Users who
care should run their own relevant benchmarks as results can depend on
the environment, workload, and compiler tool chain.
2019-07-22 12:54:25 -07:00
Ned Deily 5bbbc733e6
bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)
Under some conditions the earlier fix for bpo-18075, "Infinite recursion
tests triggering a segfault on Mac OS X", now causes failures on macOS
when attempting to change stack limit with resource.setrlimit
resource.RLIMIT_STACK, like regrtest does when running the test suite.
The reverted change had specified a non-default stack size when linking
the python executable on macOS.  As of macOS 10.14.4, the previous
code causes a hard failure when running tests, although similar
failures had been seen under some conditions under some earlier
systems.  Reverting the change to the interpreter stack size at link
time helped for release builds but caused some tests to fail when
built --with-pydebug.  Try the opposite approach: continue to build
the interpreter with an increased stack size on macOS and remove
the failing setrlimit call in regrtest initialization.  This will
definitely avoid the resource.RLIMIT_STACK error and should have
no, or fewer, side effects.
2019-07-02 03:12:18 -04:00
Łukasz Langa 9ab2fb1c68
Bump to 3.9.0a0 2019-06-04 22:12:32 +02:00
Pablo Galindo aac4d0342c
bpo-26826: Expose copy_file_range in the os module (GH-7255) 2019-05-31 19:39:47 +01:00
Zackery Spytz 43fdbd2729 bpo-26836: Add os.memfd_create() (#13567)
* bpo-26836: Add os.memfd_create()

* Use the glibc wrapper for memfd_create()

Co-Authored-By: Christian Heimes <christian@python.org>

* Fix deletions caused by autoreconf.

* Use MFD_CLOEXEC as the default value for *flags*.

* Add memset_s to configure.ac.

* Revert memset_s changes.

* Apply the requested changes.

* Tweak the docs.
2019-05-29 21:57:03 +02:00
David Carlier d8b7551672 bpo-33164: blake2 fix for HP-UX (GH-13633) 2019-05-29 19:58:11 +09:00
Zackery Spytz 02db696732 bpo-32941: Add madvise() for mmap objects (GH-6172)
Allow mmap objects to access the madvise() system call.
2019-05-27 18:48:16 +02:00
E. M. Bray b1fc417841 bpo-21536: Fix configure.ac for LIBPYTHON on Android/Cygwin (GH-13552)
Add also missing AC_MSG_RESULT for AC_MSG_CHECKING(MACHDEP).
2019-05-24 18:39:38 +02:00
E. M. Bray c994c8fc19 bpo-21536: On Cygwin, C extensions must be linked with libpython (GH-13549)
It is also possible to link against a library or executable with a
statically linked libpython, but not both with the same DLL.  In fact
building a statically linked python is currently broken on Cygwin
for other (related) reasons.

The same problem applies to other POSIX-like layers over Windows
(MinGW, MSYS) but Python's build system does not seem to attempt
to support those platforms at the moment.
2019-05-24 17:33:47 +02:00
David Carlier 51aa35e9e1 bpo-33164: update blake2 implementation (GH-6286) 2019-05-23 13:32:44 +09:00
Victor Stinner 0a8e57248b
bpo-36721: Add --embed option to python-config (GH-13500)
To embed Python into an application, a new --embed option must be
passed to "python3-config --libs --embed" to get "-lpython3.8" (link
the application to libpython). To support both 3.8 and older, try
"python3-config --libs --embed" first and fallback to "python3-config
--libs" (without --embed) if the previous command fails.

Add a pkg-config "python-3.8-embed" module to embed Python into an
application: "pkg-config python-3.8-embed --libs" includes
"-lpython3.8".  To support both 3.8 and older, try "pkg-config
python-X.Y-embed --libs" first and fallback to "pkg-config python-X.Y
--libs" (without --embed) if the previous command fails (replace
"X.Y" with the Python version).

On the other hand, "pkg-config python3.8 --libs" no longer contains
"-lpython3.8". C extensions must not be linked to libpython (except
on Android, case handled by the script); this change is backward
incompatible on purpose.

"make install" now also installs "python-3.8-embed.pc".
2019-05-23 03:30:23 +02:00
pxinwr f2d7ac7e5b bpo-31904: Add posix module support for VxWorks (GH-12118) 2019-05-21 12:46:37 +02:00
Victor Stinner d97adfb409
bpo-36618: Don't add -fmax-type-align=8 flag for clang (GH-13320)
Python 3.8 now respects the x86-64 ABI: memory allocations are
aligned on 16 bytes. The clang flag was only used as a temporary
workaround.
2019-05-14 19:29:53 +02:00
Ned Deily 883dfc668f
bpo-34602: Avoid failures setting macOS stack resource limit (GH-13011)
Under some conditions the earlier fix for bpo-18075, "Infinite recursion
tests triggering a segfault on Mac OS X", now causes failures on macOS
when attempting to change stack limit with resource.setrlimit
resource.RLIMIT_STACK, like regrtest does when running the test suite.
The reverted change had specified a non-default stack size when linking
the python executable on macOS.  As of macOS 10.14.4, the previous
code causes a hard failure when running tests, although similar
failures had been seen under some conditions under some earlier
systems.  For now, revert the original change and resume using
the default stack size when linking the interpreter.
2019-04-29 15:07:39 -04:00
xdegaye 254b309c80 bpo-21536: On Android, C extensions are linked to libpython (GH-12989) 2019-04-29 09:27:40 +02:00
Victor Stinner 6d13e5b35b
bpo-36722: Don't define ALT_SOABI for Py_TRACE_REFS build (GH-12973)
Py_TRACE_REFS ABI is incompatible with release and debug (Py_DEBUG)
ABI.
2019-04-26 18:56:19 +02:00
Victor Stinner 5422e3cfb7
bpo-36722: Debug build loads libraries built in release mode (GH-12952)
In debug build, import now also looks for C extensions compiled in
release mode and for C extensions compiled in the stable ABI.
2019-04-26 01:40:00 +02:00
Victor Stinner f4e4703e74
bpo-36465: Make release and debug ABI compatible (GH-12615)
Release build and debug build are now ABI compatible: the Py_DEBUG
define no longer implies Py_TRACE_REFS define which introduces the
only ABI incompatibility.

A new "./configure --with-trace-refs" build option is now required to
get Py_TRACE_REFS define which adds sys.getobjects() function and
PYTHONDUMPREFS environment variable.

Changes:

* Add ./configure --with-trace-refs
* Py_DEBUG no longer implies Py_TRACE_REFS
2019-04-25 00:56:28 +02:00
Victor Stinner 6c44fde3e0
bpo-36707: Remove the "m" flag (pymalloc) from SOABI (GH-12931)
"./configure --with-pymalloc" no longer adds the "m" flag to SOABI
(sys.implementation.cache_tag).

Enabling or disabling pymalloc has no impact on the ABI.
2019-04-24 16:10:09 +02:00
Victor Stinner a304b136ad
bpo-36618: Don't add -fmax-type-align flag to old clang (GH-12811) 2019-04-13 00:51:07 +02:00
Victor Stinner 23a683adf8
bpo-36618: Add -fmax-type-align=8 flag for clang (GH-12809)
Add -fmax-type-align=8 to CFLAGS when clang compiler is detected.

The pymalloc memory allocator aligns memory on 8 bytes. On x86-64,
clang expects alignment on 16 bytes by default and so uses MOVAPS
instruction which can lead to segmentation fault. Instruct clang that
Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
instead: slower but don't trigger a SIGSEGV if the memory is not
aligned on 16 bytes.

Sadly, the flag must be expected to CFLAGS and not just
CFLAGS_NODIST, since third party C extensions can have the same
issue.
2019-04-12 21:27:37 +02:00
Michael Felt 9d949f7796 bpo-36588: On AIX, remove major version from sys.platform (GH-12787)
On AIX, sys.platform doesn't contain the major version anymore.
Always return 'aix', instead of 'aix3' .. 'aix7'.  Since
older Python versions include the version number, it is recommended to
always use sys.platform.startswith('aix').
2019-04-12 16:15:32 +02:00
Victor Stinner 21a74a9d77
bpo-36605: make tags: parse Modules/_io directory (GH-12789)
"make tags" and "make TAGS" now also parse Modules/_io/*.c
and Modules/_io/*.h.
2019-04-11 22:28:12 +02:00
pxinwr 32f5fdd7f4 bpo-31904: Add cross-build support for VxWorks RTOS (GH-11968) 2019-02-27 12:09:28 +01:00
ngie-eign 90c6facebd closes bpo-13497: Fix `broken nice` configure test. (GH-12041)
Per POSIX, `nice(3)` requires `unistd.h` and `exit(3)` requires `stdlib.h`.

Fixing the test will prevent false positives with pedantic compilers like clang.
2019-02-25 21:34:24 -08:00
Inada Naoki 001fee14e0
bpo-12822: use monotonic clock for condvar if possible (GH-11723) 2019-02-20 10:00:09 +09:00
Neil Schemenauer 5741c45acf
bpo-35903: Use autoconfig to probe for shm_open() and shm_unlink(). (#11765)
Use autoconfig to probe for shm_open() and shm_unlink().  Set SHM_NEEDS_LIBRT if we must
link with librt to get the shm_* functions.  Change setup.py to use the autoconfig defines.  These
changes should make it more likely that _multiprocessing/posixshmem.c gets built correctly on
different platforms.
2019-02-08 10:48:46 -08:00
Jakub Kulík 5c8f537669 bpo-35520: Fix build with dtrace support on certain systems. (#11194) 2019-01-24 18:29:48 +01:00
Joannah Nanjekye 92b8322e7e bpo-35674: Add os.posix_spawnp() (GH-11554)
Add a new os.posix_spawnp() function.
2019-01-16 14:29:26 +01:00
Gregory P. Smith 387512c7ec
bpo-28503: Use crypt_r() when available instead of crypt() (GH-11373)
Use crypt_r() when available instead of crypt() in the crypt module.

As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer.
2018-12-30 15:42:32 -08:00
stratakis cf10a750f4 bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900)
When compiling 3rd party C extensions, the linker flags used by the
compiler for the interpreter and the stdlib modules, will get
leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS
and PY_LDFLAGS_NODIST are introduced to keep those flags separated.
2018-12-19 18:19:01 +01:00
stratakis f92c7aa1ae bpo-35351: Pass link time optimization flags to CFLAGS_NODIST (GH-10797)
When using link time optimizations, the -flto flag is passed to
BASECFLAGS, which makes it propagate to distutils. Those flags
should be reserved for the interpreter and the stdlib extension
modules only, thus moving those flags to CFLAGS_NODIST.
2018-12-04 15:54:01 +01:00
Gregory P. Smith 1584a00815
bpo-35214: Initial clang MemorySanitizer support (GH-10479)
Adds configure flags for msan and ubsan builds to make it easier to enable.
These also encode the detail that address sanitizer and memory sanitizer
should disable pymalloc.

Define MEMORY_SANITIZER when appropriate at build time and adds workarounds
to existing code to mark things as initialized where the sanitizer is otherwise unable to
determine that.  This lets our build succeed under the memory sanitizer.  not all tests
pass without sanitizer failures yet but we're in pretty good shape after this.
2018-11-12 12:07:14 -08:00
serge-sans-paille 5ad36f9b21 bpo-28015: Support LTO build with clang (GH-9908)
.o generated by clang in LTO mode actually are LLVM bitcode files, which
leads to a few errors during configure/build step:

- add lto flags to the BASECFLAGS instead of CFLAGS, as CFLAGS are used
  to build autoconf test case, and some are not compatible with clang LTO
  (they assume binary in the .o, not bitcode)
- force llvm-ar instead of ar, as ar is not aware of .o files generated
  by clang -flto
2018-10-25 01:54:22 +02:00
Benjamin Peterson 65ed12cb7c
closes bpo-34869: Remove LDLAST. (GH-9667) 2018-10-03 19:23:24 -07:00
Bjorn Andersson bb8165172a bpo-31425: Expose AF_QIPCRTR in socket module (GH-3706)
The AF_QIPCRTR address family was introduced in Linux v4.7.

Co-authored-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-09-26 16:47:52 +03:00
Ross Burton 2a9c3805dd closes bpo-34585: Don't do runtime test to get float byte order. (GH-9085)
Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly.

Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary.

RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
2018-09-18 23:25:48 -07:00
Eitan Adler 24f6846920 bpo-33486: regen autotools files using autoupdate+autoreconf (GH-6853) 2018-09-14 15:55:20 -07:00
Benjamin Peterson a4414ef20b
Don't run AC_STRUCT_TIMEZONE twice. (GH-9305) 2018-09-14 08:58:57 -07:00
Benjamin Peterson ea13740a37
bpo-34674: Assume unistd.h exists on Unix. (GH-9290) 2018-09-13 21:57:31 -07:00
Benjamin Peterson ed709d5699
bpo-34652: Remove lchmod from the big func checking block. (GH-9247)
A fix for 883702ebb8.
2018-09-12 17:22:11 -07:00
Benjamin Peterson 40caa05fa4
closes bpo-34652: Always disable lchmod on Linux. (GH-9234) 2018-09-12 15:52:40 -07:00
Benjamin Peterson 865c17fb28
closes bpo-34640: Remove the TANH_PRESERVES_ZERO_SIGN configure check. (GH-9206) 2018-09-12 06:51:18 -07:00
Benjamin Peterson 50c99d917c Remove configure check LOG1P_DROPS_ZERO_SIGN. (GH-9193)
It is unused.

<!--
Thanks for your contribution!
Please read this comment in its entirety. It's quite important.

# Pull Request title

It should be in the following format:

```
bpo-NNNN: Summary of the changes made
```

Where: bpo-NNNN refers to the issue number in the https://bugs.python.org.

Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue.

# Backport Pull Request title

If this is a backport PR (PR made against branches other than `master`),
please ensure that the PR title is in the following format:

```
[X.Y] <title from the original PR> (GH-NNNN)
```

Where: [X.Y] is the branch name, e.g. [3.6].

GH-NNNN refers to the PR number from `master`.

-->
2018-09-11 16:30:04 -07:00
William Grzybowski 23e65b2555 bpo-33625: Release GIL for grp.getgr{nam,gid} and pwd.getpw{nam,uid} (GH-7081)
Release GIL on grp.getgrnam(), grp.getgrgid(), pwd.getpwnam() and
pwd.getpwuid() if reentrant variants of these functions are available.

Patch by William Grzybowski.
2018-09-07 14:06:15 +02:00
Michael Osipov 3738fadc67 bpo-34448: Improve output of usable wchar_t check (GH-8846) 2018-08-24 19:17:19 +03:00
Michael Osipov 48ce4897f8 bpo-34412: Make signal.strsignal() work on HP-UX (GH-8786)
Introduce a configure check for strsignal(3) which defines HAVE_STRSIGNAL for
signalmodule.c. Add some common signals on HP-UX. This change applies for
Windows and HP-UX.
2018-08-23 16:27:19 +03:00
Xiang Zhang 4c8555773a
bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) 2018-08-20 22:36:19 +08:00
Antoine Pitrou 961d54c5c1
bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229)
bpo-32430: Rename Modules/Setup.dist to Modules/Setup

Remove the necessity to copy the former manually to the latter when updating the local source tree.
2018-07-16 19:03:03 +02:00
Benjamin Peterson 15c7b2abdf
bpo-34121: Fix detection of C11 atomic support on clang. (GH-8288) 2018-07-15 17:01:42 -07:00
Eitan Adler b91a3a0d61 bpo-33648: Remove PY_WARN_ON_C_LOCALE (GH-7114)
This code does not appear to be used anywhere in the python code base.
The use was removed in eb81795d7d.
2018-07-11 20:01:27 +09:00
Victor Stinner 06fe77a84b
bpo-30345: Add -g to LDFLAGS for LTO (GH-7709)
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
2018-06-19 18:24:58 +02:00
Ned Deily ced0adb263
bpo-32493: Correct test for uuid_enc_be availability in configure.ac. (GH-7511) (GH-7567) 2018-06-09 18:19:57 -04:00
INADA Naoki e336484847
bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395) 2018-06-05 20:40:53 +09:00
Eitan Adler b5c246f833 Docs: fix some wrong words (GH-6987)
Fix typos in code comments: bdb.py and configure.ac.
2018-06-02 07:16:19 -07:00
Serhiy Storchaka 17d8830312 bpo-32493: Fix uuid.uuid1() on FreeBSD. (GH-7099)
Use uuid_enc_be() if available to encode UUID to bytes as big endian.
2018-05-25 00:45:09 +02:00
Eitan Adler 3055c947f9 closes bpo-33512: use standard for detecting long double (GH-6847) 2018-05-15 22:58:09 -07:00
Eitan Adler 98929b545e bpo-33483: more correctly handle finding the C compiler (GH-6780)
Instead of passing configure args such as --without-gcc or --with-icc,
instead prefer to rely on the native way of finding the compiler:
passing CC (or CPP or CXX depending).

This allows configure to find the correct compiler instead of having to
be explicitly told. It also more correctly builds on both macOS and
FreeBSD since the system compiler is used by default (cc)
2018-05-14 20:55:41 -07:00
Antoine Pitrou 9d3627e311
bpo-33332: Add signal.valid_signals() (GH-6581) 2018-05-04 13:00:50 +02:00
Matthias Klose ddbe976964
bpo-33377: add triplets for mips-r6 and riscv (#6655)
* issue33377: add triplets for mips-r6 and riscv

* issue33377: add triplets for mips-r6 and riscv (NEWS entry)
2018-04-30 19:22:16 +02:00
Ned Deily 5489bdad51 Start of 3.8.0a0 2018-01-31 17:44:09 -05:00
Ned Deily 8c9bb72e8b
bpo-32726: macOS installer and framework enhancements and changes for 3.7.0 (GH-5448)
This issue covers various changes for the macOS installers provided via python.org for 3.7.0.

- Provide a provisional new installer variant for macOS 10.9 and later systems with 64-bit (x86_64) architecture only.  Apple has made it known that future versions of macOS will only fully support 64-bit executables and some other third-party software suppliers have chosen 10.9 as their oldest supported system.
 
- Support **Tcl/Tk 8.6** with the 10.9 installer variant.
 
- Upgrade **OpenSSL** to 1.1.0g and **SQLite** to 3.22.0.
 
- The compiler name used for the interpreter build and for modules built with **Distutils / pip** is now _gcc_ rather than _gcc-4.2_. And extension module builds will no longer try to force use of an old SDK if present.
2018-01-30 07:42:14 -05:00
Christian Heimes 892d66e422
bpo-31429: Define TLS cipher suite on build time (#3532)
Until now Python used a hard coded white list of default TLS cipher
suites. The old approach has multiple downsides. OpenSSL's default
selection was completely overruled. Python did neither benefit from new
cipher suites (ChaCha20, TLS 1.3 suites) nor blacklisted cipher suites.
For example we used to re-enable 3DES.

Python now defaults to OpenSSL DEFAULT cipher suite selection and black
lists all unwanted ciphers. Downstream vendors can override the default
cipher list with --with-ssl-default-suites.

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-29 14:10:18 +01:00
Pablo Galindo 6c6ddf97c4 bpo-20104: Expose `posix_spawn` in the os module (GH-5109)
Add os.posix_spawn to wrap the low level POSIX API of the same name.

Contributed by Pablo Galindo.
2018-01-28 17:56:10 -08:00
Pablo Galindo 4defba3b95 bpo-31368: Expose preadv and pwritev in the os module (#5239) 2018-01-27 17:16:37 +01:00
stratakis e768c86ef4 bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (#5284)
glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.
2018-01-23 16:11:24 +01:00
Victor Stinner 13ff24582c
bpo-32593: Drop FreeBSD 9 and older support (#5232)
Drop support of FreeBSD 9 and older.
2018-01-22 18:32:50 +01:00
Christian Heimes ff5be6e810
bpo-32598: Use autoconf to detect usable OpenSSL (#5242)
Add https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
to auto-detect compiler flags, linker flags and libraries to compile
OpenSSL extensions. The M4 macro uses pkg-config and falls back to
manual detection.

Add autoconf magic to detect usable X509_VERIFY_PARAM_set1_host()
and related functions.

Refactor setup.py to use new config vars to compile _ssl and _hashlib
modules.

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-20 13:19:21 +01:00
David Carlier b4ebaa7099 bpo-32493: Not only AIX, but FreeBSD has uuid_create support (#5089)
Allow building the _uuid extension module on FreeBSD and OpenBSD.
2018-01-09 20:38:07 +01:00
Nathaniel J. Smith 735ae8d139 bpo-29137: Remove fpectl module (#4789)
This module has never been enabled by default, never worked correctly
on x86-64, and caused ABI problems that caused C extension
compatibility. See bpo-29137 for details/discussion.
2018-01-05 23:15:34 -08:00
Michael Felt 0d3ccb4395 bpo-32399: Starting with AIX6.1 there is support in libc.a for uuid (RFC4122) (#4974)
Starting with AIX6.1 there is support in libc.a for uuid (RFC4122)
This patch provides the changes needed for this integration with the OS.

On AIX the base function is uuid_create() rather than uuid_generate_time()
The AIX uuid_t typedef is more aligned to the UUID field based definition
while the Linux typedef that is more aligned with UUID bytes
(or perhaps UUID bytes_le) definitions.
2017-12-30 22:39:20 +01:00
Benjamin Peterson 62ed6be8da
remove the dynload_next.c file (closes bpo-32386) (#4957) 2017-12-21 21:43:09 -08:00
Michael Felt c5ae169e1b bpo-26439 Fix ctypes.util.find_library failure on AIX (#4507)
Implement find_library() support in ctypes/util for AIX.

Add some AIX specific tests.
2017-12-19 13:58:49 +01:00
Rob Boehne 9d25bd11ca Modify configure to link with the compiler driver under HP-UX when not using gcc. (#2519) 2017-12-06 09:58:17 -08:00
xdegaye 5ce1069a6f
bpo-28762: Revert last commit (now using Android Unified Headers) (GH-4488) 2017-11-23 12:01:36 +01:00
xdegaye c06c22e9a9
bpo-29040: Support building Android with Unified Headers (GH-4492) 2017-11-23 11:44:38 +01:00
xdegaye 5ad7ef8e42
bpo-28538: Revert all the changes (now using Android Unified Headers) (GH-4479) 2017-11-23 11:13:22 +01:00
Serhiy Storchaka 9e78dc2517
Move comments in configure.ac to more appropriate place. (#4371) 2017-11-11 19:18:28 +02:00
Berker Peksag 0e163d2ced
bpo-11063: Use more reliable way to check if uuid function exists (GH-4343) 2017-11-09 00:43:14 +03:00
Berker Peksag 9a10ff4deb
bpo-11063: Add a configure check for uuid_generate_time_safe (GH-4287) 2017-11-08 23:09:16 +03:00
Berker Peksag 7e666eed36
Remove outdated with_threads checks in configure.ac (GH-4294) 2017-11-06 19:06:05 +03:00
Serhiy Storchaka 894ebd065e
bpo-31919: Fix building the curses module on OpenIndiana. (#4211) 2017-11-01 14:34:20 +02:00
Masayuki Yamamoto 8bc7d63560 bpo-25720: Fix the method for checking pad state of curses WINDOW (#4164)
Modify the code to use ncurses is_pad() instead of checking WINDOW
_flags field.  If your platform does not provide the is_pad(), the
existing way that checks the field will be enabled.

Note: This change does not drop support for platforms where do not
have both WINDOW _flags field and is_pad().
2017-11-01 14:05:26 +02:00
Serhiy Storchaka baac01e629
bpo-31891: Fix building the curses module on NetBSD. (#4165) 2017-10-31 13:56:44 +02:00
Benjamin Peterson 24c4d046c4 drop unused configure check for pthread_atfork (#4046) 2017-10-18 23:39:01 -07:00
Ned Deily 14aa00b519 Allow configure to handle PATH elements with spaces (#3935) 2017-10-09 13:53:27 -04:00
Masayuki Yamamoto 731e189014 bpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API (GH-1362)
See PEP 539 for details.

Highlights of changes:

- Add Thread Specific Storage (TSS) API
- Document the Thread Local Storage (TLS) API as deprecated
- Update code that used TLS API to use TSS API
2017-10-06 20:41:34 +10:00
pdox e14679c784 closes bpo-31596: Add an interface for pthread_getcpuclockid(3) (#3756) 2017-10-05 00:01:56 -07:00
Benjamin Peterson d15108a478 stop using ranlib (closes bpo-31625) (#3815)
Instead, simply pass 's' to ar.
2017-09-29 08:42:41 -07:00
Benjamin Peterson 288d1daada remove support for BSD/OS (closes bpo-31624) (#3812) 2017-09-28 22:44:27 -07:00
Benjamin Peterson b1d1c422cc remove configure check for memmove (#3716)
Python requires C implementations provide memmove, so we shouldn't need to check for it. The only place using this configure check was expat, where we can simply always define HAVE_MEMMOVE.
2017-09-24 12:08:40 -07:00
octaviansoldea 4c81401b3a bpo-31354: Let configure --with-lto work on all builds
Allow configure --with-lto to apply to all builds, not just profile-opt builds.

Whether this is actually useful or not must be determined by the person
building CPython using their own toolchain.

My own quick test on x86_64 Debian 9 (gcc 6.3, binutils 2.28) seemed
to suggest that it wasn't, but I expect better toolchains can or will exist
at some point.  The point is to allow it at all.
2017-09-08 12:14:33 -07:00
Antoine Pitrou a6a4dc816d bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
caavery effc12f8e9 bpo-27584: New addition of vSockets to the python socket module (#2489)
* bpo-27584: New addition of vSockets to the python socket module

Support for AF_VSOCK on Linux only

* bpo-27584: Fixes for V2

Fixed syntax and naming problems.
Fixed #ifdef AF_VSOCK checking
Restored original aclocal.m4

* bpo-27584: Fixes for V3

Added checking for fcntl and thread modules.

* bpo-27584: Fixes for V4

Fixed white space error

* bpo-27584: Fixes for V5

Added back comma in (CID, port).

* bpo-27584: Fixes for V6

Added news file.
socket.rst now reflects first Linux introduction of AF_VSOCK.
Fixed get_cid in test_socket.py.
Replaced PyLong_FromLong with PyLong_FromUnsignedLong in socketmodule.c
Got rid of extra AF_VSOCK #define.
Added sockaddr_vm to sock_addr.

* bpo-27584: Fixes for V7

Minor cleanup.

* bpo-27584: Fixes for V8

Put back #undef AF_VSOCK as it is  necessary when vm_sockets.h is not installed.
2017-09-06 15:18:10 -07:00
Christian Heimes 75b961869a bpo-31343: Include sys/sysmacros.h (#3318)
Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray
plans to remove the functions from sys/types.h.

Signed-off-by: Christian Heimes <christian@python.org>
2017-09-05 15:53:09 +02:00
Benjamin Peterson 069306312a remove IRIX support (closes bpo-31341) (#3310)
See PEP 11.
2017-09-04 16:36:05 -07:00
Benjamin Peterson 14ce158e3d remove configure.ac support for SGI_ABI (#3294) 2017-09-04 14:05:32 -07:00
Benjamin Peterson 5ce1063345 remove check for bug last seem in Solaris 9 (#3285) 2017-09-04 10:52:51 -07:00
Benjamin Peterson a2344851ab remove autoconf check for select() (#3283)
We never actually check HAVE_SELECT.
2017-09-04 10:21:42 -07:00
Benjamin Peterson fc96f1e95e remove configure check for 'volatile' (#3281)
This is a required feature is C99, which we require.
2017-09-04 10:09:12 -07:00
Antoine Pitrou f474c5a3f3 bpo-30946: Remove obsolete fallback code in readline module (#2738)
* Remove obsolete fallback code in readline module

* Add NEWS

* Remove obsolete include

* Fix macro on Windows
2017-07-18 17:05:03 +02:00
INADA Naoki 6b42eb1764 bpo-29585: Fix sysconfig.get_config_var("PYTHONFRAMEWORK") (GH-2483)
`PYTHONFRAMEWORK` is defined in `Makefile` and it shoulnd't be used
in `pyconfig.h`.

`sysconfig.py --generate-posix-vars` reads config vars from Makefile
and `pyconfig.h`.  Conflicting variables should be avoided.

Especially, string config variables in Makefile are unquoted, but
in `pyconfig.h` are keep quoted.  So it should be private (starts with
underscore).
2017-06-29 15:31:38 +09:00
INADA Naoki a8f8d5b4bd bpo-29585: optimize site.py startup time (GH-136)
Avoid importing `sysconfig` from `site` by copying minimum code.
Python startup is 5% faster on Linux and 30% faster on macOS
2017-06-29 00:31:53 +09:00
Nick Coghlan 6ea4186de3 bpo-28180: Implementation for PEP 538 (#659)
- new PYTHONCOERCECLOCALE config setting
- coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
- always uses C.UTF-8 on Android
- uses `surrogateescape` on stdin and stdout in the coercion
  target locales
- configure option to disable locale coercion at build time
- configure option to disable C locale warning at build time
2017-06-11 13:16:15 +10:00
Brett Cannon b4e5fee6f5 Clarify what --enable-optimizations does (GH-1847) 2017-06-09 13:56:57 -07:00
T. Wouters ddbfa2c35b Add --with-assertions configure flag to enable C assertions(#1731)
Defaults to 'no', but as before assertions are implied by --with-pydebug.
2017-05-23 01:30:49 +02:00
Victor Stinner a5c62a8e9f bpo-23404: make touch becomes make regen-all (#1405)
Don't rebuild generated files based on file modification time
anymore, the action is now explicit. Replace "make touch"
with "make regen-all".

Changes:

* Remove "make touch", Tools/hg/hgtouch.py and .hgtouch
* Add a new "make regen-all" command to rebuild all generated files
* Add subcommands to only generate specific files:

  - regen-ast: Include/Python-ast.h and Python/Python-ast.c
  - regen-grammar: Include/graminit.h and Python/graminit.c
  - regen-importlib: Python/importlib_external.h and Python/importlib.h
  - regen-opcode: Include/opcode.h
  - regen-opcode-targets: Python/opcode_targets.h
  - regen-typeslots: Objects/typeslots.inc

* Rename PYTHON_FOR_GEN to PYTHON_FOR_REGEN
* pgen is now only built by by "make regen-grammar"
* Add $(srcdir)/ prefix to paths to source files to handle correctly
  compilation outside the source directory

Note: $(PYTHON_FOR_REGEN) is no more used nor needed by "make"
default target building Python.
2017-05-03 18:21:48 +02:00
Victor Stinner 5facdbb291 bpo-30232: Support Git worktree in configure.ac (#1391)
Don't test if .git/HEAD file exists, but only if the .git file (or
directory) exists.
2017-05-02 21:42:48 +02:00
Victor Stinner 826f83f1d5 bpo-30104: Only use -fno-strict-aliasing on dtoa.c (#1340)
On clang, only compile dtoa.c with -fno-strict-aliasing, use strict
aliasing to compile all other C files.
2017-04-28 15:07:10 +02:00
Victor Stinner 35f3d240ee bpo-30104: configure now detects when cc is clang (#1233)
Detect when the "cc" compiler (and the $CC variable) is the Clang
compiler. The test is needed to add the -fno-strict-aliasing option
on FreeBSD where cc is clang.
2017-04-21 12:35:24 +02:00
Victor Stinner 28205b203a bpo-30104: Use -fno-strict-aliasing on clang (#1221)
Python/dtoa.c is not compiled correctly with clang 4.0 and
optimization level -O2 or higher, because of an aliasing issue on
the double/ULong[2] union.

LLVM bug report:
https://bugs.llvm.org//show_bug.cgi?id=31928
2017-04-21 11:24:34 +02:00
Benjamin Peterson 791dc83119 remove configure test for inline keyword (#1231)
We require C99, so a configure test for this standard feature is not needed.
2017-04-20 23:52:19 -07:00
Benjamin Peterson e4f961be09 improve alignment autoconf test (#1129)
Replace the deprecated AC_TRY_RUN with AC_RUN_IFELSE. Also, standardize the
variable name and allow for caching of the result.
2017-04-14 09:36:45 -07:00
Alex Wang 8cea5929f5 bpo-29643: Fix check for --enable-optimizations (GH-129)
The presence of the ``--enable-optimizations`` flag is indicated by the
value of ``$enableval``, but the configure script was checking ``$withval``,
resulting in the ``--enable-optimizations`` flag being effectively ignored.
2017-03-28 21:50:51 +09:00
Alex Dzyoba 8a543c0bc7 `make tags` fixes (GH-717)
* Fix `make tags` warnings

`make tags` target tries to find C sources and headers in "Grammar" and
"Mac" folders and generates these warnings:

    ctags: Warning: cannot open source file "Grammar/*.[ch]" : No such file or directory
    ctags: Warning: cannot open source file "Mac/*.[ch]" : No such file or directory

This commit changes $SRCDIRS variable in configure.ac to remote these
directories. This variable is used only for tags generation.

Also, "configure" was regenerated with `autoreconf`.

* Fix `make tags` fail on non-default tag names

When ctags overrides default tags filename (e.g. `-f .tags`) `make tags`
is failed because it assumes to see default `tags` filename:

    sort: cannot read: tags: No such file or directory

This commit explicitly specifies "tags" filename for tags generation.
2017-03-24 17:23:43 +09:00
Ned Deily 554626ada7 bpo-27593: Revise git SCM build info. (#744)
Use --short form of git hash.  Use output from "git describe" for tag.

Expected outputs:
1. previous hg
2. previous git
3. updated git

Release (tagged) build:
1. Python 3.7.0a0 (v3.7.0a0:4def2a2901a5, ...
2. Python 3.7.0a0 (v3.7.0a0^0:05f53735c8912f8df1077e897f052571e13c3496, ...
3. Python 3.7.0a0 (v3.7.0a0:05f53735c8, ...

Development build:
1. Python 3.7.0a0 (default:41df79263a11, ...
2. Python 3.7.0a0 (master:05f53735c8912f8df1077e897f052571e13c3496, ...
3. Python 3.7.0a0 (heads/master-dirty:05f53735c8, ...

"dirty" means the working tree has uncommitted changes.
See "git help describe" for more info.
2017-03-20 23:41:52 -04:00
Ned Deily 5c4b0d063a bpo-27593: Get SCM build info from git instead of hg. (#446)
sys.version and the platform module python_build(),
python_branch(), and python_revision() functions now use
git information rather than hg when building from a repo.

Based on original patches by Brett Cannon and Steve Dower.
2017-03-04 00:19:55 -05:00
Victor Stinner 193ee0a0e8 Prohibit implicit C function declarations
Issue #27659: use -Werror=implicit-function-declaration when possible (GCC and
Clang, but it depends on the compiler version).

Patch written by Chi Hsuan Yen.
2017-02-06 14:24:00 +01:00
Xavier de Gaye 9971220e41 Issue #26851: Merge 3.6. 2017-01-04 21:53:53 +01:00
Xavier de Gaye 2a352b667b Issue #26851: Set Android compilation and link flags. 2017-01-04 21:51:16 +01:00
Xavier de Gaye 507cbb0c0c Issue #28762: Merge 3.6. 2016-12-22 10:40:44 +01:00
Xavier de Gaye bdf0d0f039 Issue #28762: lockf() is available on Android API level 24, but the
F_LOCK macro is not defined in android-ndk-r13.
2016-12-22 10:38:59 +01:00
Xavier de Gaye a1cb689602 Issue #28538: Merge 3.6. 2016-12-21 17:30:50 +01:00
Xavier de Gaye 40e320b31e Issue #28538: On Darwin net/if.h requires that sys/socket.h be included beforehand. 2016-12-21 17:29:59 +01:00
Xavier de Gaye 3bfa1ed74d Issue #28538: Merge 3.6. 2016-12-21 12:48:26 +01:00
Xavier de Gaye 708784255e 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.
2016-12-21 12:46:36 +01:00
Benjamin Peterson 38f225dd48 merge 3.6 (#28932) 2016-12-19 23:55:24 -08:00
Benjamin Peterson b0eb986eb2 merge 3.5 (#28932) 2016-12-19 23:54:57 -08:00
Benjamin Peterson fb2ae15c67 add a specific configure check for sys/random.h (closes #28932) 2016-12-19 23:54:25 -08:00
Xavier de Gaye f191a9e8e4 Issue #28190: Merge 3.6. 2016-12-13 16:05:15 +01:00
Xavier de Gaye e13c3201fb Issue #28190: Cross compiling the _curses module does not use anymore
/usr/include/ncursesw as a headers search path.
2016-12-13 16:04:14 +01:00
Xavier de Gaye 5ca2b10213 Issue #28849: Merge 3.6. 2016-12-10 17:34:46 +01:00
Xavier de Gaye 32cf1acda8 Issue #28849: Do not define sys.implementation._multiarch on Android. 2016-12-10 17:31:28 +01:00
Martin Panter a57890e5ec Issue #10656: Merge AIX build fix from 3.6 2016-11-20 22:16:46 +00:00
Martin Panter e45df0a6da Issue #10656: Merge AIX build fix from 3.5 2016-11-20 22:06:44 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) fe914c034f Rename the new --with-optimiations flag to --enable-optimizations. 2016-11-20 21:17:01 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 164eea5443 Rename the new --with-optimiations flag to --enable-optimizations. 2016-11-20 21:13:16 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 1016b2ff00 Rename the new --with-optimiations flag to --enable-optimizations. 2016-11-20 21:07:42 +00:00
Martin Panter 395733d46b Issue #10656: Fix out-of-tree building on AIX
The ld_so_aix script and python.exp file are created in the build directory.
Patch by Tristan Carel and Michael Haubenwallner.
2016-11-20 07:56:37 +00:00
Brett Cannon 1d8f755e67 Issue #28605: Fix the help and What's New entry for --with-optimizations. 2016-11-03 16:20:00 -07:00
Brett Cannon d4ef9d3feb Merge for issue #28605 2016-11-03 16:21:11 -07:00
Zachary Ware e999e96143 Issue #21085: Fix accidental leading +'s in configure.ac 2016-10-01 01:06:51 -05:00
Zachary Ware 6a6967e827 Issue #21085: add configure check for siginfo_t.si_band
Patch by Masayuki Yamamoto, reviewed and rebased by Erik Bray.

This is a first step on the long road toward resupporting Cygwin, which does
not provide siginfo_t.si_band.
2016-10-01 00:47:27 -05:00
Christian Heimes ae0fa7ee6c Write configure message to AS_MESSAGE_FD 2016-09-24 12:34:31 +02:00
Christian Heimes 938da643ee Write configure message to AS_MESSAGE_FD 2016-09-24 12:34:25 +02:00
Benjamin Peterson 637d1e2b0a merge 3.6 2016-09-20 20:39:44 -07:00
Benjamin Peterson 0c21214f3e replace usage of Py_VA_COPY with the (C99) standard va_copy 2016-09-20 20:39:33 -07:00
Zachary Ware f40d4ddff3 Closes #27979: Remove bundled copy of libffi
An installed copy of libffi is now required for building _ctypes on
any platform but OSX and Windows.
2016-09-17 01:25:24 -05:00
Benjamin Peterson 40465ebc27 merge 3.6 (#28081) 2016-09-13 22:55:19 -07:00
Benjamin Peterson 37098cd584 more granular configure checks for clock_* functions (closes #28081) 2016-09-13 22:55:09 -07:00
Ned Deily 4829bc6619 Bump to 3.7.0a0 2016-09-12 17:29:04 -04:00
Martin Panter 11a86ffe5e Issue #28066: Merge srcdir fix from 3.5 2016-09-12 01:51:44 +00:00
Martin Panter c5ee3caa80 Issue #28066: Fix include search directory logic for out-of-tree builds 2016-09-12 01:32:03 +00:00
Xavier de Gaye 92dec548ff Issue #28046: get_sysconfigdata_name() uses the _PYTHON_SYSCONFIGDATA_NAME
environment variable that is defined when cross-compiling.
2016-09-11 22:22:24 +02:00
Serhiy Storchaka ea80ffb851 Issue #23545: Turn on extra warnings on GCC. 2016-09-11 21:56:32 +03:00
Benjamin Peterson 050af5d89a Backed out changeset 8460a729e1de 2016-09-10 17:53:13 -07:00
Benjamin Peterson cc1ea5dedc force gcc to use c99 inline semantics 2016-09-10 17:45:33 -07:00
Zachary Ware c4b53afce4 Issue #28046: Remove platform-specific directories from sys.path 2016-09-09 17:59:49 -07:00
Łukasz Langa a785c87d6e 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.
2016-09-09 17:37:37 -07:00
Zachary Ware 935043d1ac 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.
2016-09-09 17:01:21 -07:00
Benjamin Peterson 4fd64b9a6a remove ceval timestamp support 2016-09-09 14:57:58 -07:00
Benjamin Peterson 7d895ac953 remove --with(out)-signal-module, since the signal module is non-optional 2016-09-09 12:01:10 -07:00
Benjamin Peterson a845a81e42 remove unused osx10.5 sdk check 2016-09-09 11:37:58 -07:00
Benjamin Peterson 93b2dee80e compile with -std=c99 instead of -std=gnu99; use kiddie-gloves with bluetooth/bluetooh.h (#28017) 2016-09-09 10:22:45 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) ba7224f934 issue28032: never imply --with-lto as part of --with-optimizations.
Too many build tool chains do not properly support it, including building
and linking an executable fine that simply segfaults when you try to run
it (such as debian jessie 8.5's gcc 4.9).  On others where it does appear
to build (ubuntu 16.04's gcc 5.4) there are still test_distutils and test_gdb
failures to deal with.

We're not going to spend time attempting to maintain a complicated white list
of what does and doesn't work in our configure.ac file.
2016-09-08 22:42:45 +00:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 14c7f71150 issue28032: never imply --with-lto as part of --with-optimizations.
Too many build tool chains do not properly support it, including building
and linking an executable fine that simply segfaults when you try to run
it (such as debian jessie 8.5's gcc 4.9).  On others where it does appear
to build (ubuntu 16.04's gcc 5.4) there are still test_distutils and test_gdb
failures to deal with.

We're not going to spend time attempting to maintain a complicated white list
of what does and doesn't work in our configure.ac file.
2016-09-08 22:38:46 +00:00
Martin Panter 0be894b2f6 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
Gregory P. Smith 799520c91e Fixes issue# 27983: Cause lack of llvm-profdata tool when using clang -
required for PGO linking - to be a configure time error rather than
make time when --with-optimizations is enabled.  Also improve our
ability to find the llvm-profdata tool on MacOS and some Linuxes.
2016-09-07 16:10:00 -07:00
Brett Cannon 8c94f97465 Issue #26359: Add the --with-optimizations flag. 2016-09-06 17:15:21 -07:00
Benjamin Peterson 01c340da23 do not leak addrinfo in configure test 2016-09-06 15:54:24 -07:00
Benjamin Peterson 47ff0734b8 more PY_LONG_LONG to long long 2016-09-08 09:15:54 -07:00
Christian Heimes 7f9eb6eda3 Issue 28017: Use -std=gnu99 to get C99 with GNU extensions for bluetooth.h on big endian. 2016-09-08 11:39:42 +02:00
Gregory P. Smith f3b5bcafcb Fixes Issue #27983: Cause lack of llvm-profdata tool when using clang as
required for PGO linking to be a configure time error rather than
make time when --with-optimizations is enabled.  Also improve our
ability to find the llvm-profdata tool on MacOS and some Linuxes.
2016-09-07 16:11:08 -07:00
Benjamin Peterson d170256585 put -std=c99 in CFLAGS_NODIST 2016-09-07 12:00:06 -07:00
Benjamin Peterson 7490577f6a compile with -std=c99 2016-09-07 11:53:55 -07:00
Benjamin Peterson 0d67ed54f7 permit intermingled declarations 2016-09-07 11:43:22 -07:00
Benjamin Peterson a9296e7f3b require C99 bool 2016-09-07 11:06:17 -07:00
Brett Cannon 63d98bcd4c 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.
2016-09-06 17:12:40 -07:00
Benjamin Peterson 0cf223873e merge 3.5 2016-09-06 15:54:38 -07:00
Ned Deily 8482ce4868 Issue #21122: Fix LTO builds on OS X.
Patch by Brett Cannon.
2016-09-06 15:09:20 -07:00
Benjamin Peterson df6ff7bcca add back SIZEOF_UINTPTR_T 2016-09-06 13:53:14 -07:00
Benjamin Peterson b9d9eeda2a require uintptr_t to exist 2016-09-06 13:33:56 -07:00
Benjamin Peterson 4fe55106d1 require standard int types to be defined (#17884) 2016-09-06 11:58:01 -07:00
Benjamin Peterson ed4aa83ff7 require a long long data type (closes #27961) 2016-09-05 17:44:18 -07:00
Christian Heimes dffa3949c7 Issue #27744: Add AF_ALG (Linux Kernel crypto) to socket module. 2016-09-05 23:54:41 +02:00
doko@ubuntu.com 5c38cb2316 - Issue #27917: Set platform triplets for Android builds. 2016-09-01 22:05:20 +02:00
Raymond Hettinger 15f44ab043 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-08-30 10:47:49 -07:00
doko@ubuntu.com 75b1cb10b5 - Issue #23968, keep platform_triplet and multiarch macros in sync 2016-08-29 20:03:25 +02:00
Martin Panter 8c3c52b19f Issue #25825: Merge $(LIBPL) fix from 3.5 2016-08-27 04:07:54 +00:00
Martin Panter 5de141f157 Issue #25825: Fix references to $(LIBPL) installation path on AIX
In Subversion r86731, the path was changed from $(BINLIBDEST)/config to
$(LIBDEST)/config-$(LDVERSION).
2016-08-27 04:00:19 +00:00
Benjamin Peterson 5a44fa1430 merge 3.5 (#27670) 2016-08-03 22:02:42 -07:00
Benjamin Peterson c2fcbf4ed0 https link to the bug tracker (closes #27670) 2016-08-03 22:01:32 -07:00
Martin Panter 0c859f362c Issue #27641: Merge cross-compiling improvement from 3.5 2016-08-04 01:53:40 +00:00
Xavier de Gaye 6074f217db (merge from 3.5) Issue #27453: CPP invocation in configure must use CPPFLAGS.
Patch by Chi Hsuan Yen.
2016-07-30 11:36:32 +02:00
Xavier de Gaye 3a32bdfaa7 Issue #27453: CPP invocation in configure must use CPPFLAGS.
Patch by Chi Hsuan Yen.
2016-07-30 11:28:35 +02:00
Martin Panter 43a94a7e2f Issue #27641: Comment out regeneration rules when cross compiling 2016-07-29 05:52:32 +00:00
Martin Panter 4b53359090 Issue #27490: Merge pgen cross-compile logic from 3.5 2016-07-28 01:30:06 +00:00
Martin Panter eac67be948 Issue #27490: Do not build pgen when cross-compiling
The dependendency on the $(PGEN) variable must only be
set when not cross-compiling. When cross-compiling,
$(PGEN) will not be used, so no need to build it.

Patch by Thomas Perl.
2016-07-28 01:28:27 +00:00
Xavier de Gaye 8d4989687c (merge from 3.5) Issue #26662: Set PYTHON_FOR_GEN in configure
as the Python program to be used for file generation during the build.
2016-07-26 12:55:20 +02:00
Xavier de Gaye fd0d5939bd Issue #26662: Set PYTHON_FOR_GEN in configure
as the Python program to be used for file generation during the build.
2016-07-26 12:48:08 +02:00
Xavier de Gaye 95750b1ca5 Issue #27442: Expose the Android API level in sysconfig.get_config_vars()
as 'ANDROID_API_LEVEL'.
2016-07-09 11:05:42 +02:00
Xavier de Gaye 4afd143d3e Issue #27434: Version of interpreter running a cross-build and source version must be the same. 2016-07-07 18:00:22 +02:00
Benjamin Peterson 50600a78cb merge 3.5 (#24557) 2016-07-06 23:58:16 -07:00
Benjamin Peterson b8a2f51ceb assume egd unless OPENSSL_NO_EGD is defined—remove configure check (closes #24557) 2016-07-06 23:55:15 -07:00
doko@ubuntu.com 006a56ceda - Don't use largefile support for GNU/Hurd. 2016-06-14 10:15:25 +02:00
doko@ubuntu.com 5553231b91 - 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.
2016-06-14 08:55:19 +02:00
Victor Stinner 9ff9cbd600 Merge 3.5 (os.urandom) 2016-06-07 11:25:43 +02:00
Victor Stinner dddf4849ec os.urandom() doesn't block on Linux anymore
Issue #26839: On Linux, os.urandom() now calls getrandom() with GRND_NONBLOCK
to fall back on reading /dev/urandom if the urandom entropy pool is not
initialized yet. Patch written by Colm Buckley.
2016-06-07 11:21:42 +02:00
Martin Panter 3e04d5b306 Issue #27076: Merge spelling from 3.5 2016-05-26 06:03:19 +00:00
Martin Panter 46f50726a0 Issue #27076: Doc, comment and tests spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Serhiy Storchaka c2f7d87897 Issue #26932: Fixed support of RTLD_* constants defined as enum values,
not via macros (in particular on Android).  Patch by Chi Hsuan Yen.
2016-05-04 09:44:44 +03:00
Stefan Krah 267b639a26 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.
2016-04-26 01:09:18 +02:00
Martin Panter da28494d0a Issue #22359: Merge cross-compilation fix from 3.5 2016-04-23 01:18:54 +00:00
Martin Panter 1046d5c653 Issue #22359: Disable running cross-compiled _freeze_importlib and pgen
Patch by Xavier de Gaye.
2016-04-23 00:58:44 +00:00
Gregory P. Smith 79a12a2aa5 Issue #25702: A --with-lto configure option has been added that will
enable link time optimizations at build time during a make profile-opt.
2016-04-15 16:58:51 -07:00
Gregory P. Smith d82da9f7f2 Issue #25702: A --with-lto configure option has been added that will
enable link time optimizations at build time during a make profile-opt.
2016-04-15 16:57:04 -07:00
Victor Stinner 7258176c68 Merge 3.5 (os.urandom) 2016-04-12 22:38:22 +02:00
Victor Stinner 1b80b24007 configure: fix HAVE_GETRANDOM_SYSCALL check
syscall() function requires #include <unistd.h>.
2016-04-12 22:34:58 +02:00
Martin Panter a3506005b3 Issue #23735: Merge Readline resize handling from 3.5 2016-04-03 03:19:27 +00:00
Martin Panter 5dbbf1abba Issue #23735: Add SIGWINCH handler for Readline 6.3+ support, by Eric Price 2016-04-03 02:54:58 +00:00
Martin Panter 499d3654a8 Issue #17603: Merge configure.ac fix from 3.5 2016-03-18 03:03:10 +00:00
Martin Panter d887d1f365 Issue #17603: Check for st_blocks field without requiring fileblocks.o 2016-03-18 02:36:41 +00:00
Ned Deily 686905fe13 Issue #24324: merge from 3.5 2016-03-08 00:40:12 -05:00
Ned Deily bec699e40d 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.
2016-03-08 00:28:37 -05:00
Zachary Ware 266514ae93 Issue #25827: Merge with 3.5 2015-12-21 14:17:12 -06:00
Zachary Ware 5af856404a Issue #25827: Add support for ICC to configure 2015-12-21 12:09:17 -06:00
Victor Stinner bae2d6203f 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.
2015-10-01 09:47:30 +02:00
Brett Cannon 36df60fe75 Merge for issue #24915 2015-09-18 15:17:37 -07:00
Brett Cannon 7188a3efe0 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.
2015-09-18 15:13:44 -07:00
Victor Stinner 3abf44e48f 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.
2015-09-18 15:38:37 +02:00
Stefan Krah 0c8ccff325 Merge from 3.5 (#24543). 2015-07-02 20:28:45 +02:00
Stefan Krah e31db2a821 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).
2015-07-02 20:27:56 +02:00
Yury Selivanov 7aa5341164 Reverting my previous commit.
Something went horribly wrong when I was doing `hg rebase`.
2015-05-30 10:57:56 -04:00
Benjamin Peterson a8c22a0c32 update configure version to 3.6 2015-05-27 23:29:00 -05:00
doko@ubuntu.com 4ccc1514d0 - merge 3.4 2015-05-06 01:13:31 +02:00
doko@ubuntu.com e8042e5e98 - Issue #24122, fix quoting for LIBPL 2015-05-06 01:13:02 +02:00
doko@ubuntu.com 5cc9c4fdf7 - #22980: fix triplet configure test for more targets 2015-04-19 14:44:05 +02:00
Ned Deily 3b8124884c 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.
2015-04-15 17:11:47 -07:00
doko@ubuntu.com 9abe04975a #22980: fix triplet configure test for powerpc-linux-gnu 2015-04-15 23:31:02 +02:00
doko@ubuntu.com 092f616a97 - configure.ac: remove duplicate PLATDIR definition 2015-04-15 20:45:33 +02:00
doko@ubuntu.com d3899c1a96 - 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.
2015-04-15 20:23:14 +02:00
Larry Hastings a6cc551502 Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES.
Patch courtesy of Joe Jevnik.
2015-04-13 17:48:40 -04:00
doko@ubuntu.com 4b761bf79a - merge 3.4 2015-04-13 22:00:30 +02:00
doko@ubuntu.com 1345d20193 - Use PLATDIR for the platform directory everywhere (refactoring only) 2015-04-13 21:59:57 +02:00
Victor Stinner 7cc28b6238 Issue #23817: FreeBSD now uses "1.0" the the SOVERSION as other operating
systems, instead of just "1".
2015-04-09 22:29:52 +02:00
Victor Stinner 9eb57c5fa5 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().
2015-03-19 22:21:49 +01:00
Antoine Pitrou 5bd7bf5bab 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.
2015-03-08 20:43:10 +01:00
Victor Stinner 35a97c0bed Issue #22524: Fix os.scandir() for platforms which don't have a d_type field in
the dirent structure (ex: OpenIndiana).
2015-03-08 02:59:09 +01:00
Antoine Pitrou 8b62bbf2e5 Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster. 2015-02-11 19:41:01 +01:00
Antoine Pitrou 3d6c784371 Issue #23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster. 2015-02-11 19:39:16 +01:00