debian/rules.d/tools/perf/Makefile: Use KERNEL_ARCH variable
Currently we replicate the mapping of Debian architectures to kernel source architectures here. Use the KERNEL_ARCH variable that is now passed down by rules.real. We still need to check whether perf is supported on the architecture, though.
This commit is contained in:
parent
1446e940ce
commit
1ce0efc405
|
@ -4,6 +4,7 @@ linux (4.17.6-2) UNRELEASED; urgency=medium
|
||||||
* debian/control: Fix arch/profile qualifications for libelf-dev
|
* debian/control: Fix arch/profile qualifications for libelf-dev
|
||||||
build-dependency
|
build-dependency
|
||||||
* debian/rules.real: Pass KERNEL_ARCH variable down to debian/rules.d
|
* debian/rules.real: Pass KERNEL_ARCH variable down to debian/rules.d
|
||||||
|
* debian/rules.d/tools/perf/Makefile: Use KERNEL_ARCH variable
|
||||||
|
|
||||||
-- Ben Hutchings <ben@decadent.org.uk> Thu, 12 Jul 2018 15:16:15 +0100
|
-- Ben Hutchings <ben@decadent.org.uk> Thu, 12 Jul 2018 15:16:15 +0100
|
||||||
|
|
||||||
|
|
|
@ -2,37 +2,21 @@ include $(top_rulesdir)/Makefile.inc
|
||||||
|
|
||||||
ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)
|
ifeq ($(filter nopython,$(DEB_BUILD_PROFILES)),)
|
||||||
|
|
||||||
DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
ifneq ($(filter alpha arm arm64 mips parisc s390 sh sparc,$(KERNEL_ARCH)),)
|
||||||
|
HAVE_PERF := 1
|
||||||
ifeq ($(DEB_HOST_ARCH_CPU),alpha)
|
else ifeq ($(KERNEL_ARCH),powerpc)
|
||||||
KERNEL_ARCH_PERF = alpha
|
# Pure 32-bit toolchains currently don't work
|
||||||
else ifeq ($(DEB_HOST_ARCH_CPU),arm)
|
|
||||||
KERNEL_ARCH_PERF = arm
|
|
||||||
else ifeq ($(DEB_HOST_ARCH_CPU),arm64)
|
|
||||||
KERNEL_ARCH_PERF = arm64
|
|
||||||
else ifneq ($(filter mips%,$(DEB_HOST_ARCH_CPU)),)
|
|
||||||
KERNEL_ARCH_PERF = mips
|
|
||||||
else ifeq ($(DEB_HOST_ARCH_CPU),hppa)
|
|
||||||
KERNEL_ARCH_PERF = parisc
|
|
||||||
else ifneq ($(filter powerpc% ppc%,$(DEB_HOST_ARCH_CPU)),)
|
|
||||||
# But pure 32-bit toolchains currently don't work
|
|
||||||
ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),powerpcspe)
|
ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),powerpcspe)
|
||||||
KERNEL_ARCH_PERF = powerpc
|
HAVE_PERF := 1
|
||||||
endif
|
endif
|
||||||
else ifneq ($(filter s390%,$(DEB_HOST_ARCH_CPU)),)
|
else ifeq ($(KERNEL_ARCH),x86)
|
||||||
KERNEL_ARCH_PERF = s390
|
# x32 isn't supported yet
|
||||||
else ifeq ($(DEB_HOST_ARCH_CPU),sh4)
|
|
||||||
KERNEL_ARCH_PERF = sh
|
|
||||||
else ifneq ($(filter sparc%,$(DEB_HOST_ARCH_CPU)),)
|
|
||||||
KERNEL_ARCH_PERF = sparc
|
|
||||||
else ifneq ($(filter amd64 i386,$(DEB_HOST_ARCH_CPU)),)
|
|
||||||
# But x32 isn't supported yet
|
|
||||||
ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),x32)
|
ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),x32)
|
||||||
KERNEL_ARCH_PERF = x86
|
HAVE_PERF := 1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MAKE_PERF := $(MAKE) O=$(CURDIR) prefix=/usr V=1 ARCH=$(KERNEL_ARCH_PERF) EXTRA_WARNINGS=-Wno-error EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)'
|
MAKE_PERF := $(MAKE) O=$(CURDIR) prefix=/usr V=1 ARCH=$(KERNEL_ARCH) EXTRA_WARNINGS=-Wno-error EXTRA_CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)'
|
||||||
|
|
||||||
# Disable Gtk UI until it's more usable
|
# Disable Gtk UI until it's more usable
|
||||||
MAKE_PERF += NO_GTK2=1
|
MAKE_PERF += NO_GTK2=1
|
||||||
|
@ -55,7 +39,7 @@ MAKE_PERF += NO_LIBCRYPTO=1
|
||||||
MAKE_PERF += LIBBABELTRACE=1
|
MAKE_PERF += LIBBABELTRACE=1
|
||||||
|
|
||||||
all:
|
all:
|
||||||
ifdef KERNEL_ARCH_PERF
|
ifdef HAVE_PERF
|
||||||
# perf changes some default directories depending on whether DESTDIR is
|
# perf changes some default directories depending on whether DESTDIR is
|
||||||
# set. We must define it even when building to avoid a rebuild when we
|
# set. We must define it even when building to avoid a rebuild when we
|
||||||
# run 'make install'.
|
# run 'make install'.
|
||||||
|
@ -71,7 +55,7 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install:
|
install:
|
||||||
ifdef KERNEL_ARCH_PERF
|
ifdef HAVE_PERF
|
||||||
+$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf install VERSION=$(VERSION)
|
+$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf install VERSION=$(VERSION)
|
||||||
# Don't install a 'trace' alias yet:
|
# Don't install a 'trace' alias yet:
|
||||||
# - We need a wrapper for it anyway, so there's little point adding a
|
# - We need a wrapper for it anyway, so there's little point adding a
|
||||||
|
|
Loading…
Reference in New Issue