summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-10-17 10:33:31 +0000
committerRoy Marples <uberlord@gentoo.org>2006-10-17 10:33:31 +0000
commited607cfab358ed18f04189e1279b959094e0ce66 (patch)
treebccb9227588bc9401af8771f6d361868dffc17cf /sys-freebsd/freebsd-lib
parentFix x86-fbsd keyword (diff)
downloadhistorical-ed607cfab358ed18f04189e1279b959094e0ce66.tar.gz
historical-ed607cfab358ed18f04189e1279b959094e0ce66.tar.bz2
historical-ed607cfab358ed18f04189e1279b959094e0ce66.zip
Added ~sparc-fbsd keyword.
Package-Manager: portage-2.1.2_pre3-r3
Diffstat (limited to 'sys-freebsd/freebsd-lib')
-rw-r--r--sys-freebsd/freebsd-lib/ChangeLog6
-rw-r--r--sys-freebsd/freebsd-lib/files/freebsd-lib-6.2-sparc64.patch106
-rw-r--r--sys-freebsd/freebsd-lib/freebsd-lib-6.2_beta2.ebuild7
3 files changed, 115 insertions, 4 deletions
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog
index 4458f44b1600..738d1d90908a 100644
--- a/sys-freebsd/freebsd-lib/ChangeLog
+++ b/sys-freebsd/freebsd-lib/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-freebsd/freebsd-lib
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.33 2006/10/06 17:14:03 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.34 2006/10/17 10:16:05 uberlord Exp $
+
+ 17 Oct 2006; Roy Marples <uberlord@gentoo.org>
+ +files/freebsd-lib-6.2-sparc64.patch, freebsd-lib-6.2_beta2.ebuild:
+ Added ~sparc-fbsd keyword.
06 Oct 2006; Diego Pettenò <flameeyes@gentoo.org>
freebsd-lib-6.2_beta2.ebuild:
diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-6.2-sparc64.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-6.2-sparc64.patch
new file mode 100644
index 000000000000..0759d4996df0
--- /dev/null
+++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-6.2-sparc64.patch
@@ -0,0 +1,106 @@
+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 lib.orig/libc/gen/tls.c lib/libc/gen/tls.c
+--- lib.orig/libc/gen/tls.c 2006-09-02 21:38:13 +0100
++++ lib/libc/gen/tls.c 2006-10-09 18:17:53 +0100
+@@ -61,7 +61,7 @@
+ #if defined(__ia64__) || defined(__alpha__) || defined(__powerpc__)
+ #define TLS_VARIANT_I
+ #endif
+-#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) || \
++#if defined(__i386__) || defined(__amd64__) || defined(__sparc__) || \
+ defined(__arm__)
+ #define TLS_VARIANT_II
+ #endif
+diff -ur lib.orig/libc/gmon/gmon.c lib/libc/gmon/gmon.c
+--- lib.orig/libc/gmon/gmon.c 2004-10-16 07:32:43 +0100
++++ lib/libc/gmon/gmon.c 2006-10-09 18:18:12 +0100
+@@ -53,7 +53,7 @@
+
+ #include "libc_private.h"
+
+-#if defined(__i386__) || defined(__sparc64__) || defined(__amd64__)
++#if defined(__i386__) || defined(__sparc__) || defined(__amd64__)
+ extern char *minbrk __asm (".minbrk");
+ #else
+ extern char *minbrk __asm ("minbrk");
+diff -ur lib.orig/libc/stdlib/malloc.c lib/libc/stdlib/malloc.c
+--- lib.orig/libc/stdlib/malloc.c 2005-09-18 04:45:24 +0100
++++ lib/libc/stdlib/malloc.c 2006-10-09 18:22:29 +0100
+@@ -55,7 +55,7 @@
+ # define malloc_pageshift 13U
+ # define malloc_minsize 16U
+ # endif
+-# if defined(__sparc64__)
++# if defined(__sparc__) && defined(__arch64__)
+ # define malloc_pageshift 13U
+ # define malloc_minsize 16U
+ # endif
+diff -ur lib.orig/libc/xdr/xdr_float.c lib/libc/xdr/xdr_float.c
+--- lib.orig/libc/xdr/xdr_float.c 2004-10-16 07:32:43 +0100
++++ lib/libc/xdr/xdr_float.c 2006-10-09 18:23:17 +0100
+@@ -64,7 +64,7 @@
+ #if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
+ defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
+ defined(__arm__) || defined(__ppc__) || defined(__ia64__) || \
+- defined(__arm26__) || defined(__sparc64__) || defined(__amd64__)
++ defined(__arm26__) || defined(__amd64__)
+ #include <machine/endian.h>
+ #define IEEEFP
+ #endif
+diff -ur lib.orig/libc_r/uthread/pthread_private.h lib/libc_r/uthread/pthread_private.h
+--- lib.orig/libc_r/uthread/pthread_private.h 2005-05-31 20:57:23 +0100
++++ lib/libc_r/uthread/pthread_private.h 2006-10-09 18:24:55 +0100
+@@ -144,7 +144,7 @@
+ GET_BSP_JB(jb) = (long)(stk); \
+ } while (0)
+ #define UPD_STACK_JB(jb, stk) GET_STACK_JB(jb) = (long)(stk)
+-#elif defined(__sparc64__)
++#elif defined(__sparc__) && defined(__arch64__)
+ #include <machine/frame.h>
+
+ #define CCFSZ sizeof (struct frame)
+diff -ur lib.orig/libdisk/disk.c lib/libdisk/disk.c
+--- lib.orig/libdisk/disk.c 2006-05-10 16:26:46 +0100
++++ lib/libdisk/disk.c 2006-10-09 18:26:33 +0100
+@@ -42,7 +42,7 @@
+ p_i386
+ #elif defined(__alpha__)
+ p_alpha
+-#elif defined(__sparc64__)
++#elif defined(__sparc__) && defined(__arch64__)
+ p_sparc64
+ #elif defined(__ia64__)
+ p_ia64
+@@ -309,7 +309,7 @@
+ if (!d->boot1)
+ return -1;
+ memcpy(d->boot1, b1, 15 * 512);
+-#elif defined(__sparc64__)
++#elif defined(__sparc__) && defined(__arch64__)
+ if (d->boot1 != NULL)
+ free(d->boot1);
+ d->boot1 = malloc(16 * 512);
+diff -ur lib.orig/msun/src/math.h lib/msun/src/math.h
+--- lib.orig/msun/src/math.h 2005-04-16 22:12:47 +0100
++++ lib/msun/src/math.h 2006-10-09 18:27:09 +0100
+@@ -69,7 +69,7 @@
+ #define math_errhandling MATH_ERREXCEPT
+
+ /* XXX We need a <machine/math.h>. */
+-#if defined(__ia64__) || defined(__sparc64__)
++#if defined(__ia64__) || defined(__sparc__)
+ #define FP_FAST_FMA
+ #endif
+ #ifdef __ia64__
diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-6.2_beta2.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-6.2_beta2.ebuild
index 8f9b45913a45..46facdcf9173 100644
--- a/sys-freebsd/freebsd-lib/freebsd-lib-6.2_beta2.ebuild
+++ b/sys-freebsd/freebsd-lib/freebsd-lib-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-lib/freebsd-lib-6.2_beta2.ebuild,v 1.5 2006/10/06 17:14:03 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-6.2_beta2.ebuild,v 1.6 2006/10/17 10:16:05 uberlord Exp $
inherit bsdmk freebsd flag-o-matic toolchain-funcs
DESCRIPTION="FreeBSD's base system libraries"
SLOT="6.0"
-KEYWORDS="~x86-fbsd"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
IUSE="atm bluetooth ssl ipv6 kerberos nis gpib build bootstrap"
@@ -82,7 +82,8 @@ PATCHES="${FILESDIR}/${PN}-bsdxml.patch
${FILESDIR}/${PN}-6.0-binutils-asm.patch
${FILESDIR}/${PN}-6.0-ssp.patch
${FILESDIR}/${PN}-6.1-csu.patch
- ${FILESDIR}/${PN}-6.2-gcc41.patch"
+ ${FILESDIR}/${PN}-6.2-gcc41.patch
+ ${FILESDIR}/${PN}-6.2-sparc64.patch"
# Here we disable and remove source which we don't need or want
# In order: