Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

_pyi_machine: Avoid using platform.machine() directly#9377

Draft
iv-m wants to merge 1 commit intopyinstaller:developfrom
iv-m:fix-loongarch64-machine-tests
Draft

_pyi_machine: Avoid using platform.machine() directly#9377
iv-m wants to merge 1 commit intopyinstaller:developfrom
iv-m:fix-loongarch64-machine-tests

Conversation

@iv-m
Copy link

Themachine argument sould be used on all platforms. This change fixes _pyi_machine tests on loongarch64.

Fixes:b194152
Fixes:018fa3f

The `machine` argument sould be used on all platforms.This change fixes _pyi_machine tests on loongarch64.Fixes:b194152Fixes:018fa3f
@iv-m
Copy link
Author

@bwoodsend,@wangling12, please take a look.

@rokm
Copy link
Member

rokm commentedFeb 18, 2026
edited
Loading

This seems to break bootloader compilation inloongarch64/alpine:3.21 container, becausectx.env.DEST_CPU that is passed asmachine argument topyi_machine (here) seems to be set to an empty list instead of an architecture identifier. This probably comes from waf's failure to identify the target arch from compiler defines/macros; presumably same happens with SunWay, which is whyplatform.machine() is checked first (at the cost of losing ability to cross-compile bootloader for these platforms).

@iv-miv-m marked this pull request as draftFebruary 18, 2026 10:40
@iv-m
Copy link
Author

Yup,loongarch64 detection first needs to be added to waflib. I'm working on that.

@rokm
Copy link
Member

rokm commentedFeb 18, 2026
edited
Loading

Yup,loongarch64 detection first needs to be added to waflib. I'm working on that.

What exactly is it that you are trying to fix, though? I.e., what is wrong with the current approach for these two platforms?

@rokm
Copy link
Member

Yup,loongarch64 detection first needs to be added to waflib. I'm working on that.

Note that PyInstaller uses a vendored copy ofwaflib, so you will need to add detection forloongarch to

MACRO_TO_DEST_CPU= {
'__x86_64__':'x86_64',
'__amd64__':'x86_64',
'__i386__':'x86',
'__ia64__':'ia',
'__mips__':'mips',
'__sparc__':'sparc',
'__alpha__':'alpha',
'__aarch64__':'aarch64',
'__thumb__':'thumb',
'__arm__':'arm',
'__hppa__':'hppa',
'__powerpc__':'powerpc',
'__ppc__':'powerpc',
'__convex__':'convex',
'__m68k__':'m68k',
'__s390x__':'s390x',
'__s390__':'s390',
'__sh__':'sh',
'__xtensa__':'xtensa',
'__e2k__':'e2k',
'__riscv':'riscv',
}
independently of fixing upstreamwaflib.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@iv-m@rokm

[8]ページ先頭

©2009-2026 Movatter.jp