Support --disable-march-tune-native
mmkader85 opened this issue · comments
Mohamed Abdul Kader commented
Hello @johanns / @mmoghadas,
Thanks for the gem. As you know that Apple M1 doesn't support march=native
, please add support for --disable-march-tune-native
.
https://developer.apple.com/forums/thread/672654
--- a/ext/sha3/extconf.rb
+++ b/ext/sha3/extconf.rb
@@ -17,5 +17,10 @@ end
find_header("sha3.h")
find_header("digest.h")
-$CFLAGS = ' -fomit-frame-pointer -O3 -g0 -march=native '
+if enable_config('march-tune-native', false)
+ $CFLAGS = ' -fomit-frame-pointer -O3 -g0 '
+else
+ $CFLAGS = ' -fomit-frame-pointer -O3 -g0 -march=native '
+end
+
Johanns Gregorian commented
@mmkader85 Thanks for the report. I'll cut a new gem with a fix for Apple M1 support in a few days.
Hasan Can Yaşar commented
Hi there,
Any updates on this?
Best,
Yvan commented
Hi. This definitely needs a bump :)
Johanns Gregorian commented
Merged @orlando-labs fixed and cut a new gem (1.0.3).
Thanks @orlando-labs