From 4f5e655b36b61505fc1d1c4157e4f721a5e80a8a Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 24 Oct 2012 17:26:55 +0200 Subject: [PATCH] grub-2.0x: avoid pragma warnings triggered by bison-2.6.4-generated parsers --- pkgs/tools/misc/grub/2.0x.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix index e85e8de3dd8..d0e7738b68e 100644 --- a/pkgs/tools/misc/grub/2.0x.nix +++ b/pkgs/tools/misc/grub/2.0x.nix @@ -49,10 +49,17 @@ stdenv.mkDerivation rec { sed -i '/gets is a security hole/d' grub-core/gnulib/stdio.in.h ''; + # Source code generated by bison 2.6.4 contains pragmas that trigger + # warnings when built with -Wunknown-pragmas. Since Grub compiles with + # -Werror, this causes the build to fail. We work around this issue by + # ignoring pragma-related warnings, but clearly it would be better if + # Bison wouldn't trigger that issue in the first place. A bug report + # has been sent. prePatch = '' gunzip < "${unifont_bdf}" > "unifont.bdf" sed -i "configure" \ - -e "s|/usr/src/unifont.bdf|$PWD/unifont.bdf|g" + -e "s|/usr/src/unifont.bdf|$PWD/unifont.bdf|g" \ + -e "s|-Wunknown-pragmas|-Wno-pragmas|g" ''; configureFlags =