[grub/f16] Fix compile problem Related: rhbz#741781

Peter Jones pjones at fedoraproject.org
Wed Sep 28 21:12:40 UTC 2011


commit ae7b2e4bd0240f7e96ba8e4b039abc1156438559
Author: Peter Jones <pjones at redhat.com>
Date:   Wed Sep 28 17:12:23 2011 -0400

    Fix compile problem
    Related: rhbz#741781

 0001-Fix-strange-compilation-problem.patch |   31 ++++++++++++++++++++++++++++
 grub.spec                                  |   10 +++++++-
 2 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/0001-Fix-strange-compilation-problem.patch b/0001-Fix-strange-compilation-problem.patch
new file mode 100644
index 0000000..0e8b419
--- /dev/null
+++ b/0001-Fix-strange-compilation-problem.patch
@@ -0,0 +1,31 @@
+From a36b871255e0a05690f95942ed2a6be57c24ba1e Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones at redhat.com>
+Date: Wed, 28 Sep 2011 17:03:39 -0400
+Subject: [PATCH] Fix strange compilation problem.
+
+the compiler seems to be optimizing finish_param_parse out and doing a
+poor job of it.  So make it a non-static function and that doesn't
+happen.
+---
+ efi/efidp.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/efi/efidp.c b/efi/efidp.c
+index d8ca03d..f4ca452 100644
+--- a/efi/efidp.c
++++ b/efi/efidp.c
+@@ -578,7 +578,10 @@ dpname_matches(char *str, char *candidate)
+     return rc;
+ }
+ 
+-static void
++extern void
++finish_param_parse(char *pos, char **end, char *tmp);
++
++void
+ finish_param_parse(char *pos, char **end, char *tmp)
+ {
+   if (!pos || !end || !tmp)
+-- 
+1.7.6
+
diff --git a/grub.spec b/grub.spec
index 9b65c27..3d26d5b 100644
--- a/grub.spec
+++ b/grub.spec
@@ -1,6 +1,6 @@
 Name: grub
 Version: 0.97
-Release: 78%{?dist}
+Release: 79%{?dist}
 Epoch: 1
 Summary: Grand Unified Boot Loader.
 Group: System Environment/Base
@@ -26,6 +26,7 @@ Source0: ftp://alpha.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
 # http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary
 Patch0: grub-fedora-16.patch
 Patch1: 0001-Fall-back-to-old-efi-GOP-detection-behavior.patch
+Patch2: 0001-Fix-strange-compilation-problem.patch
 
 %description
 GRUB (Grand Unified Boot Loader) is an experimental boot loader
@@ -49,13 +50,14 @@ sed -i 's/0\.97/%{version}-%{release}/' configure.in
 autoreconf
 autoconf
 GCCVERS=$(gcc --version | head -1 | cut -d\  -f3 | cut -d. -f1)
-CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused"
+CFLAGS="-O0 -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused"
 if [ "$GCCVERS" == "4" ]; then
 	CFLAGS="$CFLAGS -Wno-pointer-sign"
 fi
 export CFLAGS
 %configure --sbindir=/sbin --disable-auto-linux-mem-opt --datarootdir=%{_datadir} --with-platform=efi
 make
+exit 1
 mv efi/grub.efi .
 make clean
 autoreconf
@@ -106,6 +108,10 @@ fi
 %{_datadir}/grub
 
 %changelog
+* Wed Sep 28 2011 Peter Jones <pjones at redhat.com> - 0.97-79
+- Fix compile problem
+  Related: rhbz#741781
+
 * Tue Sep 27 2011 Peter Jones <pjones at redhat.com> - 0.97-78
 - Fall back to old efi GOP detection behavior.
   Resolves: rhbz#741781


More information about the scm-commits mailing list