summaryrefslogtreecommitdiff
path: root/patches/OOO_1_1/sparc-v8-fixes.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/OOO_1_1/sparc-v8-fixes.diff')
-rw-r--r--patches/OOO_1_1/sparc-v8-fixes.diff98
1 files changed, 98 insertions, 0 deletions
diff --git a/patches/OOO_1_1/sparc-v8-fixes.diff b/patches/OOO_1_1/sparc-v8-fixes.diff
new file mode 100644
index 000000000..6a3e7d095
--- /dev/null
+++ b/patches/OOO_1_1/sparc-v8-fixes.diff
@@ -0,0 +1,98 @@
+Index: sal/osl/unx/util.c
+===================================================================
+RCS file: /cvs/porting/sal/osl/unx/util.c,v
+retrieving revision 1.5
+diff -u -u -r1.5 util.c
+--- sal/osl/unx/util.c 2 Jul 2003 13:35:19 -0000 1.5
++++ sal/osl/unx/util.c 12 Jul 2004 08:02:39 -0000
+@@ -398,3 +398,23 @@
+
+ #endif
+
++#if defined ( LINUX ) && defined ( SPARC )
++#include <sys/utsname.h>
++void osl_InitSparcV9(void) __attribute__((constructor));
++void osl_InterlockedCountSetV9(sal_Bool bV9);
++/* Determine which machine we are running on (sparc or sparc64)
++ * The approach is very similar to Solaris.
++ */
++void osl_InitSparcV9(void)
++{
++ struct utsname name;
++ int rc;
++ rc = uname(&name);
++ if ( rc != -1 ) {
++ if ( !strcmp( "sparc", name.machine ))
++ return;
++ osl_InterlockedCountSetV9(sal_True);
++ }
++}
++
++#endif
+Index: sal/osl/unx/asm/interlck_sparc.s
+===================================================================
+RCS file: /cvs/porting/sal/osl/unx/asm/interlck_sparc.s,v
+retrieving revision 1.3
+diff -u -u -r1.3 interlck_sparc.s
+--- sal/osl/unx/asm/interlck_sparc.s 28 Apr 2003 17:13:44 -0000 1.3
++++ sal/osl/unx/asm/interlck_sparc.s 12 Jul 2004 08:02:39 -0000
+@@ -248,7 +248,9 @@
+
+ 1: ld [%o0], %o1
+ add %o1, 1, %o2
+- cas [%o0], %o1, %o2
++! allow linux to build for v8
++ .word 0xD5E21009
++! cas [%o0], %o1, %o2
+ cmp %o1, %o2
+ bne 1b
+ nop ! delay slot
+@@ -267,7 +269,9 @@
+
+ 1: ld [%o0], %o1
+ sub %o1, 1, %o2
+- cas [%o0], %o1, %o2
++! allow linux to build for v8
++ .word 0xD5E21009
++! cas [%o0], %o1, %o2
+ cmp %o1, %o2
+ bne 1b
+ nop ! delay slot
+@@ -276,4 +280,3 @@
+
+ .type osl_decrementInterlockedCountV9,#function
+ .size osl_decrementInterlockedCountV9,.-osl_decrementInterlockedCountV9
+-
+Index: sc/source/core/data/makefile.mk
+===================================================================
+RCS file: /cvs/sc/sc/source/core/data/makefile.mk,v
+retrieving revision 1.6.260.3
+diff -u -u -r1.6.260.3 makefile.mk
+--- sc/source/core/data/makefile.mk 28 Jan 2004 10:02:07 -0000 1.6.260.3
++++ sc/source/core/data/makefile.mk 12 Jul 2004 08:02:42 -0000
+@@ -205,7 +205,8 @@
+ $(SLO)$/table3.obj \
+ $(SLO)$/table4.obj \
+ $(SLO)$/documen4.obj \
+- $(SLO)$/conditio.obj
++ $(SLO)$/conditio.obj \
++ $(SLO)$/validat.obj
+ .ENDIF
+
+ EXCEPTIONSFILES= \
+Index: solenv/inc/unxlngs.mk
+===================================================================
+RCS file: /cvs/tools/solenv/inc/unxlngs.mk,v
+retrieving revision 1.2.50.2
+diff -u -u -r1.2.50.2 unxlngs.mk
+--- solenv/inc/unxlngs.mk 30 Mar 2004 13:17:38 -0000 1.2.50.2
++++ solenv/inc/unxlngs.mk 12 Jul 2004 08:02:55 -0000
+@@ -62,7 +62,7 @@
+
+ # mk file for unxlngs
+ ASM=$(CC)
+-AFLAGS=-Wa,-Av8plus,-K,PIC -c $(CDEFS)
++AFLAGS=-Wa,-K,PIC -c $(CDEFS)
+
+ SOLAR_JAVA*=TRUE
+ JAVAFLAGSDEBUG=-g