diff --git a/systemtap-tweak-i386-argument-passing.patch b/systemtap-tweak-i386-argument-passing.patch new file mode 100644 index 0000000..4d8f2e9 --- /dev/null +++ b/systemtap-tweak-i386-argument-passing.patch @@ -0,0 +1,39 @@ +From: Jakub Jelinek +Date: Tue Mar 21 17:04:08 2017 -0400 +Subject: tweak i386 argument passing +Git-commit: 272146660f54786bb61d388f6d3a4eb20e7d9369 +References: bsc#1030285 +Signed-off-by: Tony Jones + + gcc PR80115: sys/sdt.h: tweak i386 argument passing + + Use %w[arg] to request that widened forms of register names be passed + to the sys/sdt.h macro operand strings, so as to avoid nominating + sub-registers such as %sil within -m32 code, which gcc <= 6 sometimes + buggily did. + +diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h +index 3b7eda797..eff315bcd 100644 +--- a/includes/sys/sdt.h ++++ b/includes/sys/sdt.h +@@ -82,9 +82,11 @@ + # define _SDT_ASM_STRING_1(x) _SDT_ASM_1(.asciz #x) + + # define _SDT_ARGFMT(no) %n[_SDT_S##no]@_SDT_ARGTMPL(_SDT_A##no) ++ + # ifndef STAP_SDT_ARG_CONSTRAINT + # define STAP_SDT_ARG_CONSTRAINT nor + # endif ++ + # define _SDT_STRINGIFY(x) #x + # define _SDT_ARG_CONSTRAINT_STRING(x) _SDT_STRINGIFY(x) + # define _SDT_ARG(n, x) \ +@@ -173,6 +175,8 @@ __extension__ extern unsigned long long __sdt_unsp; + + #if defined __powerpc__ || defined __powerpc64__ + # define _SDT_ARGTMPL(id) %I[id]%[id] ++#elif defined __i386__ ++# define _SDT_ARGTMPL(id) %w[id] /* gcc.gnu.org/PR80115 */ + #else + # define _SDT_ARGTMPL(id) %[id] + #endif diff --git a/systemtap.changes b/systemtap.changes index ed90b2d..f60c6cf 100644 --- a/systemtap.changes +++ b/systemtap.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 30 19:42:04 UTC 2017 - tonyj@suse.com + +- Tweak i386 argument-passing (bsc#1030285) + New patch: systemtap-tweak-i386-argument-passing.patch + ------------------------------------------------------------------- Tue Mar 28 19:32:02 UTC 2017 - jeffm@suse.com diff --git a/systemtap.spec b/systemtap.spec index e34bd6d..b462c8c 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -33,6 +33,7 @@ Source3: README-BEFORE-ADDING-PATCHES Source4: README-KEYRING Source5: stap-server.conf Patch1: systemtap-build-source-dir.patch +Patch2: systemtap-tweak-i386-argument-passing.patch BuildRequires: gcc-c++ BuildRequires: glib2-devel BuildRequires: libcap-devel @@ -92,6 +93,7 @@ This package contains the support tools for static probes. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build %configure --disable-docs --docdir=%{_docdir}/systemtap