Hi OpenOffice.org users.... Im working for the switch to using gcc3.1 fo building OpenOffice.org. This was nessassary for building OpenOffice.org on PPC with gcc3 and above.
Kevin B Hendriks and me ported the assambly code in the bridges module
for using gcc3.1 with OpenOffice.org.
gcc3.0.x was not quite ready for using with OpenOffice.org, so Kevin
wanted not to port the assambly with gcc-3.0.x.
So .. I think it is done an time to check. I finished the patchset for
using gcc3.1. The new bridges code will follow ...
I want to leave the alternative with building with gcc3.0.x for woody,
but for PPC I will drop the gcc2.95 support.
This means, OpenOffice.org compiled with gcc-3.1 will break the
compatibility for using with woody, because there were some ABI-changes.
I had attached the patches I wanted include to OpenOffice.org. I have to
see, perhaps, some of the other patches can be dropped, but I'm not
sure.
If you have some thoughts of it, please mail.
Regards
Jan
--
.''`. Jan-Hendrik Palic |
: :' : ** Debian GNU/ Linux ** | ** OpenOffice.org ** ,.. ,..
`. `' http://www.debian.org | http://www.openoffice.org ,: ..` `
`- [EMAIL PROTECTED] | ' ` `
--- oo_641c_src/tools/source/datetime/ttime.cxx.gcc3 Mon Jun 11 19:17:46 2001
+++ oo_641c_src/tools/source/datetime/ttime.cxx Thu Feb 21 19:44:52 2002
@@ -73,7 +73,7 @@
#include <dos.h>
#elif defined UNX
#include <limits.h>
-#ifdef IRIX
+#if defined( IRIX ) || defined( UNX )
#include <unistd.h>
#endif
#include <sys/times.h>
@@ -493,7 +493,13 @@
if ( !nImplTicksPerSecond )
{
+#if defined( CLK_TCK )
nImplTicksPerSecond = CLK_TCK;
+#elif defined( _SC_CLK_TCK )
+ nImplTicksPerSecond = sysconf(_SC_CLK_TCK);
+#else
+#error "I don't know how to get CLK_TCK, you lose."
+#endif
dImplTicksPerSecond = nImplTicksPerSecond;
dImplTicksULONGMAX = (double)(ULONG)ULONG_MAX;
}
--- solenv/inc/settings.mk.orig Fri Mar 8 04:23:21 2002 +++ solenv/inc/settings.mk Tue May 21 14:55:11 2002 @@ -986,6 +986,7 @@ .ENDIF # "$(L10N_framework)"!="" SCPDEFS+=-U$(COMID) -DCOMID=$(COMID) -DCOMNAME=$(COMNAME) -D_$(COMID) +SCPDEFS+=-DCCNUMVER=$(CCNUMVER) UNOIDLDEFS+=-DSUPD=$(UPD) -DUPD=$(UPD)
--- solenv/bin/getcompver.awk.orig Tue May 21 14:28:43 2002
+++ solenv/bin/getcompver.awk Tue May 21 14:37:29 2002
@@ -80,6 +80,9 @@
/^[0-9]*[.][0-9]*[.][0-9]*$/ {
CCversion = $0
}
+/^[0-9]*[.][0-9]**$/ {
+ CCversion = $0 ".0"
+}
END {
if ( num == "true" ) {
tokencount = split (CCversion,vertoken,".")
--- oo_1.0_src/cppu/inc/cppu/macros.hxx~ Mon Oct 29 16:25:29 2001
+++ oo_1.0_src/cppu/inc/cppu/macros.hxx Tue May 28 14:02:10 2002
@@ -76,7 +76,7 @@
the struct inherits from a base struct the first member is no double or
[unsigned] long long.
@internal
*/
-#if defined(__GNUC__) && defined(LINUX) && defined(INTEL) && (__GNUC__ == 3)
+#if defined(__GNUC__) && defined(LINUX) && (defined(INTEL) ||
defined(POWERPC)) && (__GNUC__ == 3)
#define CPPU_GCC3_ALIGN( base_struct ) __attribute__ ((aligned (__alignof__
(base_struct))))
#else
#define CPPU_GCC3_ALIGN( base_struct )
--- oo_1.0_src/cppu/source/uno/data.cxx~ Fri Oct 19 15:25:14 2001
+++ oo_1.0_src/cppu/source/uno/data.cxx Tue May 28 14:06:02 2002
@@ -307,7 +307,7 @@
if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m
") = %d instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); }
#ifdef DEBUG
-#if defined(__GNUC__) && defined(LINUX) && defined(INTEL)
+#if defined(__GNUC__) && defined(LINUX) && (defined(INTEL) || defined(POWERPC))
#define BINTEST_VERIFYSIZE( s, n ) \
fprintf( stderr, "> sizeof(" #s ") = %d; __alignof__ (" #s ") = %d\n",
sizeof(s), __alignof__ (s) ); \
if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of
expected %d!!!\n", sizeof(s), n ); abort(); }
--- oo_1.0_src/product/util/makefile.mk~ Mon Apr 8 10:34:21 2002
+++ oo_1.0_src/product/util/makefile.mk Tue May 28 13:26:42 2002
@@ -105,14 +105,21 @@
DESTDIRBIN=$(DESTDIR)$/linux$/bin
DESTDIRLIB=$(DESTDIR)$/linux$/lib
DESTDIRDLL=$(DESTDIRLIB)
-STLPORTLIBNAME=libstlport_gcc.so
+STLPORTLIBNAME=libstlport_gcc_3.1.so
BINDINGDLL=$(COMNAME)_uno
.IF "$(COMID)"=="gcc3"
+.IF "$(CCNUMVER)">="000300010000"
+ADDITIONAL_DLLS= \
+ $(DESTDIRDLL)$/libgcc_s.so.1 \
+ $(DESTDIRDLL)$/libgcc_s.so \
+ $(DESTDIRDLL)$/libstdc++.so.4 \
+ $(DESTDIRDLL)$/libstdc++.so.4.0.0
+.ELSE
ADDITIONAL_DLLS= \
$(DESTDIRDLL)$/libgcc_s.so.1 \
$(DESTDIRDLL)$/libgcc_s.so \
$(DESTDIRDLL)$/libstdc++.so.3 \
- $(DESTDIRDLL)$/libstdc++.so.3.0.1
+ $(DESTDIRDLL)$/libstdc++.so.3.0.4
.ENDIF
.ELIF "$(OS)"=="FREEBSD"
###########
@@ -432,19 +439,37 @@
$(GNUCOPY) -p $(DLLOUT)$/$(@:f) $@
$(DESTDIRDLL)$/%$(MY_VERSION_LINKPOSTFIX) :
$(DESTDIRDLL)$/%$(MY_VERSION_DLLPOSTFIX) $(DIRLIST)
+ +rm -f $@
+ln -fs $(@:f)$(MY_VERSION_LINKTARGETPOSTFIX) $@
+ +rm -f $@
+ln -fs $(@:f)$(MY_VERSION_LINKTARGETPOSTFIX) $(@:db)
-
+
#---------------------------------------------------------
# special targets for linux gcc3
-$(DESTDIRDLL)$/libstdc++.so.3.0.1 : $(DLLOUT)$/libstdc++.so.3.0.1 $(DIRLIST)
+
+.IF "$(CCNUMVER)">="000300010000"
+
+$(DESTDIRDLL)$/libstdc++.so.4.0.0 : $(DLLOUT)$/libstdc++.so.4.0.0 $(DIRLIST)
+ -rm -f $@
+ $(GNUCOPY) -p $(DLLOUT)$/libstdc++.so.4.0.0 $@
+
+$(DESTDIRDLL)$/libstdc++.so.4 : $(DESTDIRDLL)$/libstdc++.so.4.0.0 $(DIRLIST)
+ -rm -f $@
+ +ln -s libstdc++.so.4.0.0 $@
+
+.ELSE
+
+$(DESTDIRDLL)$/libstdc++.so.3.0.4 : $(DLLOUT)$/libstdc++.so.3.0.4 $(DIRLIST)
-rm -f $@
- $(GNUCOPY) -p $(DLLOUT)$/libstdc++.so.3.0.1 $@
+ $(GNUCOPY) -p $(DLLOUT)$/libstdc++.so.3.0.4 $@
-$(DESTDIRDLL)$/libstdc++.so.3 : $(DESTDIRDLL)$/libstdc++.so.3.0.1 $(DIRLIST)
+$(DESTDIRDLL)$/libstdc++.so.3 : $(DESTDIRDLL)$/libstdc++.so.3.0.4 $(DIRLIST)
-rm -f $@
- +ln -s libstdc++.so.3.0.1 $@
+ +ln -s libstdc++.so.3.0.4 $@
+
+.ENDIF
+
$(DESTDIRDLL)$/libgcc_s.so.1 : $(DLLOUT)$/libgcc_s.so.1 $(DIRLIST)
-rm -f $@
--- oo_1.0_src/product/inc/scp/udk_basefiles.scp~ Fri Mar 15 12:58:28 2002
+++ oo_1.0_src/product/inc/scp/udk_basefiles.scp Tue May 28 13:41:33 2002
@@ -3,6 +3,7 @@
// Temporary solution/hack: at the moment libstdc++.so and libgcc_s.so are
needed for unxlngi4 environment
// (setup is linked against it).
#if ( defined( _gcc3 ) && defined( C300 ) )
+
File gid_File_Lib_gcc
BIN_FILE_BODY;
Name = STRING(libgcc_s.so.1);
@@ -10,6 +11,25 @@
Styles = (PACKED, SETUPZIP);
End
+
+#if ( CCNUMVER >= 000300010000 )
+
+File gid_File_Lib_Stdc
+ BIN_FILE_BODY;
+ Name = STRING(libstdc++.so.4.0.0);
+ Dir = GCFG_BINARY_DIR;
+ Styles = (PACKED, SETUPZIP);
+End
+
+Shortcut gid_Shortcut_Lib_Stdc
+ FileID = gid_File_Lib_Stdc;
+ Dir = GCFG_BINARY_DIR;
+ Name = STRING(libstdc++.so.4);
+ Styles = (NETWORK,RELATIVE);
+End
+
+#else
+
File gid_File_Lib_Stdc
BIN_FILE_BODY;
Name = STRING(libstdc++.so.3.0.1);
@@ -23,6 +43,8 @@
Name = STRING(libstdc++.so.3);
Styles = (NETWORK,RELATIVE);
End
+
+#endif
#endif
File gid_File_Lib_Sal
--- oo_1.0_src/config_office/configure.in.config-fixes 2002-05-01
15:51:49.000000000 +0200
+++ oo_1.0_src/config_office/configure.in 2002-05-01 16:25:06.000000000
+0200
@@ -984,6 +984,7 @@ dnl testing for X libraries and includes
dnl ***************************************
if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then
dnl Mac OS X using Aqua graphics. Don't check for X11.
+ :
elif test "$_os" != "WINNT" ; then
AC_PATH_X
AC_PATH_XTRA
--- oo_641d_src/config_office/configure.in.gcc31 2002-03-27
20:32:56.000000000 +0100
+++ oo_641d_src/config_office/configure.in 2002-04-08 17:11:32.000000000
+0200
@@ -277,13 +277,15 @@
if test $GCC; then
AC_MSG_CHECKING([the GNU gcc compiler version])
- _gcc_releasetype=`$GCC --version | $AWK -F"-" '{ print \$1 }'`
+ dnl (gb) GCC 3.1+ has more versioning information in --version now
+ GCC_VERSION=`$GCC --version | head -n 1 | cut -d' ' -f3`
+ _gcc_releasetype=`echo $GCC_VERSION | $AWK -F"-" '{ print \$1 }'`
if test "$_gcc_releasetype" = "egcs"; then
AC_MSG_WARN([found egcs- version, use (stable=gcc-) version of the
compiler])
AC_MSG_WARN([found egcs- version, use (stable=gcc-) version of the
compiler]) >> warn
- _gcc_version=`$GCC --version | $AWK -F"-" '{ print \$2 }'`
+ _gcc_version=`echo $GCC_VERSION | $AWK -F"-" '{ print \$2 }'`
else
- _gcc_version=`$GCC --version`
+ _gcc_version=`echo $GCC_VERSION`
fi
_gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
if test -n "$enable_gcc3"; then
@@ -296,13 +298,13 @@
AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+ of
the gcc compiler]) >> warn
COMPATH="NO_GCC"
else
- _gcc_middle=`$GCC --version | $AWK -F. '{ if ($2 != 95) print
"false"; else print "true" }'`
+ _gcc_middle=`echo $GCC_VERSION | $AWK -F. '{ if ($2 != 95) print
"false"; else print "true" }'`
if test "$_gcc_middle" = "false"; then
AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+
of the gcc compiler])
AC_MSG_WARN([found version "$_gcc_version", use version 2.95.2+
of the gcc compiler]) >> warn
COMPATH="NO_GCC"
else
- _gcc_minor=`$GCC --version | $AWK -F. '{ if ($3 < 2) print
"false"; else print "true" }'`
+ _gcc_minor=`echo $GCC_VERSION | $AWK -F. '{ if ($3 < 2) print
"false"; else print "true" }'`
if test "$_gcc_minor" = "false"; then
AC_MSG_WARN([found version "$_gcc_version", use version
2.95.2+ of the gcc compiler])
AC_MSG_WARN([found version "$_gcc_version", use version
2.95.2+ of the gcc compiler]) >> warn
--- oo_641d_src/cppu/inc/uno/lbnames.h.gcc31 2002-04-08 16:46:15.000000000
+0200
+++ oo_641d_src/cppu/inc/uno/lbnames.h 2002-04-08 17:44:00.000000000 +0200
@@ -98,8 +98,10 @@
#error "Tested gcc 2 versions are 2.91 and 2.95. Patch uno/lbnames.h to try
your gcc 2 version."
#elif (__GNUC__ == 3 && __GNUC_MINOR__ == 0)
#define __CPPU_ENV gcc3
+#elif (__GNUC__ == 3 && __GNUC_MINOR__ == 1)
+#define __CPPU_ENV gcc3
#elif (__GNUC__ == 3)
-#error "Tested gcc 3 version is 3.0. Patch uno/lbnames.h to try your gcc 3
version."
+#error "Tested gcc 3 version is <= 3.1. Patch uno/lbnames.h to try your gcc 3
version."
#else
#error "Supported gcc majors are 2 and 3. Unsupported gcc major version."
#endif /* defined (__GNUC__) */
--- tools/inc/solmath.hxx.prev Tue May 21 11:34:03 2002
+++ tools/inc/solmath.hxx Tue May 21 11:33:16 2002
@@ -306,19 +306,48 @@
#elif defined(LINUX)
#include <fpu_control.h>
+#if defined(POWERPC)
+
+// we need to work around a compiler issue for ppc linux in gcc 3.1
+
+#define _MYFPU_GETCW(cw) ( { \
+ union { double d; fpu_control_t cw[2]; } tmp __attribute__
((__aligned__(8))); \
+ __asm__ ("mffs 0; fmr %0, 0" : "=f" (tmp.d) : : "fr0"); \
+ (cw)=tmp.cw[1]; \
+ tmp.cw[1]; } )
+
+#define _MYFPU_SETCW(cw) { \
+ union { double d; fpu_control_t cw[2]; } tmp __attribute__
((__aligned__(8))); \
+ tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
+ tmp.cw[1] = cw; \
+ __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
+}
+
+#endif
+
extern inline void glibc_setfpucw( fpu_control_t set )
{
fpu_control_t cw;
/* Fetch the current control word. */
+
+#if defined(POWERPC)
+ _MYFPU_GETCW(cw);
+#else
_FPU_GETCW(cw);
+#endif
/* Preserve the reserved bits, and set the rest as the user
specified (or the default, if the user gave zero). */
cw &= _FPU_RESERVED;
cw |= set & ~_FPU_RESERVED;
+#if defined(POWERPC)
+ _MYFPU_SETCW(cw);
+#else
_FPU_SETCW(cw);
+#endif
+
}
#define __setfpucw( control_word ) glibc_setfpucw( control_word )
pgpoEMtizfjcC.pgp
Description: PGP signature

