SHA256
1
0
forked from pool/grub2

Accepting request 77679 from devel:openSUSE:Factory

Enable ppc build (forwarded request 77673 from k0da)

OBS-URL: https://build.opensuse.org/request/show/77679
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=18
This commit is contained in:
Sascha Peilicke 2011-08-02 14:45:10 +00:00 committed by Git OBS Bridge
parent 5d40a90431
commit 213436e0da
3 changed files with 51 additions and 4 deletions

26
grub2-unused.patch Normal file
View File

@ -0,0 +1,26 @@
From 8b424dd42b64453e50a49a4c6fc455584f931b46 Mon Sep 17 00:00:00 2001
From: Fedora Ninjas <pjones@fedoraproject.org>
Date: Thu, 23 Jun 2011 00:08:03 +0400
Subject: [PATCH] Workaround for 'variable set but not used' issue
Signed-off-by: Fedora Ninjas <pjones@fedoraproject.org>
---
grub-core/lib/relocator.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/grub-core/lib/relocator.c b/grub-core/lib/relocator.c
index dbd5fe4..606b545 100644
--- a/grub-core/lib/relocator.c
+++ b/grub-core/lib/relocator.c
@@ -1010,6 +1010,9 @@ malloc_in_range (struct grub_relocator *rel,
= ALIGN_UP (alloc_end,
GRUB_RELOCATOR_FIRMWARE_REQUESTS_QUANT);
+ grub_dprintf ("relocator", "requesting %lx-%lx\n",
+ (unsigned long) fstart,
+ (unsigned long) fend);
#if GRUB_RELOCATOR_HAVE_LEFTOVERS
{
struct grub_relocator_fw_leftover *lo1 = NULL;
--
1.7.5.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 2 12:10:39 UTC 2011 - dvaleev@novell.com
- enable ppc build
- patch unused-but-set-variable
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 12 14:03:05 UTC 2011 - aj@suse.de Tue Jul 12 14:03:05 UTC 2011 - aj@suse.de

View File

@ -18,7 +18,7 @@
Name: grub2 Name: grub2
%ifarch x86_64 %ifarch x86_64 ppc64
BuildRequires: freetype2-devel-32bit gcc-32bit glibc-32bit glibc-devel-32bit BuildRequires: freetype2-devel-32bit gcc-32bit glibc-32bit glibc-devel-32bit
BuildRequires: libncurses5-32bit libusb-1_0-devel-32bit ncurses-devel-32bit BuildRequires: libncurses5-32bit libusb-1_0-devel-32bit ncurses-devel-32bit
%else %else
@ -35,6 +35,11 @@ BuildRequires: bison device-mapper-devel flex lzma ruby xz
%ifarch x86_64 %ifarch x86_64
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu} %define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
%endif %endif
%ifarch ppc ppc64
%define platform ieee1275
%else
%define platform pc
%endif
Version: 1.99 Version: 1.99
Release: 2 Release: 2
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
@ -52,6 +57,7 @@ Patch0: gcc46-fixes.patch
Patch2: grub2-linux.patch Patch2: grub2-linux.patch
Patch3: gccwarn.patch Patch3: gccwarn.patch
Patch4: grub2-linux-submenu.patch Patch4: grub2-linux-submenu.patch
Patch5: grub2-unused.patch
PreReq: perl-Bootloader PreReq: perl-Bootloader
Requires: gettext-runtime Requires: gettext-runtime
Requires(post): /sbin/install-info Requires(post): /sbin/install-info
@ -60,7 +66,8 @@ Requires(preun):/sbin/install-info
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
# TODO: ppc # TODO: ppc
ExclusiveArch: %{ix86} x86_64 ExclusiveArch: %{ix86} x86_64 ppc ppc64
%description %description
This is the second version of the GRUB (Grand Unified Bootloader), This is the second version of the GRUB (Grand Unified Bootloader),
@ -83,10 +90,12 @@ sed -i 's,grub.texi,grub2.texi,' docs/Makefile.am
%patch2 -p0 %patch2 -p0
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1
# README.openSUSE # README.openSUSE
cp %{SOURCE3} . cp %{SOURCE3} .
%build %build
#./autogen.sh #./autogen.sh
@ -99,12 +108,13 @@ export CFLAGS CXXFLAGS FFLAGS
# -static is needed so that autoconf script is able to link # -static is needed so that autoconf script is able to link
# test that looks for _start symbol on 64 bit platforms # test that looks for _start symbol on 64 bit platforms
%configure TARGET_LDFLAGS=-static \ %configure TARGET_LDFLAGS=-static \
--with-platform=pc \ --with-platform=%{platform} \
--enable-grub-emu-usb \ --enable-grub-emu-usb \
--program-transform-name=s,grub,%{name}, --program-transform-name=s,grub,%{name},
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
@ -123,6 +133,7 @@ rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*/*.h
install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub
%find_lang grub %find_lang grub
%post %post
/sbin/install-info %{_infodir}/grub-dev.info %{_infodir}/dir || : /sbin/install-info %{_infodir}/grub-dev.info %{_infodir}/dir || :
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
@ -146,6 +157,7 @@ if [ -e /boot/%{name}/device.map ]; then
/sbin/update-bootloader --refresh || true /sbin/update-bootloader --refresh || true
fi fi
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/grub-dev.info %{_infodir}/dir || : /sbin/install-info --delete %{_infodir}/grub-dev.info %{_infodir}/dir || :
@ -162,6 +174,7 @@ if [ $1 = 0 ]; then
rm -f /boot/%{name}/device.map rm -f /boot/%{name}/device.map
fi fi
%files -f grub.lang %files -f grub.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/%{name} %{_libdir}/%{name}
@ -182,4 +195,6 @@ fi
%{_infodir}/grub-dev.info* %{_infodir}/grub-dev.info*
%{_infodir}/%{name}.info* %{_infodir}/%{name}.info*
%changelog %changelog