From 4c9532d2f6d3ac954c881bc83d3b49de7625c17c Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Aug 17 2017 20:13:50 +0000 Subject: Actually fix the configure usage and the gcc -E weirdness. Signed-off-by: Peter Jones --- diff --git a/grub.macros b/grub.macros index a49208b..b4c1877 100644 --- a/grub.macros +++ b/grub.macros @@ -6,7 +6,6 @@ %{expand:%%{!?buildsubdir:%%global buildsubdir grub-%{tarversion}}} %{expand:%%{!?_licensedir:%%global license %%%%doc}} -%global _configure_gnuconfig_hack 0 %if %{?_with_ccache: 1}%{?!_with_ccache: 0} %global cc_equals CC=/usr/%{_lib}/ccache/gcc @@ -275,6 +274,7 @@ makeinfo --html --no-split -I docs -o docs/grub.html \\\ %configure \\\ %{cc_equals} \\\ CFLAGS="%{2} -I$(pwd)" \\\ + CPPFLAGS="${CPPFLAGS} -I$(pwd)" \\\ TARGET_LDFLAGS=-static \\\ --with-platform=efi \\\ --target=%{1} \\\ diff --git a/grub2.spec b/grub2.spec index 8c39b83..a3c6d02 100644 --- a/grub2.spec +++ b/grub2.spec @@ -2,6 +2,7 @@ %global tarversion 2.02 %undefine _missing_build_ids_terminate_build +%global _configure_gnuconfig_hack 0 Name: grub2 Epoch: 1 @@ -41,25 +42,6 @@ BuildRequires: ncurses-devel xz-devel bzip2-devel BuildRequires: freetype-devel libusb-devel BuildRequires: rpm-devel BuildRequires: rpm-devel rpm-libs -%ifarch %{sparc} aarch64 ppc64le -# sparc builds need 64 bit glibc-devel - also for 32 bit userland -BuildRequires: /usr/lib64/crt1.o glibc-static -%else -%ifarch x86_64 -BuildRequires: /usr/lib64/crt1.o glibc-static(x86-64) glibc-devel(x86-64) -# glibc32 is what will be in the buildroots, but glibc-static(x86-32) is what -# will be in an epel-7 (i.e. centos) mock root. I think. -%if 0%{?centos}%{?mock} -BuildRequires: /usr/lib/crt1.o glibc-static(x86-32) glibc-devel(x86-32) -%else -BuildRequires: /usr/lib/crt1.o glibc32 -#BuildRequires: /usr/lib/crt1.o glibc-static(x86-32) -%endif -%else -# ppc64 builds need the ppc crt1.o -BuildRequires: /usr/lib/crt1.o glibc-static glibc-devel -%endif -%endif BuildRequires: autoconf automake autogen device-mapper-devel BuildRequires: freetype-devel gettext-devel git BuildRequires: texinfo @@ -197,11 +179,6 @@ This subpackage provides tools for support of all platforms. %{expand:%do_legacy_build %%{grublegacyarch}} %endif %do_common_build -%ifnarch x86_64 -rm -vf %{_bindir}/%{name}-render-label %{_sbindir}/%{name}-bios-setup %{_sbindir}/%{name}-macbless -%endif - - %install set -e @@ -219,6 +196,11 @@ rm -fr $RPM_BUILD_ROOT %endif ${RPM_BUILD_ROOT}/%{_bindir}/%{name}-editenv ${RPM_BUILD_ROOT}/boot/efi/EFI/%{efidir}/grubenv create rm -f $RPM_BUILD_ROOT%{_infodir}/dir +%ifnarch x86_64 +rm -vf ${RPM_BUILD_ROOT}/%{_bindir}/%{name}-render-label +rm -vf ${RPM_BUILD_ROOT}/%{_sbindir}/%{name}-bios-setup +rm -vf ${RPM_BUILD_ROOT}/%{_sbindir}/%{name}-macbless +%endif %find_lang grub