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 support for M1 Mac (ARM) #13

Open
vjspranav opened this issue Feb 26, 2022 · 1 comment
Open

Add support for M1 Mac (ARM) #13

vjspranav opened this issue Feb 26, 2022 · 1 comment

Comments

@vjspranav
Copy link

Having -march=x86-64 in utilities.rkt seems to be causing issue with aarch64 M1 architecture
The error on running make-test:
The clang compiler doesn't support "-march=-x86-64"

vjspranav added a commit to vjspranav/public-student-support-code that referenced this issue Feb 26, 2022
* In this case this adds support for macosx, and prepares for any further new architectures.
Fixes issue: IUCompilerCourse#13
@vjspranav vjspranav changed the title Add support for M1 Mac Add support for M1 Mac (ARM) Feb 27, 2022
vjspranav added a commit to vjspranav/public-student-support-code that referenced this issue Mar 10, 2022
* wref to issue IUCompilerCourse#13
* We do this with the help of inbuilt arch command "Rosetta 2", For now Rosetta is here to stay
* and we can make use of it's capabilities to compile x86 instructions on arm machine
vjspranav added a commit to vjspranav/public-student-support-code that referenced this issue Mar 10, 2022
* wref to issue IUCompilerCourse#13
* We do this with the help of inbuilt arch command "Rosetta 2", For now Rosetta is here to stay
* and we can make use of it's capabilities to compile x86 instructions on arm machine
vjspranav added a commit to vjspranav/public-student-support-code that referenced this issue Mar 10, 2022
* wref to issue IUCompilerCourse#13
* We do this with the help of inbuilt arch command "Rosetta 2", For now Rosetta is here to stay
* and we can make use of it's capabilities to compile x86 instructions on arm machine
vjspranav added a commit to princevarshney05/nano-pass-compiler-17 that referenced this issue Mar 10, 2022
* wref to issue IUCompilerCourse/public-student-support-code#13
* We do this with the help of inbuilt arch command "Rosetta 2", For now Rosetta is here to stay
* and we can make use of it's capabilities to compile x86 instructions on arm machine
vjspranav added a commit to princevarshney05/nano-pass-compiler-17 that referenced this issue Mar 17, 2022
* wref to issue IUCompilerCourse/public-student-support-code#13
* We do this with the help of inbuilt arch command "Rosetta 2", For now Rosetta is here to stay
* and we can make use of it's capabilities to compile x86 instructions on arm machine
vjspranav added a commit to princevarshney05/nano-pass-compiler-17 that referenced this issue Mar 26, 2022
* wref to issue IUCompilerCourse/public-student-support-code#13
* We do this with the help of inbuilt arch command "Rosetta 2", For now Rosetta is here to stay
* and we can make use of it's capabilities to compile x86 instructions on arm machine
vjspranav added a commit to vjspranav/my-racket-compiler that referenced this issue May 2, 2022
* wref to issue IUCompilerCourse/public-student-support-code#13
* We do this with the help of inbuilt arch command "Rosetta 2", For now Rosetta is here to stay
* and we can make use of it's capabilities to compile x86 instructions on arm machine
@rundong08
Copy link

rundong08 commented Nov 15, 2022

Here's a workaround:
To compile the runtime.c file to get runtime.o:

cc -arch x86_64 -march=x86-64 -c runtime.c

And in utilities.rkt, add the -arch x86_64 option to the corresponding gcc call.

Note on M1 mac -march=x86-64 is only available when you use -arch x86_64 option.

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