summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/nwchem/Gcc6_macs_optfix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/nwchem/Gcc6_macs_optfix.patch')
-rw-r--r--var/spack/repos/builtin/packages/nwchem/Gcc6_macs_optfix.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/nwchem/Gcc6_macs_optfix.patch b/var/spack/repos/builtin/packages/nwchem/Gcc6_macs_optfix.patch
new file mode 100644
index 0000000000..6d903923b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nwchem/Gcc6_macs_optfix.patch
@@ -0,0 +1,40 @@
+Index: src/config/makefile.h
+===================================================================
+--- src/config/makefile.h (revision 28470)
++++ src/config/makefile.h (revision 28471)
+@@ -910,6 +910,7 @@
+ GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | egrep __VERS | cut -c24)
+ GNU_GE_4_6 = $(shell [ $(GNUMAJOR) -gt 4 -o \( $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 6 \) ] && echo true)
+ GNU_GE_4_8 = $(shell [ $(GNUMAJOR) -gt 4 -o \( $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 8 \) ] && echo true)
++ GNU_GE_6 = $(shell [ $(GNUMAJOR) -ge 6 ] && echo true)
+ endif
+ ifeq ($(GNU_GE_4_6),true)
+ DEFINES += -DGCC46
+@@ -921,6 +922,9 @@
+
+ FOPTIONS += -Warray-bounds
+ endif
++ ifeq ($(GNU_GE_6),true)
++ FOPTIMIZE += -fno-tree-dominator-opts # solvation/hnd_cosmo_lib breaks
++ endif
+ ifdef USE_OPENMP
+ FOPTIONS += -fopenmp
+ LDOPTIONS += -fopenmp
+@@ -1067,6 +1071,7 @@
+ GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | egrep __VERS | cut -c24)
+ GNU_GE_4_6 = $(shell [ $(GNUMAJOR) -gt 4 -o \( $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 6 \) ] && echo true)
+ GNU_GE_4_8 = $(shell [ $(GNUMAJOR) -gt 4 -o \( $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 8 \) ] && echo true)
++ GNU_GE_6 = $(shell [ $(GNUMAJOR) -ge 6 ] && echo true)
+ ifeq ($(GNU_GE_4_6),true)
+ DEFINES += -DGCC46
+ endif
+@@ -1076,6 +1081,9 @@
+ #gone FFLAGS_FORGA += -fno-aggressive-loop-optimizations
+ FOPTIONS += -Warray-bounds
+ endif # GNU_GE_4_8
++ ifeq ($(GNU_GE_6),true)
++ FOPTIMIZE += -fno-tree-dominator-opts # solvation/hnd_cosmo_lib breaks
++ endif
+ endif # GNUMAJOR
+
+ ifdef USE_OPENMP