diff options
Diffstat (limited to 'sys-boot/grub')
-rw-r--r-- | sys-boot/grub/ChangeLog | 6 | ||||
-rw-r--r-- | sys-boot/grub/files/grub-0.96-r1-gcc4.patch | 191 | ||||
-rw-r--r-- | sys-boot/grub/grub-0.96-r1.ebuild | 5 |
3 files changed, 200 insertions, 2 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog index dd471a3df657..5f500971def5 100644 --- a/sys-boot/grub/ChangeLog +++ b/sys-boot/grub/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-boot/grub # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.36 2005/04/05 21:41:28 halcy0n Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.37 2005/04/06 00:49:19 halcy0n Exp $ + + 06 Apr 2005; Mark Loeser <halcy0n@gentoo.org> + +files/grub-0.96-r1-gcc4.patch, grub-0.96-r1.ebuild: + Updated gcc4 patch to apply to grub-0.96-r1 05 Apr 2005; Mark Loeser <halcy0n@gentoo.org> +files/grub-0.96-gcc4.patch, grub-0.96.ebuild: diff --git a/sys-boot/grub/files/grub-0.96-r1-gcc4.patch b/sys-boot/grub/files/grub-0.96-r1-gcc4.patch new file mode 100644 index 000000000000..87e5bc950387 --- /dev/null +++ b/sys-boot/grub/files/grub-0.96-r1-gcc4.patch @@ -0,0 +1,191 @@ +diff -ur --exclude '*.orig' grub-0.96-orig/grub/asmstub.c grub-0.96/grub/asmstub.c +--- grub-0.96-orig/grub/asmstub.c 2005-04-05 20:25:52.000000000 -0400 ++++ grub-0.96/grub/asmstub.c 2005-04-05 20:26:05.000000000 -0400 +@@ -91,7 +91,7 @@ + static jmp_buf env_for_exit; + + /* The current color for console. */ +-static int console_current_color = A_NORMAL; ++int console_current_color = A_NORMAL; + + /* The file descriptor for a serial device. */ + static int serial_fd = -1; +@@ -162,31 +162,33 @@ + size_t simstack_size, page_size; + int i; + ++ auto void doit (void); ++ + /* We need a nested function so that we get a clean stack frame, + regardless of how the code is optimized. */ +- static volatile void doit () +- { +- /* Make sure our stack lives in the simulated memory area. */ +- asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" +- : "=&r" (realstack) : "r" (simstack)); +- +- /* Do a setjmp here for the stop command. */ +- if (! setjmp (env_for_exit)) +- { +- /* Actually enter the generic stage2 code. */ +- status = 0; +- init_bios_info (); +- } +- else +- { +- /* If ERRNUM is non-zero, then set STATUS to non-zero. */ +- if (errnum) +- status = 1; +- } +- +- /* Replace our stack before we use any local variables. */ +- asm volatile ("movl %0, %%esp\n" : : "r" (realstack)); +- } ++ auto void doit (void) ++ { ++ /* Make sure our stack lives in the simulated memory area. */ ++ asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" ++ : "=&r" (realstack) : "r" (simstack)); ++ ++ /* Do a setjmp here for the stop command. */ ++ if (! setjmp (env_for_exit)) ++ { ++ /* Actually enter the generic stage2 code. */ ++ status = 0; ++ init_bios_info (); ++ } ++ else ++ { ++ /* If ERRNUM is non-zero, then set STATUS to non-zero. */ ++ if (errnum) ++ status = 1; ++ } ++ ++ /* Replace our stack before we use any local variables. */ ++ asm volatile ("movl %0, %%esp\n" : : "r" (realstack)); ++ } + + assert (grub_scratch_mem == 0); + +diff -ur --exclude '*.orig' grub-0.96-orig/lib/device.c grub-0.96/lib/device.c +--- grub-0.96-orig/lib/device.c 2005-04-05 20:25:52.000000000 -0400 ++++ grub-0.96/lib/device.c 2005-04-05 20:26:05.000000000 -0400 +@@ -499,12 +499,15 @@ + static int + read_device_map (FILE *fp, char **map, const char *map_file) + { +- static void show_error (int no, const char *msg) ++ auto void show_error (int no, const char *msg); ++ auto void show_warning (int no, const char *msg, ...); ++ ++ auto void show_error (int no, const char *msg) + { + fprintf (stderr, "%s:%d: error: %s\n", map_file, no, msg); + } + +- static void show_warning (int no, const char *msg, ...) ++ auto void show_warning (int no, const char *msg, ...) + { + va_list ap; + +diff -ur --exclude '*.orig' grub-0.96-orig/stage2/builtins.c grub-0.96/stage2/builtins.c +--- grub-0.96-orig/stage2/builtins.c 2005-04-05 20:25:52.000000000 -0400 ++++ grub-0.96/stage2/builtins.c 2005-04-05 20:26:05.000000000 -0400 +@@ -626,8 +626,10 @@ + "white" + }; + ++ auto int color_number (char *str); ++ + /* Convert the color name STR into the magical number. */ +- static int color_number (char *str) ++ auto int color_number (char *str) + { + char *ptr; + int i; +@@ -3804,7 +3806,10 @@ + int to_code, from_code; + int map_in_interrupt = 0; + +- static int find_key_code (char *key) ++ auto int find_key_code (char *key); ++ auto int find_ascii_code (char *key); ++ ++ auto int find_key_code (char *key) + { + int i; + +@@ -3821,7 +3826,7 @@ + return 0; + } + +- static int find_ascii_code (char *key) ++ auto int find_ascii_code (char *key) + { + int i; + +diff -ur --exclude '*.orig' grub-0.96-orig/stage2/char_io.c grub-0.96/stage2/char_io.c +--- grub-0.96-orig/stage2/char_io.c 2005-04-05 20:25:52.000000000 -0400 ++++ grub-0.96/stage2/char_io.c 2005-04-05 20:26:49.000000000 -0400 +@@ -1226,7 +1226,9 @@ + return ! errnum; + # endif + # else /* __PIC__ */ +- static int start_addr (void) ++ auto int start_addr(void); ++ ++ auto int start_addr (void) + { + int ret; + # if defined(HAVE_START_SYMBOL) +@@ -1239,7 +1241,9 @@ + return ret; + } + +- static int end_addr (void) ++ auto int end_addr(void); ++ ++ auto int end_addr (void) + { + int ret; + # if defined(HAVE_END_SYMBOL) +diff -ur --exclude '*.orig' grub-0.96-orig/stage2/smp-imps.h grub-0.96/stage2/smp-imps.h +--- grub-0.96-orig/stage2/smp-imps.h 2005-04-05 20:25:52.000000000 -0400 ++++ grub-0.96/stage2/smp-imps.h 2005-04-05 20:26:05.000000000 -0400 +@@ -183,36 +183,6 @@ + */ + + /* +- * "imps_any_new_apics" is non-zero if any of the APICS (local or I/O) +- * are *not* an 82489DX. This is useful to determine if more than 15 +- * CPUs can be supported (true if zero). +- */ +-extern int imps_any_new_apics; +- +-/* +- * "imps_enabled" is non-zero if the probe sequence found IMPS +- * information and was successful. +- */ +-extern int imps_enabled; +- +-/* +- * This contains the local APIC hardware address. +- */ +-extern unsigned imps_lapic_addr; +- +-/* +- * This represents the number of CPUs found. +- */ +-extern int imps_num_cpus; +- +-/* +- * These map from virtual cpu numbers to APIC id's and back. +- */ +-extern unsigned char imps_cpu_apic_map[IMPS_MAX_CPUS]; +-extern unsigned char imps_apic_cpu_map[IMPS_MAX_CPUS]; +- +- +-/* + * This is the primary function for probing for Intel MPS 1.1/1.4 + * compatible hardware and BIOS information. While probing the CPUs + * information returned from the BIOS, this also starts up each CPU diff --git a/sys-boot/grub/grub-0.96-r1.ebuild b/sys-boot/grub/grub-0.96-r1.ebuild index 8f111e373ab0..959cb8014b82 100644 --- a/sys-boot/grub/grub-0.96-r1.ebuild +++ b/sys-boot/grub/grub-0.96-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.96-r1.ebuild,v 1.6 2005/04/05 23:50:45 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.96-r1.ebuild,v 1.7 2005/04/06 00:49:19 halcy0n Exp $ inherit mount-boot eutils flag-o-matic toolchain-funcs @@ -59,6 +59,9 @@ src_unpack() { # http://lists.gnu.org/archive/html/bug-grub/2005-03/msg00011.html epatch "${FILESDIR}"/${P}-nxstack.patch + # gcc4 patches; bug #85016 + epatch ${FILESDIR}/${P}-r1-gcc4.patch + # a bunch of patches apply to raw autotool files autoconf || die "autoconf failed" aclocal || die "aclocal failed" |