summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2005-04-06 06:03:18 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2005-04-06 06:03:18 +0000
commitf3b1f69795f513bcfa6e4ea8198038df24208f9d (patch)
tree679ae7b6efda9a8746558e4e39b66ce47a79ee41 /sys-boot
parentFixed build with USE=-xv on hppa. (diff)
downloadgentoo-2-f3b1f69795f513bcfa6e4ea8198038df24208f9d.tar.gz
gentoo-2-f3b1f69795f513bcfa6e4ea8198038df24208f9d.tar.bz2
gentoo-2-f3b1f69795f513bcfa6e4ea8198038df24208f9d.zip
Use kernel headers' enum sparc_cpu instead of promlib.h's enum arch to prevent symbol collision. Prevent glibc's time.h from being brought in which could cause symbol collision. This makes silo work on systems with 2.6 headers.
(Portage version: 2.0.51.19)
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/silo/ChangeLog10
-rw-r--r--sys-boot/silo/files/silo-1.4.9-noglibc_time.patch12
-rw-r--r--sys-boot/silo/files/silo-1.4.9-sparc_cpu.patch95
-rw-r--r--sys-boot/silo/silo-1.4.9.ebuild17
4 files changed, 131 insertions, 3 deletions
diff --git a/sys-boot/silo/ChangeLog b/sys-boot/silo/ChangeLog
index 795ba58d86cd..1814b29c10c0 100644
--- a/sys-boot/silo/ChangeLog
+++ b/sys-boot/silo/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-boot/silo
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/silo/ChangeLog,v 1.20 2005/03/28 13:35:56 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/silo/ChangeLog,v 1.21 2005/04/06 06:03:18 eradicator Exp $
+
+ 06 Apr 2005; Jeremy Huddleston <eradicator@gentoo.org>
+ +files/silo-1.4.9-noglibc_time.patch, +files/silo-1.4.9-sparc_cpu.patch,
+ silo-1.4.9.ebuild:
+ Use kernel headers' enum sparc_cpu instead of promlib.h's enum arch to
+ prevent symbol collision. Prevent glibc's time.h from being brought in which
+ could cause symbol collision. This makes silo work on systems with 2.6
+ headers.
*silo-1.4.9 (28 Mar 2005)
diff --git a/sys-boot/silo/files/silo-1.4.9-noglibc_time.patch b/sys-boot/silo/files/silo-1.4.9-noglibc_time.patch
new file mode 100644
index 000000000000..a77c9a9db983
--- /dev/null
+++ b/sys-boot/silo/files/silo-1.4.9-noglibc_time.patch
@@ -0,0 +1,12 @@
+--- silo-1.4.9/second/fs/ext2.c.orig 2005-04-05 22:39:41.000000000 -0700
++++ silo-1.4.9/second/fs/ext2.c 2005-04-05 22:58:17.000000000 -0700
+@@ -19,6 +19,9 @@
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
+ USA. */
+
++/* Prevent usersparce time.h from being included and messing up our time() */
++#define _TIME_H
++
+ #include <sys/types.h>
+ #include <silo.h>
+ #include <file.h>
diff --git a/sys-boot/silo/files/silo-1.4.9-sparc_cpu.patch b/sys-boot/silo/files/silo-1.4.9-sparc_cpu.patch
new file mode 100644
index 000000000000..d7fb13869043
--- /dev/null
+++ b/sys-boot/silo/files/silo-1.4.9-sparc_cpu.patch
@@ -0,0 +1,95 @@
+diff -Naurp silo-1.4.9.orig/include/promlib.h silo-1.4.9/include/promlib.h
+--- silo-1.4.9.orig/include/promlib.h 2005-04-05 22:28:35.000000000 -0700
++++ silo-1.4.9/include/promlib.h 2005-04-05 22:33:08.000000000 -0700
+@@ -2,6 +2,7 @@
+ #define __PROMLIB_H
+
+ #include <asm/openprom.h>
++#include <asm/system.h>
+ #include <stdarg.h>
+
+ /*
+@@ -9,7 +10,10 @@
+ * Krups has no architecture in the PROM tree.
+ * CP-1200 has "sun4s" which is obviously a mistake [don't ask, huh].
+ */
+-enum arch { sun4, sun4c, sun4m, sun4d, sun4e, sun4u, sun4p, sununknown };
++
++/* silo's names for items in enum sparc_cpu */
++#define sun4p 0x06
++#define sununknown 0x07
+
+ extern struct linux_romvec *romvec;
+
+diff -Naurp silo-1.4.9.orig/include/silo.h silo-1.4.9/include/silo.h
+--- silo-1.4.9.orig/include/silo.h 2004-01-29 10:28:55.000000000 -0800
++++ silo-1.4.9/include/silo.h 2005-04-05 22:34:20.000000000 -0700
+@@ -103,7 +103,7 @@ void show_bootargs (void);
+ void set_bootargs (char *, char *);
+ void set_prollargs (char *, unsigned int, int);
+ char *v0_device (char *);
+-enum arch get_architecture();
++enum sparc_cpu get_architecture();
+ unsigned char *find_linux_HdrS (char *, int);
+ void print_message(char *);
+ void get_idprom(void);
+@@ -121,7 +121,7 @@ int strtol (const char *, char **, int);
+ /* decompress.c */
+ int decompress (char *, char *, unsigned char (*)(void), void (*)(void));
+ /* main.c */
+-extern enum arch architecture;
++extern enum sparc_cpu architecture;
+ /* timer.c */
+ int init_timer ();
+ void close_timer ();
+diff -Naurp silo-1.4.9.orig/second/main.c silo-1.4.9/second/main.c
+--- silo-1.4.9.orig/second/main.c 2004-06-20 18:58:48.000000000 -0700
++++ silo-1.4.9/second/main.c 2005-04-05 22:35:06.000000000 -0700
+@@ -64,7 +64,7 @@ enum {
+ CMD_CAT,
+ CMD_LS
+ } load_cmd;
+-enum arch architecture;
++enum sparc_cpu architecture;
+ static int timer_status = 0;
+ static char *initrd_start;
+ static int initrd_size;
+diff -Naurp silo-1.4.9.orig/second/misc.c silo-1.4.9/second/misc.c
+--- silo-1.4.9.orig/second/misc.c 2005-02-22 10:03:20.000000000 -0800
++++ silo-1.4.9/second/misc.c 2005-04-05 22:35:25.000000000 -0700
+@@ -328,7 +328,7 @@ static struct idp_struct idprm;
+ struct SMM {
+ char *name;
+ char *package;
+- enum arch architecture;
++ enum sparc_cpu architecture;
+ unsigned char id_machtype;
+ } Machines[NUM_SUN_MACHINES] = {
+ /* First, Sun4's */
+@@ -486,7 +486,7 @@ void set_prollargs (char *params, unsign
+ strcpy(p->kern_args, params);
+ }
+
+-enum arch get_architecture ()
++enum sparc_cpu get_architecture ()
+ {
+ char *buffer = "sun4c ";
+ int i;
+diff -Naurp silo-1.4.9.orig/silo/confcheck.c silo-1.4.9/silo/confcheck.c
+--- silo-1.4.9.orig/silo/confcheck.c 2001-06-16 10:49:32.000000000 -0700
++++ silo-1.4.9/silo/confcheck.c 2005-04-05 22:34:44.000000000 -0700
+@@ -29,12 +29,12 @@
+ #include <sys/mman.h>
+ #include <ctype.h>
+
+-/* Get decleration of enum arch */
++/* Get decleration of enum sparc_cpu */
+ #include <promlib.h>
+ /* And then make sure we get printf right */
+ #define prom_printf printf
+
+-enum arch architecture;
++enum sparc_cpu architecture;
+
+ /* Tells cfg.c not to #include anything of it's own, we are in control. */
+ #define SILOCONFCHECK 1
diff --git a/sys-boot/silo/silo-1.4.9.ebuild b/sys-boot/silo/silo-1.4.9.ebuild
index 63496b68d898..3f0ec8da0e3d 100644
--- a/sys-boot/silo/silo-1.4.9.ebuild
+++ b/sys-boot/silo/silo-1.4.9.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/silo/silo-1.4.9.ebuild,v 1.1 2005/03/28 13:35:56 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/silo/silo-1.4.9.ebuild,v 1.2 2005/04/06 06:03:18 eradicator Exp $
inherit mount-boot flag-o-matic toolchain-funcs
@@ -18,6 +18,19 @@ PROVIDE="virtual/bootloader"
DEPEND="sys-fs/e2fsprogs
sys-apps/sparc-utils"
+ABI_ALLOW="sparc32"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ if has_version '>=linux-headers-2.6' ; then
+ epatch ${FILESDIR}/${P}-sparc_cpu.patch
+ fi
+
+ epatch ${FILESDIR}/${P}-noglibc_time.patch
+}
+
src_compile() {
filter-flags "-fstack-protector"
@@ -25,7 +38,7 @@ src_compile() {
then
make ${MAKEOPTS} CC="$(tc-getCC) -fno-stack-protector -fno-pic"
else
- make ${MAKEOPTS} || die
+ make ${MAKEOPTS} CC="$(tc-getCC)" || die
fi
}