Package: src:linux-tools
Version: 3.14-1
Tags: patch
User: debian-powe...@lists.debian.org
Usertags: ppc64el
Hi maintainers,
The attached patch adds support for ppc64el in linux-tools.
(I ommitted the output of the 'debian/control' target)
Would you please consider it for an upload?
Among other things, it includes defining '__SANE_USERSPACE_TYPES__' on
ppc64 and ppc64el, in order to fix the build failure reported at
#747151 (more details there).
With it applied, the built packages have equivalent contents to amd64,
accounting for the /usr/lib{,64} difference. I could run 'perf stat':
# perf_3.14 stat sleep 1
Performance counter stats for 'sleep 1':
0.542034 task-clock (msec) # 0.001 CPUs
utilized
1 context-switches # 0.002 M/sec
0 cpu-migrations # 0.000 K/sec
49 page-faults # 0.090 M/sec
2266748 cycles # 4.182 GHz
454072 stalled-cycles-frontend # 20.03% frontend
cycles idle
1604224 stalled-cycles-backend # 70.77% backend
cycles idle
556703 instructions # 0.25 insns per
cycle
# 2.88 stalled cycles
per insn
<not counted> branches
<not counted> branch-misses
1.001009786 seconds time elapsed
# echo $?
0
Thank you,
--
Mauricio Faria de Oliveira
IBM Linux Technology Center
diff -Nru linux-tools-3.14/debian/build/scripts/mod/Makefile.real
linux-tools-3.14/debian/build/scripts/mod/Makefile.real
--- linux-tools-3.14/debian/build/scripts/mod/Makefile.real 2013-06-03
10:19:37.000000000 -0300
+++ linux-tools-3.14/debian/build/scripts/mod/Makefile.real 2014-07-08
14:56:40.000000000 -0300
@@ -6,6 +6,16 @@
include $(top_srcdir)/debian/build/Makefile.inc
+DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+
+ifneq (,$(filter powerpc64 ppc64el,$(DEB_HOST_ARCH_CPU)))
+ # Fix "include/linux/types.h:148:1: error: unknown type name 'u32'".
+ # See linux commits:
+ # "asm/types.h: Remove include/asm-generic/int-l64.h"
+ # "powerpc: Add __SANE_USERSPACE_TYPES__ to asm/types.h for LL64"
+ CFLAGS += -D__SANE_USERSPACE_TYPES__
+endif
+
modpost.real-$(TYPE): file2alias.real-$(TYPE).o modpost.real-$(TYPE).o
sumversion.real-$(TYPE).o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
diff -Nru linux-tools-3.14/debian/build/tools/perf/Makefile
linux-tools-3.14/debian/build/tools/perf/Makefile
--- linux-tools-3.14/debian/build/tools/perf/Makefile 2014-03-19
20:56:58.000000000 -0300
+++ linux-tools-3.14/debian/build/tools/perf/Makefile 2014-07-08
14:49:28.000000000 -0300
@@ -21,6 +21,8 @@
KERNEL_ARCH_PERF = powerpc
else ifeq ($(DEB_HOST_ARCH_CPU),powerpc64)
KERNEL_ARCH_PERF = powerpc
+else ifeq ($(DEB_HOST_ARCH_CPU),ppc64el)
+ KERNEL_ARCH_PERF = powerpc
else ifeq ($(DEB_HOST_ARCH_CPU),s390)
KERNEL_ARCH_PERF = s390
else ifeq ($(DEB_HOST_ARCH_CPU),s390x)
diff -Nru linux-tools-3.14/debian/changelog linux-tools-3.14/debian/changelog
--- linux-tools-3.14/debian/changelog 2014-04-28 13:46:25.000000000 -0300
+++ linux-tools-3.14/debian/changelog 2014-07-08 14:53:00.000000000 -0300
@@ -1,3 +1,13 @@
+linux-tools (3.14-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * ppc64el/ppc64: fix FTBFS on linux 3.14 (build/scripts/mod/Makefile.real).
+ * ppc64el: set KERNEL_ARCH_PERF (build/tools/perf/Makefile).
+ * ppc64el: build linux-tools (rules.real, control.main.in).
+ * ppc64el: add build-dep on libnuma-dev (templates/control.source.in).
+
+ -- Mauricio Faria de Oliveira <mauri...@linux.vnet.ibm.com> Tue, 08 Jul 2014
14:41:13 -0300
+
linux-tools (3.14-1) unstable; urgency=medium
* New upstream release
diff -Nru linux-tools-3.14/debian/rules.real linux-tools-3.14/debian/rules.real
--- linux-tools-3.14/debian/rules.real 2013-10-18 21:12:53.000000000 -0300
+++ linux-tools-3.14/debian/rules.real 2014-07-08 14:45:31.000000000 -0300
@@ -9,7 +9,7 @@
VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version:
*\(.*\)$$,\1,p')
binary-arch: install-kbuild install-usbip
-ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4
sparc sparc64,$(DEB_BUILD_ARCH)),)
+ifneq ($(filter alpha amd64 armel armhf hppa i386 powerpc ppc64 ppc64el s390
s390x sh4 sparc sparc64,$(DEB_BUILD_ARCH)),)
binary-arch: install-tools
endif
diff -Nru linux-tools-3.14/debian/templates/control.main.in
linux-tools-3.14/debian/templates/control.main.in
--- linux-tools-3.14/debian/templates/control.main.in 2013-09-24
21:18:33.000000000 -0300
+++ linux-tools-3.14/debian/templates/control.main.in 2014-07-08
14:31:14.000000000 -0300
@@ -7,7 +7,7 @@
Package: linux-tools-@version@
Section: devel
-Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 s390 s390x sh4
sparc sparc64
+Architecture: alpha amd64 armel armhf hppa i386 powerpc ppc64 ppc64el s390
s390x sh4 sparc sparc64
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python:Depends}
Recommends: linux-base (>= 3.4~)
Suggests: linux-doc-@version@
diff -Nru linux-tools-3.14/debian/templates/control.source.in
linux-tools-3.14/debian/templates/control.source.in
--- linux-tools-3.14/debian/templates/control.source.in 2014-02-02
13:57:15.000000000 -0200
+++ linux-tools-3.14/debian/templates/control.source.in 2014-07-08
14:31:37.000000000 -0300
@@ -6,7 +6,7 @@
Standards-Version: 3.9.4
Build-Depends:
debhelper (>> 7), python,
- asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev |
binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386
powerpc ppc64], libperl-dev, libunwind8-dev [amd64 i386], python-dev, xmlto,
+ asciidoc, bison, flex, libaudit-dev, libdw-dev, libelf-dev, libiberty-dev |
binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 i386
powerpc ppc64 ppc64el], libperl-dev, libunwind8-dev [amd64 i386], python-dev,
xmlto,
autoconf, automake, libtool, libglib2.0-dev, libsysfs-dev, libwrap0-dev
Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/
Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/