Skip to content

Instantly share code, notes, and snippets.

@bhaskarvk
Last active April 28, 2017 22:32
Show Gist options
  • Save bhaskarvk/b288e249a6a9e262457acc59db1c0c8b to your computer and use it in GitHub Desktop.
Save bhaskarvk/b288e249a6a9e262457acc59db1c0c8b to your computer and use it in GitHub Desktop.
Diff files to make openblas compile on osx with clang-4.0 and openmp
diff --git a/Makefile.system b/Makefile.system
index b05177b..4b65edf 100644
--- a/Makefile.system
+++ b/Makefile.system
@@ -406,7 +406,7 @@ CCOMMON_OPT += -fopenmp
endif
ifeq ($(C_COMPILER), CLANG)
-$(error OpenBLAS: Clang didn't support OpenMP yet.)
+# $(error OpenBLAS: Clang didn't support OpenMP yet.)
CCOMMON_OPT += -fopenmp
endif
diff --git a/openblas.rb b/openblas.rb
index 1d587f0d..e90ccb92 100644
--- a/openblas.rb
+++ b/openblas.rb
@@ -23,6 +23,11 @@ class Openblas < Formula
sha256 "3ddabb73abf3baa4ffba2648bf1d9387bbc6354f94dd34eeef942f1b3e25c29a"
end
+ patch do
+ url "https://gist.github.com/bhaskarvk/b288e249a6a9e262457acc59db1c0c8b/raw/f9e563c5f27533cc49f01a5b02bc2189435ab66c/openblas-enable-clang.diff"
+ sha256 "b5bcbc018c3e588399bd7049f05fe4a3b1b029e9efd4b569f672ea6e30019c1c"
+ end
+
option "with-openmp", "Do parallel computation with OpenMP"
needs :openmp if build.with? "openmp"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment