From 42e70a96d5cea9fc5710ee997605df10ccb05353 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: May 17 2013 09:27:48 +0000 Subject: Fix build with GCC 4.8 (rhbz #914091) --- 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 - 20130103-3.git717279a +- Fix build with GCC 4.8 (rhbz #914091) + * Thu Feb 14 2013 Fedora Release Engineering - 20130103-2.git717279a - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild