summaryrefslogtreecommitdiffstats
path: root/patches/grub-0.97
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-11-22 15:27:22 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-11-22 15:27:22 +0100
commit0dfc14dcb5d96dbe4d8d4412a30216a6673e7199 (patch)
tree902472cacfd9f688febfc099768bc3233294f609 /patches/grub-0.97
parent51050fdd273f62011b99490ea2b12ffe2159abf7 (diff)
downloadptxdist-0dfc14dcb5d96dbe4d8d4412a30216a6673e7199.tar.gz
ptxdist-0dfc14dcb5d96dbe4d8d4412a30216a6673e7199.tar.xz
grub: add patches to build with gcc-4.6
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/grub-0.97')
-rw-r--r--patches/grub-0.97/0001-fix-static-declaration.patch (renamed from patches/grub-0.97/grub-0.97-gcc4x.diff)15
-rw-r--r--patches/grub-0.97/0002-Add-hack-for-default-partition.patch (renamed from patches/grub-0.97/grub-set-install_partition_hd0_0.diff)14
-rw-r--r--patches/grub-0.97/0003-cleanup-autotools-a-bit.patch31
-rw-r--r--patches/grub-0.97/0004-Work-around-a-miscompilation-of-stage2-with-GCC-4.6.patch32
l---------patches/grub-0.97/autogen.sh1
-rw-r--r--patches/grub-0.97/series9
6 files changed, 90 insertions, 12 deletions
diff --git a/patches/grub-0.97/grub-0.97-gcc4x.diff b/patches/grub-0.97/0001-fix-static-declaration.patch
index b2509b141..c8d50f373 100644
--- a/patches/grub-0.97/grub-0.97-gcc4x.diff
+++ b/patches/grub-0.97/0001-fix-static-declaration.patch
@@ -1,15 +1,20 @@
-Subject: fix static declaration
From: Benedikt Spranger <b.spranger@pengutronix.de>
+Date: Tue, 22 Nov 2011 15:19:52 +0100
+Subject: [PATCH] fix static declaration
GCC 4.x declares non-static declaration and static definition and vice
versa as error.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
-diff -ruN grub-0.97.orig/netboot/main.c grub-0.97/netboot/main.c
---- grub-0.97.orig/netboot/main.c 2004-05-21 00:19:33.000000000 +0200
-+++ grub-0.97/netboot/main.c 2005-09-15 17:33:34.383904479 +0200
-@@ -54,9 +54,9 @@
+ netboot/main.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/netboot/main.c b/netboot/main.c
+index 82759b6..abd9212 100644
+--- a/netboot/main.c
++++ b/netboot/main.c
+@@ -54,9 +54,9 @@ struct rom_info rom;
static int vendorext_isvalid;
static unsigned long netmask;
diff --git a/patches/grub-0.97/grub-set-install_partition_hd0_0.diff b/patches/grub-0.97/0002-Add-hack-for-default-partition.patch
index acadba367..cda1ef21f 100644
--- a/patches/grub-0.97/grub-set-install_partition_hd0_0.diff
+++ b/patches/grub-0.97/0002-Add-hack-for-default-partition.patch
@@ -1,5 +1,6 @@
From: Sascha Hauer <s.hauer@pengutronix.de>
-Subject: Add hack for default partition
+Date: Tue, 22 Nov 2011 15:19:52 +0100
+Subject: [PATCH] Add hack for default partition
Let grub find the default partition the rootfs is installed
on. There must be a better (proper) way to archieve this,
@@ -7,10 +8,13 @@ but I don't know any.
Signed-off-by: (not for upstream)
---
-Index: grub-0.97/stage2/asm.S
-===================================================================
---- grub-0.97.orig/stage2/asm.S
-+++ grub-0.97/stage2/asm.S
+ stage2/asm.S | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/stage2/asm.S b/stage2/asm.S
+index 34b6e7d..bf157cf 100644
+--- a/stage2/asm.S
++++ b/stage2/asm.S
@@ -86,7 +86,7 @@ ENTRY(main)
. = EXT_C(main) + 0x8
diff --git a/patches/grub-0.97/0003-cleanup-autotools-a-bit.patch b/patches/grub-0.97/0003-cleanup-autotools-a-bit.patch
new file mode 100644
index 000000000..4d969c0b7
--- /dev/null
+++ b/patches/grub-0.97/0003-cleanup-autotools-a-bit.patch
@@ -0,0 +1,31 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 22 Nov 2011 15:11:15 +0100
+Subject: [PATCH] cleanup autotools a bit
+
+http://bugs.gentoo.org/156524
+
+Taken from Gentoo. Needed for autoreconf.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ configure.ac | 7 +------
+ 1 files changed, 1 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bb9e1d9..a47258c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -56,12 +56,7 @@ fi
+
+ AC_CHECK_TOOL(CC, gcc)
+ AC_PROG_CC
+-# We need this for older versions of Autoconf.
+-_AM_DEPENDENCIES(CC)
+-
+-dnl Because recent automake complains about AS, set it here.
+-CCAS="$CC"
+-AC_SUBST(CCAS)
++AM_PROG_AS
+
+ AC_ARG_WITH(binutils,
+ [ --with-binutils=DIR search the directory DIR to find binutils])
diff --git a/patches/grub-0.97/0004-Work-around-a-miscompilation-of-stage2-with-GCC-4.6.patch b/patches/grub-0.97/0004-Work-around-a-miscompilation-of-stage2-with-GCC-4.6.patch
new file mode 100644
index 000000000..e08ea2d1e
--- /dev/null
+++ b/patches/grub-0.97/0004-Work-around-a-miscompilation-of-stage2-with-GCC-4.6.patch
@@ -0,0 +1,32 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 22 Nov 2011 15:01:33 +0100
+Subject: [PATCH] Work around a miscompilation of stage2 with GCC 4.6.
+
+This flag is not the cause of the miscompilation, but disabling it has the side-effect
+of making it work at both -Os and -O2.
+
+Vague upstream bug:
+http://gcc.gnu.org/PR39333
+
+https://bugs.gentoo.org/360513
+
+Patch taken from Gentoo.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ stage2/Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/stage2/Makefile.am b/stage2/Makefile.am
+index f8e6d42..24b07e2 100644
+--- a/stage2/Makefile.am
++++ b/stage2/Makefile.am
+@@ -79,7 +79,7 @@ else
+ HERCULES_FLAGS =
+ endif
+
+-STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
++STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin -nostdinc \
+ $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
+
+ STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
diff --git a/patches/grub-0.97/autogen.sh b/patches/grub-0.97/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/grub-0.97/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh \ No newline at end of file
diff --git a/patches/grub-0.97/series b/patches/grub-0.97/series
index db0b68af5..aecc263a6 100644
--- a/patches/grub-0.97/series
+++ b/patches/grub-0.97/series
@@ -1,2 +1,7 @@
-grub-0.97-gcc4x.diff
-grub-set-install_partition_hd0_0.diff
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-fix-static-declaration.patch
+0002-Add-hack-for-default-partition.patch
+0003-cleanup-autotools-a-bit.patch
+0004-Work-around-a-miscompilation-of-stage2-with-GCC-4.6.patch
+# 5d726d5276afb556c3b49f8ddc24e226 - git-ptx-patches magic