summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMichael Kuhn <suraia@ikkoku.de>2017-08-16 17:48:20 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2017-08-16 10:48:20 -0500
commit3a0e9f29e6d14d1cda6ef28a07f40205384f2a24 (patch)
tree03ccca479f2aaa306a7a1500b7b132029ba9dd72 /var
parent95915b81d09632f353ded1dbac77adc3f21c9dce (diff)
downloadspack-3a0e9f29e6d14d1cda6ef28a07f40205384f2a24.tar.gz
spack-3a0e9f29e6d14d1cda6ef28a07f40205384f2a24.tar.bz2
spack-3a0e9f29e6d14d1cda6ef28a07f40205384f2a24.tar.xz
spack-3a0e9f29e6d14d1cda6ef28a07f40205384f2a24.zip
scorep: Fix build with GCC 7 (#5107)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/scorep/gcc7.patch42
-rw-r--r--var/spack/repos/builtin/packages/scorep/package.py2
2 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/scorep/gcc7.patch b/var/spack/repos/builtin/packages/scorep/gcc7.patch
new file mode 100644
index 0000000000..7383ee15ba
--- /dev/null
+++ b/var/spack/repos/builtin/packages/scorep/gcc7.patch
@@ -0,0 +1,42 @@
+diff -ru scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_gcc_version_compatibility.h scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_gcc_version_compatibility.h
+--- scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_gcc_version_compatibility.h 2017-08-15 14:46:27.353875030 +0200
++++ scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_gcc_version_compatibility.h 2017-08-15 14:52:18.458118812 +0200
+@@ -27,6 +27,11 @@
+ DECL_SECTION_NAME( decl ) = build_string( strlen( section ), section )
+ #endif
+
++#if SCOREP_GCC_PLUGIN_TARGET_VERSION < 7000
++#define SET_DECL_ALIGN( decl, align ) \
++ DECL_ALIGN( decl ) = ( align )
++#endif
++
+ #if SCOREP_GCC_PLUGIN_TARGET_VERSION >= 5000
+ #define varpool_finalize_decl( decl ) varpool_node::finalize_decl( decl )
+ #define cgraph_get_node( decl ) cgraph_node::get( decl )
+diff -ru scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c
+--- scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c 2017-08-15 14:46:27.353875030 +0200
++++ scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_descriptor.inc.c 2017-08-15 14:52:56.220854113 +0200
+@@ -194,7 +194,7 @@
+ TREE_TYPE( region_descr_value ) );
+
+ /* Align the struct generously, so that it works for 32 and 64 bit */
+- DECL_ALIGN( region_descr_var ) = 64 * BITS_PER_UNIT;
++ SET_DECL_ALIGN( region_descr_var, 64 * BITS_PER_UNIT );
+ DECL_USER_ALIGN( region_descr_var ) = 1;
+
+ /* The struct is 64 bytes, because of reserved entries */
+diff -ru scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_tree-flow.h scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_tree-flow.h
+--- scorep-3.1.orig/src/adapters/compiler/gcc-plugin/scorep_plugin_tree-flow.h 2017-08-15 14:46:27.353875030 +0200
++++ scorep-3.1/src/adapters/compiler/gcc-plugin/scorep_plugin_tree-flow.h 2017-08-15 14:49:26.163888408 +0200
+@@ -23,6 +23,11 @@
+ #include "stringpool.h"
+ #include "basic-block.h"
+ #include "tree-ssa-alias.h"
++
++#if SCOREP_GCC_PLUGIN_TARGET_VERSION >= 7000
++#include "tree-vrp.h"
++#endif
++
+ #include "tree-ssanames.h"
+ #include "internal-fn.h"
+ #include "gimple-expr.h"
diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py
index 05482bd0c4..59665a482d 100644
--- a/var/spack/repos/builtin/packages/scorep/package.py
+++ b/var/spack/repos/builtin/packages/scorep/package.py
@@ -40,6 +40,8 @@ class Scorep(AutotoolsPackage):
version('1.4.2', '3b9a042b13bdd5836452354e6567f71e')
version('1.3', '9db6f957b7f51fa01377a9537867a55c')
+ patch('gcc7.patch')
+
##########
# Dependencies for SCORE-P are quite tight. See the homepage for more
# information.