Commit Graph

823 Commits

Author SHA1 Message Date
Hood Chatham 544b001b23
gh-126691: Remove --with-emscripten-target (#126787)
This unifies the code for nodejs and the code for the browser. After this
commit, the browser example doesn't work; this will be fixed in a
subsequent update.
2024-11-16 09:44:05 +08:00
Hood Chatham 142104ce78
gh-89640: Pull in update to float word order detection in autoconf-archive (#126747) 2024-11-13 21:57:33 +01:00
Hood Chatham 403410fa1b
gh-89640: Restore configure error message on failure to detect float word order (#126569)
Before #126387, if we didn't detect float word order we'd raise the following
configure error:

    Unknown float word ordering. You need to manually preset
    ax_cv_c_float_words_bigendian=no (or yes) according to your system.

This puts it back (except for ARM or WASM, which as hardcoded).
2024-11-08 11:57:17 +00:00
Brett Cannon bbe9b21d06
GH-123877: default to `wasm32-wasip1` instead of `wasm32-wasi` to be more specific (GH-126552)
Eventually wasm32-wasi will represent WASI 1.0, and so it's currently deprecated so it can be used for that eventual purpose. wasm32-wasip1 is also more specific to what version of WASI is currently supported.

---------

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-11-07 13:40:56 -08:00
Erlend E. Aasland a5b94d0660
gh-96398: Improve accuracy of compiler checks in configure.ac (#117815)
The following variables are now used in compiler checks:
- $ac_cv_gcc_compat is set to 'yes' for GCC compatible compilers
  (the C preprocessor defines the __GNUC__ macro)
- for compiler basename checks, use $CC_BASENAME
  (may contain platform triplets)
- for the rest, use $ac_cv_cc_name
  (does not contain platform triplets)
2024-11-07 10:49:58 +01:00
Brett Cannon 2a6b6b33df
GH-126458: disable SIMD for HACL under WASI (#126512)
Requires an extra `-msimd128` flag and the `*mmintrin.h` header files are exclusive to x86-family CPUs.
2024-11-06 14:33:46 -08:00
Erlend E. Aasland 532fc08102
gh-89640: Hardcode WASM float word ordering as little endian (#126387) 2024-11-04 21:48:09 +01:00
Bénédikt Tran 38a604fd90
gh-99108: Cleanup references to inexisting `Modules/_blake2`. (GH-126270)
* Remove references to `Modules/_blake2`.

* Remove `Modules/_blake2` entry from CODEOWNERS

The folder does not exist anymore.

* Remove `Modules/_blake2` entry from `Tools/c-analyzer/TODO`
2024-11-01 16:18:44 +00:00
Hood Chatham b3122aa613
gh-126178: NFC Separate Emscripten and WASI standard lib disables in configure (#126179)
Separate the Emscripten and WASI stdlib configuration in configure.
2024-10-31 08:51:11 +08:00
Jakub Kulík 1064141967
gh-91962: Fix `hstrerror` detection issues on Solaris (GH-91963) 2024-10-30 13:19:44 +01:00
Sergey B Kirpichev dcad8fecbd
gh-125206: Correct detection of complex numbers support in libffi (#126104) 2024-10-30 10:12:39 +01:00
Hood Chatham b1f13bce62
gh-124932: Distinguish build prefix from host prefix in cross builds (#124933)
In Emscripten and other cross builds, the build file system and the host file
system look different. For instance, we may want to install into
`cross-build/$TARGET/lib`, and then mount that as `/lib` in the host file
system. This change adds a distinction between:

* `prefix` -- the path in the build file system where we want to install the files
* `host_prefix` -- the path in the host file system where getpath.c will look for the files

And similarly for `exec_prefix` and `host_exec_prefix`. At present, this is only
used for Emscripten.
2024-10-30 05:45:49 +08:00
Hood Chatham dc2552d429
gh-124928: Emscripten node support: Clean up old node <= 16 flags (#124929)
Clean up configure flags for old node versions

These flags are only needed for node <= 16. Node 16 has been end of life since
October of 2023.
2024-10-29 06:28:54 +00:00
Erlend E. Aasland 8b7cdc5e0c
gh-125698: Autoconf: Sync EXEEXT and ac_exeext (#125995) 2024-10-26 17:11:42 +02:00
Erlend E. Aasland b3c6b2c9e1
gh-125698: Restore EXEEXT in configure and Make (#125758)
This reverts commit e924bb667.
2024-10-20 23:08:01 +02:00
Erlend E. Aasland e924bb667a
gh-125698: Replace EXEEXT with EXE_SUFFIX (#125699) 2024-10-20 03:10:17 +02:00
Vincent Fazio aecbc2e6f4
gh-115382: Fix cross compiles when host and target use same SOABI
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-10-16 23:01:42 +01:00
Mikhail Efimov aac89b54c5
gh-125206: Bug in ctypes with old libffi is fixed (#125322)
Workaround for old libffi versions is added.
Module ctypes now supports C11 double complex only with libffi >= 3.3.0.

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-10-15 16:17:10 +00:00
Sam Gross 8d42e2d915
gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (#125416)
We previously used `AC_RUN_IF_ELSE` with a short test program to detect
if `-latomic` is needed, but that requires choosing a specific default
value when cross-compiling because the test program is not run.
Some cross compilation targets like `wasm32-emscripten` do not support
`-latomic`, while other cross compilation targets, like
`arm-linux-gnueabi` require it.
2024-10-14 20:09:48 -04:00
Steven Jin 1bffd7a2a7
gh-124944: Add socket.SO_ORIGINAL_DST (#124945) 2024-10-15 00:36:38 +02:00
Donghee Na ad7c778546
gh-123990: Good bye WITH_FREELISTS macro (gh-124358) 2024-09-24 01:28:59 +00:00
Malcolm Smith 41e7992e31
gh-99108: Disable HACL SIMD code on older versions of Android (#124304)
Disable HACL SIMD code on older versions of Android
2024-09-23 13:28:03 -07:00
Furkan Onder 2e8c769481
gh-124228: Fix UUID test in configure files for NetBSD (#124229)
Fix UUID configuration in configure files for NetBSD compatibility.
2024-09-23 08:54:36 +02:00
Nate Ohlson 29a1a6e3ed
gh-124191: Disable -Wconversion in enable safety (gh-124192) 2024-09-18 12:55:09 +09:00
Peter Bierma 3b45df03a4
gh-124043: Disallow mixing `--with-trace-refs` and `--disable-gil` (#124078)
Tracing references is not currently thread-safe in the free-threaded build.
2024-09-16 16:03:16 -04:00
Nate Ohlson 44052b5f18
gh-124064: Make warning emitting compiler options opt-in (#124070)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-09-16 20:22:30 +03:00
Russell Keith-Magee ef530ce7c6
gh-123748: Add conditional compilation rules for HACL SIMD256 and SIMD128 on macOS (#123989)
Add conditional compilation rules to allow HACL SIMD256 and SIMD128 to be ignored on the ARM64 pass of universal2 macOS builds.
2024-09-16 12:23:05 +08:00
Hugo van Kemenade ea77973718
Revert "gh-112301: Enable warning emitting options and ignore warnings in CI (#123020)" (#124065) 2024-09-13 22:47:12 +03:00
Nate Ohlson cfe6074d1f
gh-112301: Enable warning emitting options and ignore warnings in CI (#123020)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-09-13 13:40:04 +00:00
algonell 9017b95ff2
Fix typos (#123775) 2024-09-09 14:58:26 +02:00
Russell Keith-Magee d359c7c47b
Ensure clang++ is autodetected on iOS. (gh-123749) 2024-09-05 21:36:01 -04:00
Furkan Onder 42f52431e9
gh-123716: Fix 'Bad substitution' syntax error in configure script for NetBSD compatibility (#123717) 2024-09-05 23:49:12 +00:00
blhsing 126910edba
gh-122272: Guarantee specifiers %F and %C for datetime.strftime to be 0-padded (GH-122436) 2024-08-23 18:45:03 +03:00
Malcolm Smith 3950392f48
gh-99108: Inform HACL when explicit_bzero is unavailable (GH-123027)
Inform HACL whether explicit_bzero is available
2024-08-15 11:43:34 +02:00
Jonathan Protzenko 325e9b8ef4
gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316)
This replaces the existing hashlib Blake2 module with a single implementation that uses HACL\*'s Blake2b/Blake2s implementations. We added support for all the modes exposed by the Python API, including tree hashing, leaf nodes, and so on. We ported and merged all of these changes upstream in HACL\*, added test vectors based on Python's existing implementation, and exposed everything needed for hashlib.

This was joint work done with @R1kM.

See the PR for much discussion and benchmarking details.   TL;DR: On many systems, 8-50% faster (!) than `libb2`, on some systems it appeared 10-20% slower than `libb2`.
2024-08-13 21:42:19 +00:00
Malcolm Smith 2f5c3b09e4
gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (#122764)
(LIBPYTHON was renamed MODULE_LDFLAGS in commit 7f5e3f04f.)
2024-08-09 00:00:55 +02:00
Jonathan Protzenko b5e142ba7c
gh-122571: Remove duplicate definition of PY_BUILTIN_HASHLIB_HASHES in configure.ac (#122572)
The redefinition in confdefs.h can cause issues with the
AX_CHECK_COMPILE_FLAG macro.
2024-08-06 23:31:39 +00:00
Donghee Na 046670c3a0
gh-121996: Fix --disable-safety and --enable-slower-safety options (gh-122414) 2024-07-29 19:20:36 +00:00
Nate Ohlson ca0f7c447c
gh-112301: Make fortify source option check -Werror (gh-122141) 2024-07-25 17:35:23 +09:00
Donghee Na a9bb3c7b3b
gh-121996: Introduce --disable-safety and --enable-slower-safety options (#122054)
* gh-121996: Introduce --disable-safty and --enable-slower-safty

* Update GA

* fix

* Address code review

* Update CI
2024-07-23 09:22:04 +09:00
Russell Keith-Magee 728432c804
gh-120522: Apply App Store compliance patch during installation (#121947)
Adds a --with-app-store-compliance configuration option that patches out code known to be an issue with App Store review processes. This option is applied automatically on iOS, and optionally on macOS.
2024-07-22 07:36:08 +08:00
Nate Ohlson bdab67e1c7
gh-112301: Add fortify source level 3 to default compiler options (gh-121520) 2024-07-19 01:06:51 +09:00
Ned Deily f27593a87c
gh-120522: Revert "Add a `--with-app-store-compliance` configure option to patch out problematic code" (gh-120984) (#121844)
This reverts commit 48cd104b0c prior
to the release of 3.13.0b4 to allow for additional review time.
2024-07-16 06:49:36 -04:00
Russell Keith-Magee 7e91e0dcfe
gh-120831: Increase the default minimum supported iOS version to 13.0 (#121250)
Increases the default minimum iOS version to 13.0.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-07-16 12:23:35 +08:00
Sam Gross e8c91d90ba
gh-121103: Put free-threaded libraries in `lib/python3.14t` (#121293)
On POSIX systems, excluding macOS framework installs, the lib directory
for the free-threaded build now includes a "t" suffix to avoid conflicts
with a co-located default build installation.
2024-07-11 16:21:37 -04:00
Irit Katriel 6557af6698
gh-121554: remove unnecessary internal functions in compile.c (#121555)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-07-10 23:48:37 +01:00
Stefano Rivera ca2e876500
gh-121201: Disable perf_trampoline on riscv64 for now (#121328)
Disable perf_trampoline on riscv64 for now

Until support is added in perf_jit_trampoline.c

gh-120089 was incomplete.
2024-07-03 15:44:34 +01:00
Sergey B Kirpichev 6988ff02a5
gh-61103: Support double complex (_Complex) type in ctypes (#120894)
Example:

```pycon
>>> import ctypes
>>> ctypes.__STDC_IEC_559_COMPLEX__
1
>>> libm = ctypes.CDLL('libm.so.6')
>>> libm.clog.argtypes = [ctypes.c_double_complex]
>>> libm.clog.restype = ctypes.c_double_complex
>>> libm.clog(1+1j)
(0.34657359027997264+0.7853981633974483j)
```

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-01 10:54:33 +02:00
Erlend E. Aasland f80376b129
gh-113565: Improve and harden detection of curses dependencies (#119816)
1. Use pkg-config to check for ncursesw/panelw. If that fails, use 
   pkg-config to check for ncurses/panel.
2. Regardless of pkg-config output, search for curses/panel headers, so
   we're sure we have all defines in pyconfig.h.
3. Regardless of pkg-config output, check if libncurses or libncursesw
   contains the 'initscr' symbol; if it does _and_ pkg-config failed
   earlier, add the resulting -llib linker option to CURSES_LIBS.
   Ditto for 'update_panels' and PANEL_LIBS.
4. Wrap the rest of the checks with WITH_SAVE_ENV and make sure we're 
   using updated LIBS and CPPFLAGS for those.

Add the PY_CHECK_CURSES convenience macro.
2024-07-01 08:10:03 +00:00
Russell Keith-Magee 48cd104b0c
gh-120522: Add a `--with-app-store-compliance` configure option to patch out problematic code (#120984)
* Add --app-store-compliance configuration option.

* Added blurb.

* Correct tab-vs-spaces formatting issue.

* Correct source file name in docs.

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>

* Correct source code reference in Mac docs

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>

* Only apply the patch forward, and ensure the working directory is correct.

* Make patching reslient to multiple builds.

* Documentation fixes found during review

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>

* Documentation and configure.ac syntax improvements

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>

* Regenerate configure script.

* Silence the patch echo output.

---------

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-06-30 08:34:35 +08:00