crash-trace-command/crash-trace-command.spec
HATAYAMA Daisuke 36ab175159 Makefile: fix build failure on aarch64 and ppc64le
commit 17c35d075f067d80fee112ae18365b8defa2ca5a (HEAD -> devel, origin/devel)
    Author: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
    Date:   Fri Feb 19 11:38:59 2021 +0900

	Makefile: fix build failure on aarch64 and ppc64le

	Currently, there is build failure on aarch64 and ppc64le as follows:

	    gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -Wall -I/usr/include/crash -nostartfiles -shared -rdynamic -o trace.so trace.c -fPIC -D
	    gcc: error: macro name missing after '-D'

	The failure is caused by missing arguments for -D option because
	TARGET variable is empty.

	This commit fixes the issue by defining TARGET variable properly
	according to aarch64 and ppc64le.

	Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>

Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
2021-02-19 17:12:12 +09:00

42 lines
1.1 KiB
RPMSpec

%global reponame crash-trace
Summary: Trace extension module for the crash utility
Name: crash-trace-command
Version: 3.0
Release: 1%{?dist}
License: GPLv2
Source: https://github.com/fujitsu/crash-trace/archive/v%{version}/%{name}-%{version}.tar.gz
URL: https://github.com/fujitsu/crash-trace
ExclusiveOS: Linux
ExclusiveArch: aarch64 ppc64le s390x x86_64
BuildRequires: crash-devel >= 7.2.0-2
BuildRequires: gcc
Requires: trace-cmd
Requires: crash >= 7.2.0-2
Patch0001: 0001-Makefile-set-DT_SONAME-to-trace.so.patch
Patch0002: 0002-Makefile-fix-build-failure-on-aarch64-and-ppc64le.patch
%description
Command for reading ftrace data from a dump file.
%prep
%autosetup -n %{reponame}-%{version}
%build
%make_build
%install
install -m 0755 -d %{buildroot}%{_libdir}/crash/extensions
install -m 0755 -t %{buildroot}%{_libdir}/crash/extensions %{_builddir}/%{reponame}-%{version}/trace.so
%files
%dir %{_libdir}/crash
%dir %{_libdir}/crash/extensions
%{_libdir}/crash/extensions/trace.so
%license COPYING
%changelog
* Fri Jan 22 2021 HATAYAMA Daisuke <d.hatayama@fujitsu.com> - 3.0-1
- Initial crash-trace-command package