Skip to content

Commit

Permalink
Merge pull request #20858 from JuliaLang/sf/openblas_cross_compile_patch
Browse files Browse the repository at this point in the history
Integrate OpenBLAS fix for cross compiler autodetection
  • Loading branch information
staticfloat authored Mar 3, 2017
2 parents e9c1c3b + e7d583c commit 017f5b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deps/blas.mk
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-clangasmbug.patch-applied: $(BUILDDIR)/
cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && patch -p1 -f < $(SRCDIR)/patches/openblas-clangasmbug.patch
echo 1 > $@

$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-clangasmbug.patch-applied
# Cross compiler autodetection workaround from https://github.com/xianyi/OpenBLAS/pull/968
# Remove this when we upgrade beyond OpenBLAS v0.2.19
$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-cross-compile.patch-applied: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-clangasmbug.patch-applied
cd $(BUILDDIR)/$(OPENBLAS_SRC_DIR) && patch -p1 -f < $(SRCDIR)/patches/openblas-cross-compile.patch
echo 1 > $@

$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/openblas-cross-compile.patch-applied
perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' $(dir $<)/Makefile.system
echo 1 > $@

Expand Down
13 changes: 13 additions & 0 deletions deps/patches/openblas-cross-compile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/c_check b/c_check
index 2ec9fc48..371dbf61 100644
--- a/c_check
+++ b/c_check
@@ -34,7 +34,7 @@ if (dirname($compiler_name) ne ".") {
$cross_suffix .= dirname($compiler_name) . "/";
}

-if (basename($compiler_name) =~ /(.*-)(.*)/) {
+if (basename($compiler_name) =~ /([^\s]*-)(.*)/) {
$cross_suffix .= $1;
}

2 comments on commit 017f5b4

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels

Please sign in to comment.