diff options
author | 2006-10-17 10:30:38 +0000 | |
---|---|---|
committer | 2006-10-17 10:30:38 +0000 | |
commit | 1f940d969c8106d7de6e88b0632daf3dd662ce6e (patch) | |
tree | 014fd269653705a22091a457d486fe117cb06096 /sys-freebsd/freebsd-ubin/files | |
parent | Added ~sparc-fbsd keyword. (diff) | |
download | gentoo-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/files')
-rw-r--r-- | sys-freebsd/freebsd-ubin/files/freebsd-ubin-6.2-sparc64.patch | 92 |
1 files changed, 92 insertions, 0 deletions
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 |