Bug#753682: gummiboot: FTBFS with GCC 4.9 due to undefined va_copy in EFI binary

2014-07-15 Thread Philipp Kern
On Fri, Jul 11, 2014 at 02:58:20PM +0200, Julian Andres Klode wrote:
 That's true. IMO Gnu EFI needs to be patched to not include efistdarg.h by
 default and hide the vaargs functions if the header is not included. That
 would fix all issues.
 
 Or change it to define the va functions in terms of GCC builtins. This
 should work as well IMO.

I think it'd be easiest to just stub out va_copy as well (it's used in
lib/print.c - as long as the stdlib.h include remains patched out):

#define va_copy(d,s)  ((d) = (s))

That resolves the dangling reference at gnu-efi compile-time and lets gummiboot
compile. I did not test the end result, but we're talking about DbgPrint which
gummiboot does not even use.

Kind regards
Philipp Kern


signature.asc
Description: Digital signature


Bug#753682: gummiboot: FTBFS with GCC 4.9 due to undefined va_copy in EFI binary

2014-07-11 Thread John Paul Adrian Glaubitz
Hi Julian!

Do you have a suggestion for the proper fix for this FTBFS? I have
unapplied the patch #747158 but I'm still running into an FTBFS,
but now it's just stdarg.h which is missing which is what Daniel
patched out:

gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64
-DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic
-fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing
-fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone
-DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/util.c -o
src/efi/util.o
In file included from /usr/include/efi/efilib.h:27:0,
 from src/efi/util.c:19:
/usr/include/efi/efistdarg.h:22:20: fatal error: stdarg.h: No such file
or directory
compilation terminated.
make[2]: *** [src/efi/util.o] Error 1
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/buildd/gummiboot-44'

I'm trying a local backport to Wheezy and I'm therefore using gcc-4.7,
so it doesn't seem to be specific to gcc-4.9 unless I am overseeing
something.

Thanks!
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#753682: gummiboot: FTBFS with GCC 4.9 due to undefined va_copy in EFI binary

2014-07-11 Thread Julian Andres Klode
Am 11.07.2014 13:43 schrieb John Paul Adrian Glaubitz 
glaub...@physik.fu-berlin.de:

 Hi Julian!

 Do you have a suggestion for the proper fix for this FTBFS? I have
 unapplied the patch #747158 but I'm still running into an FTBFS,
 but now it's just stdarg.h which is missing which is what Daniel
 patched out:

 gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64
 -DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic
 -fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing
 -fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone
 -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/util.c -o
 src/efi/util.o
 In file included from /usr/include/efi/efilib.h:27:0,
  from src/efi/util.c:19:
 /usr/include/efi/efistdarg.h:22:20: fatal error: stdarg.h: No such file
 or directory
 compilation terminated.
 make[2]: *** [src/efi/util.o] Error 1
 make[1]: *** [all] Error 2
 make[1]: Leaving directory `/tmp/buildd/gummiboot-44'

 I'm trying a local backport to Wheezy and I'm therefore using gcc-4.7,
 so it doesn't seem to be specific to gcc-4.9 unless I am overseeing
 something.

 Thanks!
 Adrian


That's true. IMO Gnu EFI needs to be patched to not include efistdarg.h by
default and hide the vaargs functions if the header is not included. That
would fix all issues.

Or change it to define the va functions in terms of GCC builtins. This
should work as well IMO.


Bug#753682: gummiboot: FTBFS with GCC 4.9 due to undefined va_copy in EFI binary

2014-07-11 Thread John Paul Adrian Glaubitz
On 07/11/2014 02:58 PM, Julian Andres Klode wrote:
 That's true. IMO Gnu EFI needs to be patched to not include efistdarg.h
 by default and hide the vaargs functions if the header is not included.
 That would fix all issues.

Thanks for the explanation! I didn't check the source of neither
gummiboot or gnu-efi, but I assume that there is no use of varargs
then?

 Or change it to define the va functions in terms of GCC builtins. This
 should work as well IMO.

Wouldn't that be the equivalent of not using -nostdinc? Removing this
from the list of compiler flags will actually result in stdarg.h
being available and the code compile.

Do you have an idea why upstream uses -nostdinc?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#753682: gummiboot: FTBFS with GCC 4.9 due to undefined va_copy in EFI binary

2014-07-04 Thread Julian Andres Klode
Package: gummiboot
Version: 44-1
Severity: serious

gummiboot's EFI binary fails to build from source with GCC 4.9

gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64 
-DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic 
-fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing 
-fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone 
-DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/util.c -o src/efi/util.o
gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64 
-DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic 
-fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing 
-fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone 
-DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/console.c -o 
src/efi/console.o
gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64 
-DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic 
-fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing 
-fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone 
-DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/graphics.c -o 
src/efi/graphics.o
gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64 
-DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic 
-fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing 
-fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone 
-DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/gummiboot.c -o 
src/efi/gummiboot.o
ld  -T /usr/lib/elf_x86_64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc 
-L /usr/lib /usr/lib/crt0-efi-x86_64.o ./src/efi/util.o ./src/efi/console.o 
./src/efi/graphics.o ./src/efi/gummiboot.o \
-o src/efi/gummiboot.so -lefi -lgnuefi 
/usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a; \
nm -D -u src/efi/gummiboot.so | grep ' U '  exit 1 || :
 U va_copy
make[2]: *** [src/efi/gummiboot.so] Error 1
Makefile:1037: recipe for target 'src/efi/gummiboot.so' failed


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (980, 'unstable'), (500, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gummiboot depends on:
ii  libblkid1  2.20.1-5.8
ii  libc6  2.19-3

Versions of packages gummiboot recommends:
ii  systemd  204-10

gummiboot suggests no packages.

-- Configuration Files:
/etc/default/gummiboot changed [not included]

-- no debconf information

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Be friendly, do not top-post, and follow RFC 1855 Netiquette.
- If you don't I might ignore you.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#753682: gummiboot: FTBFS with GCC 4.9 due to undefined va_copy in EFI binary

2014-07-04 Thread Julian Andres Klode
Control: reassign -1 gnu-efi 3.0v-2

On Fri, Jul 04, 2014 at 12:11:30PM +0200, Julian Andres Klode wrote:
 Package: gummiboot
 Version: 44-1
 Severity: serious
 
 gummiboot's EFI binary fails to build from source with GCC 4.9
 
 gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64 
 -DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic 
 -fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing 
 -fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone 
 -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/util.c -o 
 src/efi/util.o
 gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64 
 -DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic 
 -fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing 
 -fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone 
 -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/console.c -o 
 src/efi/console.o
 gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64 
 -DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic 
 -fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing 
 -fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone 
 -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/graphics.c -o 
 src/efi/graphics.o
 gcc  -I. -include config.h -I/usr/include/efi -I/usr/include/efi/x86_64 
 -DMACHINE_TYPE_NAME=\x64\  -Wall -Wextra -nostdinc -ggdb -O0 -fpic 
 -fshort-wchar -nostdinc -ffreestanding -fno-strict-aliasing 
 -fno-stack-protector -Wsign-compare -mno-sse -mno-mmx -mno-red-zone 
 -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -c src/efi/gummiboot.c -o 
 src/efi/gummiboot.o
 ld  -T /usr/lib/elf_x86_64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc 
 -L /usr/lib /usr/lib/crt0-efi-x86_64.o ./src/efi/util.o ./src/efi/console.o 
 ./src/efi/graphics.o ./src/efi/gummiboot.o \
   -o src/efi/gummiboot.so -lefi -lgnuefi 
 /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a; \
 nm -D -u src/efi/gummiboot.so | grep ' U '  exit 1 || :
  U va_copy
 make[2]: *** [src/efi/gummiboot.so] Error 1
 Makefile:1037: recipe for target 'src/efi/gummiboot.so' failed
 

This is a regression from the fix for #747158 in gnu-efi

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Be friendly, do not top-post, and follow RFC 1855 Netiquette.
- If you don't I might ignore you.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org