[ipxe] Fix build with GCC 4.8 (rhbz #914091)
Daniel P. Berrange
berrange at fedoraproject.org
Fri May 17 09:28:02 UTC 2013
commit 42e70a96d5cea9fc5710ee997605df10ccb05353
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Fri May 17 10:27:48 2013 +0100
Fix build with GCC 4.8 (rhbz #914091)
ipxe-asm.patch | 30 ++++++++++++++++++++++++++++++
ipxe.spec | 9 ++++++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/ipxe-asm.patch b/ipxe-asm.patch
new file mode 100644
index 0000000..f4b2a0d
--- /dev/null
+++ b/ipxe-asm.patch
@@ -0,0 +1,30 @@
+diff --git a/src/arch/i386/interface/pxe/pxe_call.c b/src/arch/i386/interface/pxe/pxe_call.c
+index b8e73a0..5f8ed07 100644
+--- a/src/arch/i386/interface/pxe/pxe_call.c
++++ b/src/arch/i386/interface/pxe/pxe_call.c
+@@ -265,12 +265,14 @@ int pxe_start_nbp ( void ) {
+ DBG ( "Restarting NBP (%x)\n", jmp );
+
+ /* Far call to PXE NBP */
+- __asm__ __volatile__ ( REAL_CODE ( "movw %%cx, %%es\n\t"
++ __asm__ __volatile__ ( REAL_CODE ( "pushl %%ebp\n\t"
++ "movw %%cx, %%es\n\t"
+ "pushw %%es\n\t"
+ "pushw %%di\n\t"
+ "sti\n\t"
+ "lcall $0, $0x7c00\n\t"
+- "addw $4, %%sp\n\t" )
++ "addw $4, %%sp\n\t"
++ "popl %%ebp\n\t" )
+ : "=a" ( rc ), "=b" ( discard_b ),
+ "=c" ( discard_c ), "=d" ( discard_d ),
+ "=D" ( discard_D )
+@@ -278,7 +280,7 @@ int pxe_start_nbp ( void ) {
+ "c" ( rm_cs ),
+ "d" ( virt_to_phys ( &pxenv ) ),
+ "D" ( __from_text16 ( &ppxe ) )
+- : "esi", "ebp", "memory" );
++ : "esi", "memory" );
+
+ return rc;
+ }
diff --git a/ipxe.spec b/ipxe.spec
index b1334c4..66ea7c0 100644
--- a/ipxe.spec
+++ b/ipxe.spec
@@ -36,7 +36,7 @@
Name: ipxe
Version: %{date}
-Release: 2.git%{hash}%{?dist}
+Release: 3.git%{hash}%{?dist}
Summary: A network boot loader
Group: System Environment/Base
@@ -49,6 +49,9 @@ Source1: USAGE
# go upstream. Modifying the general config header file is the
# intended means for downstream customization.
Patch1: %{name}-banner-timeout.patch
+# GCC >= 4.8 doesn't like the use of 'ebp' in asm
+# https://bugzilla.redhat.com/show_bug.cgi?id=914091
+Patch2: %{name}-asm.patch
%ifarch %{buildarches}
BuildRequires: perl
@@ -109,6 +112,7 @@ DNS, HTTP, iSCSI, etc.
%prep
%setup -q -n %{name}-%{version}-git%{hash}
%patch1 -p1
+%patch2 -p1
cp -a %{SOURCE1} .
%build
@@ -177,6 +181,9 @@ done
%endif
%changelog
+* Fri May 17 2013 Daniel P. Berrange <berrange at redhat.com> - 20130103-3.git717279a
+- Fix build with GCC 4.8 (rhbz #914091)
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 20130103-2.git717279a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list