]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-149800: Fix macOS universal2 build of perf trampoline (GH-149894 follow-up) (...
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Mon, 25 May 2026 22:01:27 +0000 (23:01 +0100)
committerGitHub <noreply@github.com>
Mon, 25 May 2026 22:01:27 +0000 (23:01 +0100)
commite6b17d1d6dc3dcb497502b377b1357076feb41f3
treef1773c9e40900bd84e18dd758d3e7c26704b2edd
parentcb60f48ed88b27ccdde9ac067117cc4860aa9852
gh-149800: Fix macOS universal2 build of perf trampoline (GH-149894 follow-up) (#150364)

After the perf trampoline assembly was split into per-architecture files,
the macOS universal2 build failed at the lipo step:

    fatal error: lipo: Python/asm_trampoline_aarch64.o and
    Python/asm_trampoline_x86_64.o have the same architectures (x86_64)
    and can't be in the same fat output file

PY_CORE_CFLAGS on universal2 contains "-arch arm64 -arch x86_64", so each
.S file was assembled into a fat .o containing both slices (with one slice
empty because of the #ifdef guards). lipo then refused to merge two fat
objects that share architectures.

Compile each per-arch object with a single -arch flag before merging.
Makefile.pre.in