Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for powerpc arch is wrong #432

Open
barracuda156 opened this issue Nov 30, 2024 · 0 comments
Open

Check for powerpc arch is wrong #432

barracuda156 opened this issue Nov 30, 2024 · 0 comments

Comments

@barracuda156
Copy link

There are two problems with the current check for powerpc arch:

  1. On Darwin uname -m returns Power Macintosh, and that breaks the script; what could be used instead is uname -p, however that determines cpu family, not the target arch. The correct way to find target arch would be from the triple.
  2. Existing code sets powerpc64 for powerpc:
# Normalize TARGET_ARCH to powerpc
ifneq ($(filter ppc powerpc,$(TARGET_ARCH)),)
  TARGET_ARCH := powerpc
endif

# Normalize TARGET_ARCH to powerpc64
ifneq ($(filter ppc% powerpc%,$(TARGET_ARCH)),)
  TARGET_ARCH := powerpc64
endif

# Normalize TARGET_ARCH to powerpc64le
ifneq ($(filter ppc%le powerpc%le,$(TARGET_ARCH)),)
  TARGET_ARCH := powerpc64le
endif

It should be ifneq ($(filter ppc64 powerpc64,$(TARGET_ARCH)),), otherwise it will always be powerpc64, even on 32-bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant