Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1081226

Summary: Trivial change to systemtap spec to enable ppc64le
Product: [Fedora] Fedora Reporter: Brent Baude <bbaude>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dsmith, fche, jistone, lberk, mjw, mjw, nathans, scox, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-28 14:38:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1051573    

Description Brent Baude 2014-03-26 19:38:06 UTC
The following diff will enable ppc64le and systemtap builds:

[baude@ppc64le systemtap]$ git diff
diff --git a/systemtap.spec b/systemtap.spec
index 8570948..058d539 100644
--- a/systemtap.spec
+++ b/systemtap.spec
@@ -1,7 +1,7 @@
 %{!?with_sqlite: %global with_sqlite 1}
 %{!?with_docs: %global with_docs 1}
 # crash is not available
-%ifarch ppc ppc64 %{sparc} aarch64
+%ifarch ppc ppc64 %{sparc} aarch64 ppc64le
 %{!?with_crash: %global with_crash 0}
 %else
 %{!?with_crash: %global with_crash 1}
@@ -11,7 +11,7 @@
 %{!?elfutils_version: %global elfutils_version 0.142}
 %{!?pie_supported: %global pie_supported 1}
 %{!?with_boost: %global with_boost 0}
-%ifarch ppc ppc64 %{sparc} aarch64
+%ifarch ppc ppc64 %{sparc} aarch64 ppc64le
 %{!?with_publican: %global with_publican 0}
 %else
 %{!?with_publican: %global with_publican 1}
@@ -41,6 +41,10 @@
 %{!?with_openssl: %global with_openssl 0}
 %endif
 
+%ifarch ppc64le
+%global with_virthost 0
+%endif
+
 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 6
    %define initdir %{_initddir}
 %else # RHEL5 doesn't know _initddir

Comment 1 Brent Baude 2014-03-26 20:04:54 UTC
I missed one conditional.  Proper changes are below:

[baude@ppc64le systemtap]$ git diff
diff --git a/systemtap.spec b/systemtap.spec
index 8570948..66a5512 100644
--- a/systemtap.spec
+++ b/systemtap.spec
@@ -1,7 +1,7 @@
 %{!?with_sqlite: %global with_sqlite 1}
 %{!?with_docs: %global with_docs 1}
 # crash is not available
-%ifarch ppc ppc64 %{sparc} aarch64
+%ifarch ppc ppc64 %{sparc} aarch64 ppc64le
 %{!?with_crash: %global with_crash 0}
 %else
 %{!?with_crash: %global with_crash 1}
@@ -11,7 +11,7 @@
 %{!?elfutils_version: %global elfutils_version 0.142}
 %{!?pie_supported: %global pie_supported 1}
 %{!?with_boost: %global with_boost 0}
-%ifarch ppc ppc64 %{sparc} aarch64
+%ifarch ppc ppc64 %{sparc} aarch64 ppc64le
 %{!?with_publican: %global with_publican 0}
 %else
 %{!?with_publican: %global with_publican 1}
@@ -21,7 +21,7 @@
 %else
 %{!?publican_brand: %global publican_brand fedora}
 %endif
-%ifnarch s390 s390x %{arm} aarch64
+%ifnarch s390 s390x %{arm} aarch64 ppc64le
 %{!?with_dyninst: %global with_dyninst 0%{?fedora} >= 18 || 0%{?rhel} >= 7}
 %else
 %{!?with_dyninst: %global with_dyninst 0}
@@ -41,6 +41,10 @@
 %{!?with_openssl: %global with_openssl 0}
 %endif
 
+%ifarch ppc64le
+%global with_virthost 0
+%endif
+
 %if 0%{?fedora} >= 18 || 0%{?rhel} >= 6
    %define initdir %{_initddir}
 %else # RHEL5 doesn't know _initddir

Comment 2 David Smith 2014-03-27 20:37:29 UTC
I'll note here that these changes are fine in themselves. But, even with the spec file changed so that it will build on ppc64le, I'm not sure it will build successfully. Assuming systemtap does builds successfully, I doubt it will work well on ppc64le. Each new arch requires porting in several areas, such as register support, user and kernel backtrace support, etc.

In addition, systemtap requires elfutils, and I don't see a ppc64le elfutils backend in the elfutils source tree.

Comment 3 Brent Baude 2014-03-28 13:50:26 UTC
Please push the changes.  I'll review the comments and ensure it works properly.

Comment 4 Frank Ch. Eigler 2014-03-28 14:38:02 UTC
pushed.

Comment 5 Mark Wielaard 2014-03-28 15:15:31 UTC
(In reply to David Smith from comment #2)
> In addition, systemtap requires elfutils, and I don't see a ppc64le elfutils
> backend in the elfutils source tree.

That is correct, elfutils doesn't have a ppc64le ELFv2 ABI backend yet. It will recognize little endian ppc64 (because it checks e_ident EI_DATA_, but will treat it as ELFv1 ABI (because it doesn't check e_flags EF_PPC64_ABI), including assuming there are function descriptors used (which isn't the case with ppc64le ELFv2 ABI).