- Notifications
You must be signed in to change notification settings - Fork587
Fix arm64 darwin hints when using use64bitall with Configure#22672
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
When calling Configure with use64bitall on arm64 macOS, it compiles a test program using clang and an -arch flag that is not followed by anything. Seems like the darwin arch hint when using use64bitall couldn't work with the 'arm' result from uname -p.
Not sure if Apple are to introduce another CPU architecture to their device lineup - but they already did it 2 times. When building this on arm64 macOS, before adding the arm64 arch hint, Configure with use64bitall wouldn't exit, but a rather cryptic clang error would be thrown for an unknown arch name, simply because nothing was passed after the -arch flag.
mtsanovv commentedOct 24, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Could somebody take a look at this? |
Looks sensible to me, but I don't run mac |
mtsanovv commentedOct 26, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@Leont, thanks for checking my PR. @jkeenan, thanks for approving the test pipeline run. I addressed the failing updateAUTHORS test. Could you please approve the workflow again? I'd greatly appreciate it if someone could merge the PR after the tests pass :) Manually patching the darwin hints to build perl for my application is causing some trouble. It'd be great to have an official perl release to use with this fix. |
благодаря ви |
Uh oh!
There was an error while loading.Please reload this page.
When using 64-bit addressing (by passing
-Duse64bitall
to Configure) on macOS arm64, clang throws the following cryptic error when compiling a test program:The first commit is to handle the
arm
output fromuname -p
and respectively to pass the proper architecture -arm64
right after the-arch
flag that would otherwise be dangling.Just in case some time in the future Apple introduces a yet another CPU architecture to their Mac devices, I decided to add an extra
exit 1
with the second commit so that the Configure error would be the last thing that is displayed to the user. This way, we don't see the cryptic clang error:After the second commit is added, the following Configure output that I saw before went missing:
Personally, I believe that this is a good tradeoff. If Configure can't do better but pass a dangling
-arch
flag, then maybe it is a good idea to exit as early as possible so that the user can either add a hint for their CPU architecture (and then create a PR here like I did) or just call Configure without 64-bit addressing. However, if any of the reviewers think that this is something that should not be done, I'll be fine with reverting the second commit.This set of changes does not require a perldelta entry.