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
M1 Mac chip fix #30
M1 Mac chip fix #30
Conversation
Mac M1 chip fix for specific compile flags.
This patch the march=native flag that is not currently supported in gcc for mac M1 family chips. Simply check if the system is an arm64 version of darwin kernel and substitute the march to mcpu=apple-m1 for native comp.
I'm very sorry, but I still can't see any comments over the code. |
They are not comments in a programming language sense (not Elisp lines starting with OR |
Not having been assigned to the pull request, I can't see these comments, but from the photo I have fixed the first of the two lines. Could you send me a photo of the second line to fix? |
disaster.el
Outdated
"Command line options to use when compiling Fortran." | ||
:group 'disaster | ||
:type 'string) | ||
|
||
(defcustom disaster-objdump | ||
(concat (if (eq system-type 'darwin) "gobjdump" "objdump") | ||
" -d -M att -Sl --no-show-raw-insn") | ||
"objdump -d -M att -Sl --no-show-raw-insn" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't test this as I don't have a Mac. However, I think this can cause an issue on other Mac architectures (see #22)
If the tool is named objdump
on your machine, you can customize the variable when loading disaster
.
(use-package disaster
:ensure t
:custom
(disaster-objdump "objdump -d -M att -Sl --no-show-raw-insn"))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On mac m1 we can't use gobjdump, we need the counterpart made for clang. I fixed that if it's a standard intel mac then gobjdump otherwise just objdump.
LGTM, merged! Thanks @MacPapo |
Thank you @abougouffa for the attention and trust you have given me. |
You're welcome @MacPapo. It is me who should thank you for your contribution! |
Hi @abougouffa, I created this pull request to close the issue on Mac M chips that currently doesn't compile at all because of compiler flags.
This is the function that select the right comp flag when starting disaster.