GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-149800: Fix macOS universal2 build of perf trampoline (GH-149894 follow-up) by pablogsal · Pull Request #150364 · python/cpython

Conversation

@pablogsal

@pablogsal pablogsal commented May 24, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

…

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.

  • Issue: Refactor perf trampoline proposal: split the assembly per architecture, auto-generate DWARF unwind data #149800

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pablogsal
pablogsal requested review from AA-Turner, emmatyping and erlend-aasland as code owners May 24, 2026 19:33
@bedevere-app bedevere-app Bot added the awaiting core review label May 24, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 24, 2026
Refactor perf trampoline proposal: split the assembly per architecture, auto-generate DWARF unwind data #149800
Open
@pablogsal
pythongh-149800: Fix macOS universal2 build of perf trampoline (pytho…
cf94a02
…nGH-149894 follow-up)

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.
@pablogsal
pablogsal force-pushed the fix-perf-trampoline-mac-universal2 branch from 6ca47af to cf94a02 Compare May 24, 2026 19:36
@ned-deily ned-deily mentioned this pull request May 24, 2026
gh-149800: Fix macOS universal2 build of perf trampoline #150365
Closed
stratakis
stratakis reviewed May 24, 2026
View reviewed changes
Comment thread Makefile.pre.in Resolved

Uh oh!

There was an error while loading. Please reload this page.

pablogsal
pablogsal commented May 24, 2026
View reviewed changes
Comment thread Makefile.pre.in Resolved

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal
Update Makefile.pre.in
1c7c906
@pablogsal pablogsal added the skip news label May 24, 2026
@vstinner vstinner mentioned this pull request May 25, 2026
gh-149800: Split perf trampoline assembly into per-architecture files #149894
Merged
vstinner
vstinner reviewed May 25, 2026
View reviewed changes
Comment thread Makefile.pre.in Resolved

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal @vstinner
Update Makefile.pre.in
b957e29
Co-authored-by: Victor Stinner <[email protected]>
@pablogsal
pablogsal merged commit e6b17d1 into python:main May 25, 2026
43 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal
pablogsal deleted the fix-perf-trampoline-mac-universal2 branch May 25, 2026 22:01
@bedevere-app bedevere-app Bot removed the awaiting core review label May 25, 2026
@stratakis stratakis mentioned this pull request Sep 10, 2026
gh-149800: Generate the perf trampoline .eh_frame from the compiled assembly #157246
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner left review comments
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@emmatyping emmatyping Awaiting requested review from emmatyping emmatyping is a code owner
+1 more reviewer
@stratakis stratakis stratakis left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@pablogsal @vstinner @stratakis
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.