Skip to content

Commit

Permalink
Add patch to set -O2 for suitesparse build
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
staticfloat committed Mar 4, 2017
1 parent bb76add commit 2c62f07
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
11 changes: 11 additions & 0 deletions deps/patches/SuiteSparse-O2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- SuiteSparse_config/SuiteSparse_config.mk 2014-12-22 14:21:00.000000000 -0800
+++ SuiteSparse_config/SuiteSparse_config.mk 2017-01-20 15:17:43.000000000 -0800
@@ -69,7 +69,7 @@
# C and C++ compiler flags. The first three are standard for *.c and *.cpp
# Add -DNTIMER if you do use any timing routines (otherwise -lrt is required).
# CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -DNTIMER
- CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC
+ CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O2 -fexceptions -fPIC
# for the MKL BLAS:
# CF = $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -O3 -fexceptions -fPIC -I$(MKLROOT)/include -D_GNU_SOURCE
# with no optimization:
7 changes: 6 additions & 1 deletion deps/suitesparse.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-winclang.patch-applied: $
cd $(dir $@) && patch -p0 < $(SRCDIR)/patches/SuiteSparse-winclang.patch
echo 1 > $@

$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-O2.patch-applied: $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-winclang.patch-applied
cd $(dir $@) && patch -p0 < $(SRCDIR)/patches/SuiteSparse-O2.patch
echo 1 > $@


ifeq ($(USE_SYSTEM_BLAS), 0)
$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/build-compiled: | $(build_prefix)/manifest/openblas
else ifeq ($(USE_SYSTEM_LAPACK), 0)
$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/build-compiled: | $(build_prefix)/manifest/lapack
endif
$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/build-compiled: $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/source-extracted $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-winclang.patch-applied
$(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/build-compiled: $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/source-extracted $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse-O2.patch-applied
$(MAKE) -C $(dir $<) library $(SUITESPARSE_MFLAGS)
echo 1 > $@

Expand Down

0 comments on commit 2c62f07

Please sign in to comment.