Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487254 - sys-firmware/ipxe-1.0.0_p20130624 fails to build while using hardened gcc-4.8.1-r2
Summary: sys-firmware/ipxe-1.0.0_p20130624 fails to build while using hardened gcc-4.8...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-07 23:12 UTC by Victor Roman Archidona
Modified: 2014-01-02 14:00 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ipxe-1.0.0_p20130624-remove-ebp-from-clobber.patch (ipxe-1.0.0_p20130624-remove-ebp-from-clobber.patch,11.60 KB, patch)
2013-10-07 23:13 UTC, Victor Roman Archidona
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Roman Archidona 2013-10-07 23:12:45 UTC
While building IPXE (qemu requisite) using sys-devel/gcc-4.8.1-r2 with hardened USE flag enabled, I got the following message:

[snip]
arch/i386/image/elfboot.c: In function ‘elfboot_exec’:
arch/i386/image/elfboot.c:74:1: error: bp cannot be used in asm here
 }
 ^
arch/i386/image/elfboot.c:74:1: error: bp cannot be used in asm here
make: *** [bin/elfboot.o] Error 1
arch/i386/image/bootsector.c: In function ‘call_bootsector’:
arch/i386/image/bootsector.c:128:1: error: bp cannot be used in asm here
 }
 ^
make: *** [bin/bootsector.o] Error 1
[snip]

This is caused due GCC isn't allowing to use BP/EBP in the clobber list, complaining about that.

I wrote a patch and sent upstream, it got merged into their git repository here:

https://git.ipxe.org/ipxe.git/commitdiff/cba22d36b77da53890bd65fdadd0e63925687af0

As upstream has not released any new version which fixes the issue for now, a new "sys-firmware/ipxe-1.0.0_p20130624-r1" ebuild which patches the source with upstrem patch.


Reproducible: Always

Steps to Reproduce:
1. switch to hardened gcc 4.8.2-r1
2. emerge ipxe
Comment 1 Victor Roman Archidona 2013-10-07 23:13:06 UTC
Created attachment 360364 [details, diff]
ipxe-1.0.0_p20130624-remove-ebp-from-clobber.patch
Comment 2 Michael Rowell 2013-10-18 17:33:28 UTC
(In reply to Victor Roman Archidona from comment #1)
> Created attachment 360364 [details, diff] [details, diff]
> ipxe-1.0.0_p20130624-remove-ebp-from-clobber.patch

ipxe-1.0.0_p20130624-r1 from funtoo-overlay (which implements the patch) on hardened profile with gcc-4.8.1-r1 (from main gentoo overlay) builds successfully. Not sure if it runs correctly yet.
Comment 3 Hugo Mildenberger 2013-11-04 09:15:09 UTC
(In reply to Victor Roman Archidona from comment #1)
> Created attachment 360364 [details, diff] [details, diff]
> ipxe-1.0.0_p20130624-remove-ebp-from-clobber.patch

--^
This patch does not to match the sources of ipxe-1.0.0_p20130624.ebuild. The patch from the ipxe repository (as referenced in comment #1) however does, and the build succeeds using gcc-4.8.1-r1 on hardened.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2013-11-07 15:48:49 UTC
Bumped the version in tree. Thanks for the report.