Package: gnu-efi Version: 3.0u+debian-4 Severity: minor Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu utopic ubuntu-patch
Hi Daniel, Please consider the attached patch to make gnu-efi compatible with compilers earlier than gcc 4.7. When -DGNU_EFI_USE_MS_ABI is set, the current gnu-efi code relies on using __attribute__((ms_abi)), which was introduced in gcc 4.7, and aborts with older compilers. This used to work with older compilers, just without compile-time type checking; and it's useful to continue to support this. This patch was applied in Ubuntu to enable building gnu-efi 3.0u against older releases (such as Ubuntu 12.04). It is perhaps less useful in Debian, since wheezy already had gcc 4.7 as the default on amd64 and i386, but I think it's still a correct patch (and should ultimately be included upstream). If you prefer not to apply this delta in Debian, please let me know and I'll try to push it upstream instead. Thanks, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru gnu-efi-3.0u+debian/debian/changelog gnu-efi-3.0u+debian/debian/changelog diff -Nru gnu-efi-3.0u+debian/debian/patches/gcc46-compatibility gnu-efi-3.0u+debian/debian/patches/gcc46-compatibility --- gnu-efi-3.0u+debian/debian/patches/gcc46-compatibility 1969-12-31 16:00:00.000000000 -0800 +++ gnu-efi-3.0u+debian/debian/patches/gcc46-compatibility 2013-09-23 23:41:24.000000000 -0700 @@ -0,0 +1,20 @@ +Description: don't break with old compilers and -DGNU_EFI_USE_MS_ABI + It's entirely legitimate to request GNU_EFI_USE_MS_ABI even if the current + compiler doesn't support it, and gnu-efi should transparently fall back to + using legacy techniques to set the calling convention. We don't get type + checking, but at least it will still compile. +Author: Steve Langasek <steve.langa...@ubuntu.com> + +Index: trunk/inc/x86_64/efibind.h +=================================================================== +--- trunk.orig/inc/x86_64/efibind.h ++++ trunk/inc/x86_64/efibind.h +@@ -25,8 +25,6 @@ + #if defined(GNU_EFI_USE_MS_ABI) + #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) + #define HAVE_USE_MS_ABI 1 +- #else +- #error Compiler is too old for GNU_EFI_USE_MS_ABI + #endif + #endif + diff -Nru gnu-efi-3.0u+debian/debian/patches/series gnu-efi-3.0u+debian/debian/patches/series --- gnu-efi-3.0u+debian/debian/patches/series 1969-12-31 16:00:00.000000000 -0800 +++ gnu-efi-3.0u+debian/debian/patches/series 2013-09-23 23:25:27.000000000 -0700 @@ -0,0 +1 @@ +gcc46-compatibility