summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-10-17 10:20:18 +0000
committerRoy Marples <uberlord@gentoo.org>2006-10-17 10:20:18 +0000
commit7c61bf9019d82a4128563015d99ca8d2fc94ea55 (patch)
tree0da44c9a6f7331ec68674bfda81e30967bfc8e0e /sys-freebsd/freebsd-libexec/files
parentAdded ~sparc-fbsd keyword. (diff)
downloadgentoo-2-7c61bf9019d82a4128563015d99ca8d2fc94ea55.tar.gz
gentoo-2-7c61bf9019d82a4128563015d99ca8d2fc94ea55.tar.bz2
gentoo-2-7c61bf9019d82a4128563015d99ca8d2fc94ea55.zip
Added ~sparc-fbsd keyword.
(Portage version: 2.1.2_pre3-r3)
Diffstat (limited to 'sys-freebsd/freebsd-libexec/files')
-rw-r--r--sys-freebsd/freebsd-libexec/files/freebsd-libexec-6.2-sparc64.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-libexec/files/freebsd-libexec-6.2-sparc64.patch b/sys-freebsd/freebsd-libexec/files/freebsd-libexec-6.2-sparc64.patch
new file mode 100644
index 000000000000..3ed300a45863
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/freebsd-libexec-6.2-sparc64.patch
@@ -0,0 +1,34 @@
+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 libexec.orig/rtld-elf/rtld.c libexec/rtld-elf/rtld.c
+--- libexec.orig/rtld-elf/rtld.c 2006-10-10 08:16:56 +0100
++++ libexec/rtld-elf/rtld.c 2006-10-10 08:19:08 +0100
+@@ -2732,7 +2732,7 @@
+
+ #endif
+
+-#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) || \
++#if defined(__i386__) || defined(__amd64__) || defined(__sparc__) || \
+ defined(__arm__)
+
+ /*
+@@ -2897,7 +2897,7 @@
+ void
+ free_tls_offset(Obj_Entry *obj)
+ {
+-#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) || \
++#if defined(__i386__) || defined(__amd64__) || defined(__sparc__) || \
+ defined(__arm__)
+ /*
+ * If we were the last thing to allocate out of the static TLS