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

Add lib paths on Apple M1 (arm64) #113

Merged
merged 3 commits into from
Sep 22, 2021
Merged

Add lib paths on Apple M1 (arm64) #113

merged 3 commits into from
Sep 22, 2021

Conversation

bucanero
Copy link
Contributor

This PR updates the checks to build the ps3 toolchain on macOS w/ Apple M1 processors.

Note: Homebrew package manager install libs on /opt/homebrew/ when running on Apple M1 (arm64)

Homebrew (M1) install libs on /opt/homebrew/
@zeldin
Copy link
Member

zeldin commented Sep 22, 2021

Hm, I'm thinking maybe instead of adding more OS-specific paths to this list, we should just check with pkg-config as well?

mikan:~% uname -a
Darwin mikan.mc.pp.se 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101 arm64
mikan:~% pkg-config --exists gmp && echo "yes"
yes
mikan:~% pkg-config --exists libelf && echo "yes"
yes
mikan:~% pkg-config --exists ncurses && echo "yes"
yes
mikan:~% pkg-config --exists zlib && echo "yes" 
yes
mikan:~% 

@bucanero
Copy link
Contributor Author

Hm, I'm thinking maybe instead of adding more OS-specific paths to this list, we should just check with pkg-config as well?

For sure, it looks like a more elegant (and future-proof) solution. I'm not an expert on scripting but I can try to upgrade these scripts to pkg-config and update the PR.

@bucanero
Copy link
Contributor Author

I have upgraded the scripts using pkg-config. Please take a look when you have a chance.

@zeldin
Copy link
Member

zeldin commented Sep 22, 2021

  1. To make sure there are no regressions, I wouldn't remove the old tests, just add the pkg-config check instead of adding a new path test for homebrew
  2. The is no need for any parentheses around the pkg-config command. The old things that have parentheses is because it's using a single redirection clause to redirect the output from multiple commands. But the pkg-config command is just one command and does not use any redirection anyway.

@bucanero
Copy link
Contributor Author

  1. To make sure there are no regressions, I wouldn't remove the old tests, just add the pkg-config check instead of adding a new path test for homebrew

I updated the scripts, keeping the old tests, and adding the pkg-config check.

Btw, I added some notes about building the ps3 toolchain on M1 in #114 . I'm not sure how to include those fixes properly.

@zeldin
Copy link
Member

zeldin commented Sep 22, 2021

LGTM.

@zeldin zeldin merged commit 3f062df into ps3dev:master Sep 22, 2021
@bucanero bucanero deleted the apple-m1 branch September 22, 2021 19:36
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

Successfully merging this pull request may close these issues.

2 participants