Merge lp:~yolanda.robla/ubuntu/saucy/ipxe/ftbfs into lp:ubuntu/saucy/ipxe

Proposed by Yolanda Robla
Status: Merged
Merge reported by: James Page
Merged at revision: not available
Proposed branch: lp:~yolanda.robla/ubuntu/saucy/ipxe/ftbfs
Merge into: lp:ubuntu/saucy/ipxe
Diff against target: 76 lines (+56/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/fix-bp-bug.patch (+49/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~yolanda.robla/ubuntu/saucy/ipxe/ftbfs
Reviewer Review Type Date Requested Status
James Page Approve
Ubuntu branches Pending
Review via email: mp+171754@code.launchpad.net

Description of the change

Fix FTBFS (LP: #1194914)

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Hi Yolanda

Thanks for preparing this fix.

I'm assuming that the patch comes from https://github.com/ipxe/ipxe/commit/238050dfd46e3c4a87329da1d48b4d8dde5af8a1; if so please can you annotate the patch using dep-3 headers so the origin of the patch is clear.

alternatively leave the headers from https://github.com/ipxe/ipxe/commit/238050dfd46e3c4a87329da1d48b4d8dde5af8a1.patch intact and just refresh the patch itself for the version in Ubuntu.

Thanks

James

review: Needs Fixing
17. By Yolanda Robla

refreshed patch

Revision history for this message
Yolanda Robla (yolanda.robla) wrote :

added dep-3- headers, recheck

Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-11-20 16:08:21 +0000
3+++ debian/changelog 2013-07-02 15:31:27 +0000
4@@ -1,3 +1,9 @@
5+ipxe (1.0.0+git-4.d6b0b76-0ubuntu3) saucy; urgency=low
6+
7+ * debian/patches/fix-bp-bug.patch: fixes FTBFS (LP: #1194914)
8+
9+ -- Yolanda Robla <yolanda.robla@canonical.com> Thu, 27 Jun 2013 11:22:43 +0200
10+
11 ipxe (1.0.0+git-4.d6b0b76-0ubuntu2) raring; urgency=low
12
13 * d/control: Add ipxe-qemu virtual package for use with qemu.
14
15=== added file 'debian/patches/fix-bp-bug.patch'
16--- debian/patches/fix-bp-bug.patch 1970-01-01 00:00:00 +0000
17+++ debian/patches/fix-bp-bug.patch 2013-07-02 15:31:27 +0000
18@@ -0,0 +1,49 @@
19+From 238050dfd46e3c4a87329da1d48b4d8dde5af8a1 Mon Sep 17 00:00:00 2001
20+From: Michael Brown <mcb30@ipxe.org>
21+Date: Fri, 7 Jun 2013 13:46:27 +0100
22+Subject: [PATCH] [build] Work around bug in gcc >= 4.8
23+
24+gcc 4.8 and 4.9 fail to compile pxe_call.c with the error "bp cannot
25+be used in asm here". Other points in the codebase which use "ebp" in
26+the asm clobber list do not seem to be affected.
27+
28+Unfortunately gcc provides no way to specify %ebp as an output
29+register, so we cannot use this as a workaround. The only viable
30+solution is to explicitly push/pop %ebp within the asm itself. This
31+is ugly for two reasons: firstly, it may be unnecessary; secondly, it
32+may cause gcc to generate invalid %esp-relative addresses if the asm
33+happens to use memory operands. This specific block of asm uses no
34+memory operands and so will not generate invalid code.
35+
36+Reported-by: Daniel P. Berrange <berrange@redhat.com>
37+Reported-by: Christian Hesse <list@eworm.de>
38+Originally-fixed-by: Christian Hesse <list@eworm.de>
39+Signed-off-by: Michael Brown <mcb30@ipxe.org>
40+--- a/src/arch/i386/interface/pxe/pxe_call.c 2013-06-26 13:05:23.311155000 +0000
41++++ b/src/arch/i386/interface/pxe/pxe_call.c 2013-06-26 13:05:23.311155000 +0000
42+@@ -265,12 +265,14 @@
43+ DBG ( "Restarting NBP (%x)\n", jmp );
44+
45+ /* Far call to PXE NBP */
46+- __asm__ __volatile__ ( REAL_CODE ( "movw %%cx, %%es\n\t"
47++ __asm__ __volatile__ ( REAL_CODE ( "pushl %%ebp\n\t" /* gcc bug */
48++ "movw %%cx, %%es\n\t"
49+ "pushw %%es\n\t"
50+ "pushw %%di\n\t"
51+ "sti\n\t"
52+ "lcall $0, $0x7c00\n\t"
53+- "addw $4, %%sp\n\t" )
54++ "popl %%ebp\n\t" /* discard */
55++ "popl %%ebp\n\t" /* gcc bug */ )
56+ : "=a" ( rc ), "=b" ( discard_b ),
57+ "=c" ( discard_c ), "=d" ( discard_d ),
58+ "=D" ( discard_D )
59+@@ -278,7 +280,7 @@
60+ "c" ( rm_cs ),
61+ "d" ( virt_to_phys ( &pxenv ) ),
62+ "D" ( __from_text16 ( &ppxe ) )
63+- : "esi", "ebp", "memory" );
64++ : "esi", "memory" );
65+
66+ return rc;
67+ }
68
69=== modified file 'debian/patches/series'
70--- debian/patches/series 2012-11-14 15:47:31 +0000
71+++ debian/patches/series 2013-07-02 15:31:27 +0000
72@@ -4,3 +4,4 @@
73 rom-set-banner-timeout-0.diff
74 qemu-target-fix-names.diff
75 enable-https.patch
76+fix-bp-bug.patch

Subscribers

People subscribed via source and target branches

to all changes: