summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-10-17 10:30:38 +0000
committerRoy Marples <uberlord@gentoo.org>2006-10-17 10:30:38 +0000
commit1f940d969c8106d7de6e88b0632daf3dd662ce6e (patch)
tree014fd269653705a22091a457d486fe117cb06096 /sys-freebsd/freebsd-ubin
parentAdded ~sparc-fbsd keyword. (diff)
downloadgentoo-2-1f940d969c8106d7de6e88b0632daf3dd662ce6e.tar.gz
gentoo-2-1f940d969c8106d7de6e88b0632daf3dd662ce6e.tar.bz2
gentoo-2-1f940d969c8106d7de6e88b0632daf3dd662ce6e.zip
Added ~sparc-fbsd keyword.
(Portage version: 2.1.2_pre3-r3)
Diffstat (limited to 'sys-freebsd/freebsd-ubin')
-rw-r--r--sys-freebsd/freebsd-ubin/ChangeLog6
-rw-r--r--sys-freebsd/freebsd-ubin/files/freebsd-ubin-6.2-sparc64.patch92
-rw-r--r--sys-freebsd/freebsd-ubin/freebsd-ubin-6.2_beta2.ebuild7
3 files changed, 101 insertions, 4 deletions
diff --git a/sys-freebsd/freebsd-ubin/ChangeLog b/sys-freebsd/freebsd-ubin/ChangeLog
index 82ee025a0657..1db525968f1a 100644
--- a/sys-freebsd/freebsd-ubin/ChangeLog
+++ b/sys-freebsd/freebsd-ubin/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-freebsd/freebsd-ubin
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/ChangeLog,v 1.28 2006/10/09 09:04:16 the_paya Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/ChangeLog,v 1.29 2006/10/17 10:30:38 uberlord Exp $
+
+ 17 Oct 2006; Roy Marples <uberlord@gentoo.org>
+ +files/freebsd-ubin-6.2-sparc64.patch, freebsd-ubin-6.2_beta2.ebuild:
+ Added ~sparc-fbsd keyword.
09 Oct 2006; Javier Villavicencio <the_paya@gentoo.org>
freebsd-ubin-6.1.ebuild, freebsd-ubin-6.2_beta1.ebuild,
diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-6.2-sparc64.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-6.2-sparc64.patch
new file mode 100644
index 000000000000..c7a5f839674b
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-6.2-sparc64.patch
@@ -0,0 +1,92 @@
+FreeBSD only works on Sparc64 and freeBSD code relies on the __sparc64__ define.
+gcc only defines __sparc64__ if -mcpu is not used.
+gcc-4 defaults to using -mcpu=ultrasparc on FreeBSD.
+
+This causes us a problem. Infact, FreeBSD developers sent gcc a patch to always
+define __sparc64__ when using -mcpu=ultrasparc, but this was rejected by most
+people including NetBSD developers.
+
+The correct solution is to use __sparc__.
+If platform detection is required, or the code is obviously 64 bit then we can
+use the __arch64__ define as well.
+This combination should be supported by all gcc versions:)
+
+diff -ur usr.bin.orig/getconf/progenv.gperf usr.bin/getconf/progenv.gperf
+--- usr.bin.orig/getconf/progenv.gperf 2005-02-18 21:53:05 +0000
++++ usr.bin/getconf/progenv.gperf 2006-10-10 09:51:19 +0100
+@@ -30,7 +30,7 @@
+ * be updated. (We cheat here and define the supported environments
+ * statically.)
+ */
+-#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
++#if defined(__alpha__) || (defined(__sparc__) && defined(__arch64)) || defined(__amd64__)
+ #define have_LP64_OFF64 NULL
+ #endif
+
+diff -ur usr.bin.orig/gprof/gprof.h usr.bin/gprof/gprof.h
+--- usr.bin.orig/gprof/gprof.h 2004-10-03 19:22:35 +0100
++++ usr.bin/gprof/gprof.h 2006-10-10 09:50:07 +0100
+@@ -59,7 +59,7 @@
+ #if __powerpc__
+ # include "powerpc.h"
+ #endif
+-#if __sparc64__
++#if __sparc__ && __arch64__
+ # include "sparc64.h"
+ #endif
+
+diff -ur usr.bin.orig/truss/extern.h usr.bin/truss/extern.h
+--- usr.bin.orig/truss/extern.h 2005-03-27 13:53:25 +0100
++++ usr.bin/truss/extern.h 2006-10-10 09:52:05 +0100
+@@ -54,7 +54,7 @@
+ extern void ia64_syscall_entry(struct trussinfo *, int);
+ extern long ia64_syscall_exit(struct trussinfo *, int);
+ #endif
+-#ifdef __sparc64__
++#if defined(__sparc__) && defined(__arch64__)
+ extern void sparc64_syscall_entry(struct trussinfo *, int);
+ extern long sparc64_syscall_exit(struct trussinfo *, int);
+ #endif
+diff -ur usr.bin.orig/truss/main.c usr.bin/truss/main.c
+--- usr.bin.orig/truss/main.c 2006-06-09 22:08:51 +0100
++++ usr.bin/truss/main.c 2006-10-10 09:53:10 +0100
+@@ -99,7 +99,7 @@
+ #ifdef __ia64__
+ { "FreeBSD ELF64", ia64_syscall_entry, ia64_syscall_exit },
+ #endif
+-#ifdef __sparc64__
++#if defined(__sparc__) && defined(__arch64__)
+ { "FreeBSD ELF64", sparc64_syscall_entry, sparc64_syscall_exit },
+ #endif
+ { 0, 0, 0 },
+diff -ur usr.bin.orig/xlint/common/param.h usr.bin/xlint/common/param.h
+--- usr.bin.orig/xlint/common/param.h 2002-07-19 16:19:23 +0100
++++ usr.bin/xlint/common/param.h 2006-10-10 09:53:59 +0100
+@@ -69,7 +69,7 @@
+ /*
+ * And the sparc64 long double code generation is broken.
+ */
+-#if !defined(__sparc64__)
++#if !(defined(__sparc__) && defined(__arch64__))
+ typedef long double ldbl_t;
+ #else
+ typedef double ldbl_t;
+diff -ur usr.bin.orig/xlint/lint1/param.h usr.bin/xlint/lint1/param.h
+--- usr.bin.orig/xlint/lint1/param.h 2004-05-14 14:44:36 +0100
++++ usr.bin/xlint/lint1/param.h 2006-10-10 09:55:06 +0100
+@@ -83,12 +83,12 @@
+ #elif __powerpc__
+ #define PTRDIFF_IS_LONG 0
+ #define SIZEOF_IS_ULONG 0
++#elif defined(__sparc__) && defined(__arch64__)
++#define PTRDIFF_IS_LONG 1
++#define SIZEOF_IS_ULONG 1
+ #elif __sparc__
+ #define PTRDIFF_IS_LONG 0
+ #define SIZEOF_IS_ULONG 0
+-#elif __sparc64__
+-#define PTRDIFF_IS_LONG 1
+-#define SIZEOF_IS_ULONG 1
+ #elif __vax__
+ #define PTRDIFF_IS_LONG 0
+ #define SIZEOF_IS_ULONG 0
diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-6.2_beta2.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-6.2_beta2.ebuild
index 242b6cf15852..9fdd0fd67521 100644
--- a/sys-freebsd/freebsd-ubin/freebsd-ubin-6.2_beta2.ebuild
+++ b/sys-freebsd/freebsd-ubin/freebsd-ubin-6.2_beta2.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/freebsd-ubin-6.2_beta2.ebuild,v 1.3 2006/10/09 09:04:16 the_paya Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/freebsd-ubin-6.2_beta2.ebuild,v 1.4 2006/10/17 10:30:38 uberlord Exp $
inherit bsdmk freebsd flag-o-matic pam
DESCRIPTION="FreeBSD's base system source for /usr/bin"
SLOT="0"
-KEYWORDS="~x86-fbsd"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
IUSE="atm bluetooth ssl usb nls ipv6 kerberos nis build"
@@ -55,7 +55,8 @@ PATCHES="${FILESDIR}/${PN}-6.0-bsdcmp.patch
${FILESDIR}/${PN}-lint-stdarg.patch
${FILESDIR}/${PN}-6.0-kdump-ioctl.patch
${FILESDIR}/${PN}-6.1-gcc41.patch
- ${FILESDIR}/${PN}-6.2-rpcgen-gcc4.1.patch"
+ ${FILESDIR}/${PN}-6.2-rpcgen-gcc4.1.patch
+ ${FILESDIR}/${PN}-6.2-sparc64.patch"
# Here we remove some sources we don't need because they are already
# provided by portage's packages or similar. In order: