From 9bb9d2c66d42e733dd32e98ad6cf28f046ae615d7cee65092a0d848b5052ae15 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 30 Dec 2011 07:45:41 +0000 Subject: [PATCH] Accepting request 98401 from devel:openSUSE:Factory 1. set --target=%{_target_plaform) explicitly to %configure in case it wouldn't do that for us implicitly 2. when making x86_64-efi image not use i386 target build and keep use of x86_64. otherwise it would have error "invalid ELF header" (forwarded request 98397 from michael-chang) OBS-URL: https://build.opensuse.org/request/show/98401 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=27 --- grub2.changes | 8 ++++++++ grub2.spec | 13 ++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/grub2.changes b/grub2.changes index 1b9f86a..ed0cbaa 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Dec 29 02:31:23 UTC 2011 - mchang@suse.com + +- set --target=%{_target_plaform) explicitly to %configure in case + it wouldn't do that for us implicitly +- when making x86_64-efi image not use i386 target build and keep + use of x86_64. otherwise it would have error "invalid ELF header" + ------------------------------------------------------------------- Fri Dec 2 16:31:14 UTC 2011 - coolo@suse.com diff --git a/grub2.spec b/grub2.spec index 80d4d95..44a2e18 100644 --- a/grub2.spec +++ b/grub2.spec @@ -44,11 +44,6 @@ BuildRequires: xz # Modules always contain just 32-bit code %define _libdir %{_exec_prefix}/lib -# 64-bit x86-64 machines use 32-bit boot loader -# (We cannot just redefine _target_cpu, as we'd get i386.rpm packages then) -%ifarch x86_64 -%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu} -%endif %ifarch ppc ppc64 %define platform ieee1275 %else @@ -149,6 +144,7 @@ FFLAGS=" " export CFLAGS CXXFLAGS FFLAGS %configure \ TARGET_LDFLAGS=-static \ + --target=%{_target_platform} \ --with-platform=efi \ --program-transform-name=s,grub,%{name}-efi, make %{?_smp_mflags} @@ -171,9 +167,16 @@ CXXFLAGS=" " FFLAGS=" " export CFLAGS CXXFLAGS FFLAGS +# 64-bit x86-64 machines use 32-bit boot loader +# (We cannot just redefine _target_cpu, as we'd get i386.rpm packages then) +%ifarch x86_64 +%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu} +%endif + # -static is needed so that autoconf script is able to link # test that looks for _start symbol on 64 bit platforms %configure TARGET_LDFLAGS=-static \ + --target=%{_target_platform} \ --with-platform=%{platform} \ --enable-grub-emu-usb \ --program-transform-name=s,grub,%{name},