dev-util/systemtap: tweak operand constraints for ia64, bug #510134
authorSergei Trofimovich <slyfox@gentoo.org>
Tue, 7 Nov 2017 23:07:52 +0000 (23:07 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Tue, 7 Nov 2017 23:07:52 +0000 (23:07 +0000)
Reported-by: Émeric Maschino
Closes: https://bugs.gentoo.org/510134
Package-Manager: Portage-2.3.13, Repoman-2.3.4

dev-util/systemtap/files/systemtap-3.1-ia64.patch [new file with mode: 0644]
dev-util/systemtap/systemtap-3.1-r1.ebuild

diff --git a/dev-util/systemtap/files/systemtap-3.1-ia64.patch b/dev-util/systemtap/files/systemtap-3.1-ia64.patch
new file mode 100644 (file)
index 0000000..4750207
--- /dev/null
@@ -0,0 +1,23 @@
+Workaround build failure on ia64
+
+Avoid 'o' constraint to allow gcc to select register operand.
+That way instruction selector can satisfy all constraints
+for PROBE2 macro.
+
+Reported-by: Émeric Maschino
+Bug: https://bugs.gentoo.org/510134
+diff --git a/cache.cxx b/cache.cxx
+index 3546b30..2710abf 100644
+--- a/cache.cxx
++++ b/cache.cxx
+@@ -8,2 +8,10 @@
++#ifdef __ia64__
++// Default is: nor
++// We disable 'o' because gcc fails to select register
++// constraint for second instruction in 'add_script_to_cache'
++//     https://bugs.gentoo.org/510134
++#    define STAP_SDT_ARG_CONSTRAINT nr
++#endif
++
+ #include "config.h"
index cd13a9e21c2e792b81d13c6abcf10f1ed591e980..bfd2527d9547b94f2d6d112958312f4b9f83e520 100644 (file)
@@ -33,6 +33,8 @@ ERROR_DEBUG_FS="${PN} works best with support for Debug Filesystem (DEBUG_FS) -
 
 DOCS="AUTHORS HACKING NEWS README"
 
+PATCHES=("${FILESDIR}"/${PN}-3.1-ia64.patch)
+
 pkg_setup() {
        linux-info_pkg_setup
        python-single-r1_pkg_setup