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

Wrong value of triple on PowerPC: PowerMacintosh-unknown-darwin instead of powerpc-apple-darwin #22956

Open
barracuda156 opened this issue May 21, 2024 · 4 comments

Comments

@barracuda156
Copy link

Description

Build system misdetects the triple:

checking build system type... PowerMacintosh-unknown-darwin
checking host system type... PowerMacintosh-unknown-darwin
checking target system type... PowerMacintosh-unknown-darwin

The issue is likely that mk/gcc.mk uses uname -m on Darwin, but that does not return the processor family or an arch; on a powerpc Mac is returns a rather unusable Power Macintosh.

What returns the correct value in a case of a ppc build is uname -p. Notice, though, that this still cannot be used with -arch flag, since it is not the build arch, but cpu family. And for ppc64 build the correct triple will be powerpc64-apple-darwin*.

Also, for macOS it should be powerpc*-apple-darwin*; not sure what is the correct value for Pure Darwin (if anyone still uses it).

Environment

36-244% date
Tue May 21 16:47:29 CST 2024
36-244% uname -ms
Darwin Power Macintosh
@trufae
Copy link
Collaborator

trufae commented May 21, 2024

This triplet is generated by acr. would you like to try to submit a pr there to fix the “unknown” id?

@trufae
Copy link
Collaborator

trufae commented May 22, 2024

But this shouldnt affect de build

@barracuda156
Copy link
Author

@trufae The build is broken for unrelated reason: #22955

I will check what’s going on with the triple here. Even if affecting nothing, it will be nice to have it fixed.

@trufae
Copy link
Collaborator

trufae commented Jun 6, 2024

Can you do the fix in https://github.com/radareorg/acr/blob/ac9f0d400a6152d04fa30cffea2c79c29ab156cd/src/acr-sh#L1628 to generate the right triplet?

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

2 participants