summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-10-17 10:09:37 +0000
committerRoy Marples <uberlord@gentoo.org>2006-10-17 10:09:37 +0000
commitb3be57d3f35f3ae2bb35e01ee592ff30d75d4b26 (patch)
tree530ba9169583c33357dbad9ecaba63b832544bee /sys-freebsd/freebsd-contrib/files
parentFix use_with noutempter. (diff)
downloadgentoo-2-b3be57d3f35f3ae2bb35e01ee592ff30d75d4b26.tar.gz
gentoo-2-b3be57d3f35f3ae2bb35e01ee592ff30d75d4b26.tar.bz2
gentoo-2-b3be57d3f35f3ae2bb35e01ee592ff30d75d4b26.zip
Added ~sparc-fbsd keyword.
(Portage version: 2.1.2_pre3-r3)
Diffstat (limited to 'sys-freebsd/freebsd-contrib/files')
-rw-r--r--sys-freebsd/freebsd-contrib/files/freebsd-contrib-6.2-sparc64.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-contrib/files/freebsd-contrib-6.2-sparc64.patch b/sys-freebsd/freebsd-contrib/files/freebsd-contrib-6.2-sparc64.patch
new file mode 100644
index 000000000000..64a5b631f426
--- /dev/null
+++ b/sys-freebsd/freebsd-contrib/files/freebsd-contrib-6.2-sparc64.patch
@@ -0,0 +1,79 @@
+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 gnu.orig/usr.bin/binutils/gdb/freebsd-uthread.c gnu/usr.bin/binutils/gdb/freebsd-uthread.c
+--- gnu.orig/usr.bin/binutils/gdb/freebsd-uthread.c 2003-11-12 08:33:18 +0000
++++ gnu/usr.bin/binutils/gdb/freebsd-uthread.c 2006-10-10 20:27:16 +0100
+@@ -454,7 +454,7 @@
+
+ #endif
+
+-#ifdef __sparc64__
++#ifdef __sparc__
+
+ static char jmpmap[125] = {
+ -1
+diff -ur gnu.orig/usr.bin/binutils/libbfd/bfd.h gnu/usr.bin/binutils/libbfd/bfd.h
+--- gnu.orig/usr.bin/binutils/libbfd/bfd.h 2004-07-08 18:05:32 +0100
++++ gnu/usr.bin/binutils/libbfd/bfd.h 2006-10-10 20:29:03 +0100
+@@ -63,7 +63,7 @@
+ #define BFD_HOST_64BIT_LONG 0
+ #define BFD_HOST_64_BIT long long
+ #define BFD_HOST_U_64_BIT unsigned long long
+-#elif defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) || defined(__ia64__)
++#elif defined(__alpha__) || (defined(__sparc__) && defined(__arch64__)) || defined(__amd64__) || defined(__ia64__)
+ /* The word size of the default bfd target. */
+ #define BFD_DEFAULT_TARGET_SIZE 64
+ #define BFD_HOST_64BIT_LONG 1
+diff -ur gnu.orig/usr.bin/binutils/libiberty/config.h gnu/usr.bin/binutils/libiberty/config.h
+--- gnu.orig/usr.bin/binutils/libiberty/config.h 2004-06-16 08:09:41 +0100
++++ gnu/usr.bin/binutils/libiberty/config.h 2006-10-10 20:30:34 +0100
+@@ -7,7 +7,7 @@
+
+
+ /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
+-#ifdef __sparc64__
++#ifdef __sparc__
+ #define BYTEORDER 4321
+ #else
+ #define BYTEORDER 1234
+@@ -325,7 +325,7 @@
+
+ /* Define if the host machine stores words of multi-word integers in
+ big-endian order. */
+-#ifdef __sparc64__
++#ifdef __sparc__
+ #define HOST_WORDS_BIG_ENDIAN 1
+ #endif
+
+@@ -366,7 +366,7 @@
+ #define TIME_WITH_SYS_TIME 1
+
+ /* whether byteorder is bigendian */
+-#ifdef __sparc64__
++#ifdef __sparc__
+ #define WORDS_BIGENDIAN 1
+ #endif
+
+diff -ur gnu.orig/usr.bin/cc/cc_tools/auto-host.h gnu/usr.bin/cc/cc_tools/auto-host.h
+--- gnu.orig/usr.bin/cc/cc_tools/auto-host.h 2004-07-28 06:27:20 +0100
++++ gnu/usr.bin/cc/cc_tools/auto-host.h 2006-10-10 20:31:36 +0100
+@@ -526,7 +526,7 @@
+ #if defined(__i386__) || defined(__powerpc__) || defined(__strongarm__)
+ /* The number of bytes in type long */
+ # define SIZEOF_LONG SIZEOF_INT
+-#elif defined(__alpha__) || defined(__sparc64__) || defined(__ia64__) || defined(__amd64__)
++#elif defined(__alpha__) || (defined(__sparc__) && defined(__arch64__)) || defined(__ia64__) || defined(__amd64__)
+ # define SIZEOF_LONG SIZEOF_LONG_LONG
+ #else
+ # error "I don't know what arch this is."