From ed02143be59412b922ef1fa945479e4277df5de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 26 Feb 2018 14:15:37 +0100 Subject: [PATCH] - fix firmware build (#1545784) --- opal-prd.spec | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/opal-prd.spec b/opal-prd.spec index 242b24a..3ca6aef 100644 --- a/opal-prd.spec +++ b/opal-prd.spec @@ -1,9 +1,6 @@ -# required for the cross-compiled skiboot firmware -%undefine _annotated_build - Name: opal-prd Version: 5.9.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: OPAL Processor Recovery Diagnostics Daemon Group: System Environment/Daemons @@ -14,7 +11,9 @@ URL: http://github.com/open-power/skiboot ExclusiveArch: ppc64le BuildRequires: systemd +%if 0%{?fedora} BuildRequires: gcc-powerpc64-linux-gnu +%endif BuildRequires: openssl-devel Requires(post): systemd @@ -59,9 +58,14 @@ OPAL_PRD_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/opal-prd GARD_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/gard PFLASH_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/pflash XSCOM_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/xscom-utils -# filter out unsupported flag -%global optflags %(echo %{optflags} | sed 's/-fstack-clash-protection//') -SKIBOOT_VERSION=%{version} make V=1 CROSS="powerpc64-linux-gnu-" CFLAGS="%{optflags}" + +# build skiboot with a cross-compiler on Fedora and with system compiler otherwise +# and always use upstream compiler flags for the firmware (no CFLAGS override) +%if 0%{?fedora} +SKIBOOT_VERSION=%{version} make V=1 CROSS="powerpc64-linux-gnu-" +%else +SKIBOOT_VERSION=%{version} make V=1 CROSS= +%endif %install make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr @@ -107,6 +111,9 @@ install -m 644 -p skiboot.lid.xz %{buildroot}%{_datadir}/qemu/skiboot.lid.xz %{_datadir}/qemu/ %changelog +* Mon Feb 26 2018 Dan HorĂ¡k - 5.9.8-3 +- fix firmware build (#1545784) + * Thu Feb 08 2018 Fedora Release Engineering - 5.9.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild