openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1782030 - in /openoffice/trunk: ext_libraries/coinmp/ main/ main/bridges/source/cpp_uno/gcc3_linux_alpha/ main/bridges/source/cpp_uno/gcc3_linux_arm/ main/bridges/source/cpp_uno/gcc3_linux_hppa/ main/bridges/source/cpp_uno/gcc3_linux_ia64/...
Date Tue, 07 Feb 2017 16:32:02 GMT
Author: damjan
Date: Tue Feb  7 16:32:02 2017
New Revision: 1782030

URL: http://svn.apache.org/viewvc?rev=1782030&view=rev
Log:
Add initial support for building AOO with Clang on Linux.

This allows Ubuntu 16.04 to compile AOO with Clang 1.8 on an x86.

Other architectures probably don't work, as Clang 1.8 is pretty
strict about the low-level C++ ABI hacks in main/bridges, but at
least they should fail early in main/bridges instead of the
previous behaviour, where main/bridges compiles nothing when
"$(COM)" != "GCC" and main/i18npool then fails with a mysterious
"error: cannot get uno environments" message.

Patch by: me


Added:
    openoffice/trunk/ext_libraries/coinmp/coinmp-1.7.6-clang-1.8.patch
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/abi.cxx
Modified:
    openoffice/trunk/ext_libraries/coinmp/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
    openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
    openoffice/trunk/main/configure.ac
    openoffice/trunk/main/graphite/makefile.mk
    openoffice/trunk/main/sal/inc/sal/mathconf.h
    openoffice/trunk/main/set_soenv.in
    openoffice/trunk/main/solenv/gbuild/platform/linux.mk
    openoffice/trunk/main/solenv/inc/tg_compv.mk
    openoffice/trunk/main/solenv/inc/unx.mk
    openoffice/trunk/main/solenv/inc/unxlng.mk

Added: openoffice/trunk/ext_libraries/coinmp/coinmp-1.7.6-clang-1.8.patch
URL: http://svn.apache.org/viewvc/openoffice/trunk/ext_libraries/coinmp/coinmp-1.7.6-clang-1.8.patch?rev=1782030&view=auto
==============================================================================
--- openoffice/trunk/ext_libraries/coinmp/coinmp-1.7.6-clang-1.8.patch (added)
+++ openoffice/trunk/ext_libraries/coinmp/coinmp-1.7.6-clang-1.8.patch Tue Feb  7 16:32:02
2017
@@ -0,0 +1,11 @@
+--- misc/build/CoinMP-1.7.6/Cbc/src/Cbc_C_Interface.cpp	2013-04-10 18:58:16.000000000 +0200
++++ misc/build/CoinMP-1.7.6/Cbc/src/Cbc_C_Interface.cpp	2017-02-06 20:39:00.267698261 +0200
+@@ -376,7 +376,7 @@
+ 
+     char * result = model->information_;
+ 
+-    if (VERBOSE > 0) printf("%s return %p\n", prefix, result);
++    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
+     return result;
+ }
+ /* Copy in integer information */

Modified: openoffice/trunk/ext_libraries/coinmp/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/ext_libraries/coinmp/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/ext_libraries/coinmp/makefile.mk (original)
+++ openoffice/trunk/ext_libraries/coinmp/makefile.mk Tue Feb  7 16:32:02 2017
@@ -45,7 +45,7 @@ all:
 TARFILE_NAME=CoinMP-1.7.6
 TARFILE_MD5=1cce53bf4b40ae29790d2c5c9f8b1129
 
-PATCH_FILES=coinmp-1.7.6.patch coinmp-1.7.6-clang.patch
+PATCH_FILES=coinmp-1.7.6.patch coinmp-1.7.6-clang.patch coinmp-1.7.6-clang-1.8.patch
 .IF "$(OS)"=="OS2"
 PATCH_FILES+=coinmp-1.6.0-os2.patch
 .ENDIF

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_alpha/makefile.mk Tue Feb  7 16:32:02
2017
@@ -34,7 +34,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXL"
+.IF "$(OS)$(CPU)" == "LINUXL"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk Tue Feb  7 16:32:02
2017
@@ -35,7 +35,7 @@ NO_BSYMBOLIC=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXRgcc3"
+.IF "$(OS)$(CPU)$(COMNAME)" == "LINUXRgcc3"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk Tue Feb  7 16:32:02
2017
@@ -35,7 +35,7 @@ NO_BSYMBOLIC=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXH"
+.IF "$(OS)$(CPU)" == "LINUXH"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_ia64/makefile.mk Tue Feb  7 16:32:02
2017
@@ -34,7 +34,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXAgcc3"
+.IF "$(OS)$(CPU)$(COMNAME)" == "LINUXAgcc3"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Added: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/abi.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/abi.cxx?rev=1782030&view=auto
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/abi.cxx (added)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/abi.cxx Tue Feb  7 16:32:02
2017
@@ -0,0 +1,48 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_bridges.hxx"
+
+#include <typeinfo>
+#include <cstddef>
+
+#include <uno/any2.h>
+#include <cppu/macros.hxx>
+
+#include "share.hxx"
+
+// At least Clang 3.8 can't compile our CPPU_CURRENT_NAMESPACE::__cxa_get_globals()
+// decleration with <exception> or anything else that indirectly includes <cxxabi.h>
+// included, as it sees it as a an overload of __cxxabi::__cxa_get_globals() with a
+// different return type. Thus, it has to be placed in a file that doesn't include
+// those, and wrapped in a function:
+namespace CPPU_CURRENT_NAMESPACE
+{
+  extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+
+  __cxa_eh_globals *__INTERNAL__cxa_get_globals() throw()
+  {
+    return __cxa_get_globals();
+  }
+}

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx Tue Feb  7 16:32:02
2017
@@ -24,6 +24,11 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_bridges.hxx"
 
+#include <typeinfo>
+#include <exception>
+#include <cstddef>
+#include <cxxabi.h>
+
 #include <com/sun/star/uno/genfunc.hxx>
 #include "com/sun/star/uno/RuntimeException.hpp"
 #include <uno/data.h>
@@ -412,7 +417,8 @@ unsigned char * codeSnippet(
 struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
 
 bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block) {
+bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
+{
     return static_cast< Slot * >(block) + 2;
 }
 

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx Tue Feb  7 16:32:02
2017
@@ -19,15 +19,23 @@
  * 
  *************************************************************/
 
+
+
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_bridges.hxx"
 
-#include <cstdio>
-#include <cstring>
+#include <cstddef>
+#include <exception>
+#include <typeinfo>
+
+#include <stdio.h>
+#include <string.h>
 #include <dlfcn.h>
 #include <cxxabi.h>
 #include <hash_map>
 
+#include <sys/param.h>
+
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <osl/diagnose.h>
@@ -147,7 +155,7 @@ type_info * RTTI::getRTTI( typelib_Compo
         buf.append( 'E' );
 
         OString symName( buf.makeStringAndClear() );
-        rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+        rtti = static_cast<type_info *>(dlsym( m_hApp, symName.getStr() ));
 
         if (rtti)
         {
@@ -167,20 +175,28 @@ type_info * RTTI::getRTTI( typelib_Compo
                 char const * rttiName = symName.getStr() +4;
 #if OSL_DEBUG_LEVEL > 1
                 fprintf( stderr,"generated rtti for %s\n", rttiName );
+#ifndef __GLIBCXX__ /* #i124421# */
+                const OString aCUnoName = OUStringToOString( unoName, RTL_TEXTENCODING_UTF8);
+                OSL_TRACE( "TypeInfo for \"%s\" not found and cannot be generated.\n", aCUnoName.getStr());
+#endif /* __GLIBCXX__ */
 #endif
+#ifdef __GLIBCXX__ /* #i124421# */
                 if (pTypeDescr->pBaseTypeDescription)
                 {
                     // ensure availability of base
                     type_info * base_rtti = getRTTI(
                         (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription
);
                     rtti = new __si_class_type_info(
-                        strdup( rttiName ), (__class_type_info *)base_rtti );
+                        strdup( rttiName ), static_cast<__class_type_info *>(base_rtti)
);
                 }
                 else
                 {
                     // this class has no base class
                     rtti = new __class_type_info( strdup( rttiName ) );
                 }
+#else /* __GLIBCXX__ */
+                rtti = NULL;
+#endif /* __GLIBCXX__ */
 
                 pair< t_rtti_map::iterator, bool > insertion(
                     m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/makefile.mk Tue Feb  7 16:32:02
2017
@@ -34,7 +34,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXIgcc3"
+.IF "$(OS)$(CPU)$(COMNAME)" == "LINUXIgcc3"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA
@@ -50,7 +50,8 @@ SLOFILES= \
 	$(SLO)$/except.obj		\
 	$(SLO)$/cpp2uno.obj		\
     $(SLO)$/uno2cpp.obj \
-    $(SLO)$/call.obj
+    $(SLO)$/call.obj \
+    $(SLO)$/abi.obj
 
 SHL1TARGET= $(TARGET)
 

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx Tue Feb  7 16:32:02
2017
@@ -23,10 +23,6 @@
 
 #include "uno/mapping.h"
 
-#include <typeinfo>
-#include <exception>
-#include <cstddef>
-
 namespace CPPU_CURRENT_NAMESPACE
 {
 
@@ -34,6 +30,7 @@ void dummy_can_throw_anything( char cons
 
 // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
 
+#ifdef __GLIBCXX__
 struct _Unwind_Exception
 {
     unsigned exception_class __attribute__((__mode__(__DI__)));
@@ -62,18 +59,21 @@ struct __cxa_exception
     
     _Unwind_Exception unwindHeader;
 };    
+#endif /* __GLIBCXX__ */
 
 extern "C" void *__cxa_allocate_exception(
     std::size_t thrown_size ) throw();
 extern "C" void __cxa_throw (
     void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
 
+#ifdef __GLIBCXX__
 struct __cxa_eh_globals
 {
     __cxa_exception *caughtExceptions;
     unsigned int uncaughtExceptions;
 };
-extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+__cxa_eh_globals *__INTERNAL__cxa_get_globals () throw();
+#endif /* __GLIBCXX__ */
 
 // -----
 
@@ -81,6 +81,10 @@ extern "C" __cxa_eh_globals *__cxa_get_g
 void raiseException(
     uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
 //==================================================================================================
+#ifndef __GLIBCXX__
+using __cxxabiv1:: __cxa_exception;
+#endif /* __GLIBCXX__ */
+
 void fillUnoException(
     __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
 }

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx Tue Feb  7 16:32:02
2017
@@ -24,7 +24,11 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_bridges.hxx"
 
-#include <malloc.h>
+#include <typeinfo>
+#include <exception>
+#include <cstddef>
+#include <cxxabi.h>
+#include <stdlib.h>
 
 #include <com/sun/star/uno/genfunc.hxx>
 #include "com/sun/star/uno/RuntimeException.hpp"
@@ -305,7 +309,7 @@ static void cpp_call(
  	catch (...)
  	{
   		// fill uno exception
-		fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc,
pThis->getBridge()->getCpp2Uno() );
+		CPPU_CURRENT_NAMESPACE::fillUnoException( CPPU_CURRENT_NAMESPACE::__INTERNAL__cxa_get_globals()->caughtExceptions,
*ppUnoExc, pThis->getBridge()->getCpp2Uno() );
         
 		// temporary params
 		for ( ; nTempIndizes--; )

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk Tue Feb  7 16:32:02
2017
@@ -35,7 +35,7 @@ NO_BSYMBOLIC=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUX6gcc3"
+.IF "$(OS)$(CPU)$(COMNAME)" == "LINUX6gcc3"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk Tue Feb  7 16:32:02
2017
@@ -34,7 +34,7 @@ NO_BSYMBOLIC=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXM"
+.IF "$(OS)$(CPU)" == "LINUXM"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc/makefile.mk Tue Feb  7
16:32:02 2017
@@ -33,7 +33,7 @@ ENABLE_EXCEPTIONS=TRUE
 .INCLUDE :  settings.mk
 
 # --- Files --------------------------------------------------------
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)$(CPUNAME)" == "GCCLINUXPgcc3POWERPC"
+.IF "$(OS)$(CPU)$(COMNAME)$(CPUNAME)" == "LINUXPgcc3POWERPC"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_powerpc64/makefile.mk Tue Feb
 7 16:32:02 2017
@@ -34,7 +34,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)$(CPUNAME)" == "GCCLINUXPgcc3POWERPC64"
+.IF "$(OS)$(CPU)$(COMNAME)$(CPUNAME)" == "LINUXPgcc3POWERPC64"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390/makefile.mk Tue Feb  7 16:32:02
2017
@@ -34,7 +34,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)$(CPUNAME)" == "GCCLINUX3gcc3S390"
+.IF "$(OS)$(CPU)$(COMNAME)$(CPUNAME)" == "LINUX3gcc3S390"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_s390x/makefile.mk Tue Feb  7 16:32:02
2017
@@ -34,7 +34,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)$(CPUNAME)" == "GCCLINUX3gcc3S390X"
+.IF "$(OS)$(CPU)$(COMNAME)$(CPUNAME)" == "LINUX3gcc3S390X"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_sparc/makefile.mk Tue Feb  7 16:32:02
2017
@@ -33,7 +33,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXS"
+.IF "$(OS)$(CPU)" == "LINUXS"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_linux_x86-64/makefile.mk Tue Feb  7
16:32:02 2017
@@ -34,7 +34,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- Files --------------------------------------------------------
 
-.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCLINUXXgcc3"
+.IF "$(OS)$(CPU)$(COMNAME)" == "LINUXXgcc3"
 
 .IF "$(cppu_no_leak)" == ""
 CFLAGS += -DLEAK_STATIC_DATA

Modified: openoffice/trunk/main/configure.ac
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/configure.ac?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/configure.ac (original)
+++ openoffice/trunk/main/configure.ac Tue Feb  7 16:32:02 2017
@@ -1698,12 +1698,19 @@ if test "$_os" != "WINNT" -o "$WITH_MING
    AC_PROG_CC
 fi
 
-if test "$_os" = "FreeBSD"; then
-    FBSD_GCC_RPATH=
+dnl Clang detection on supported platforms
+if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
     if $CC --version 2>&1 | $GREP clang > /dev/null ; then
         COM_IS=CLANG
     else
         COM_IS=GCC
+    fi
+    AC_SUBST(COM_IS)
+fi
+
+if test "$_os" = "FreeBSD"; then
+    FBSD_GCC_RPATH=
+    if "$COM_IS" = "GCC"; then
         rpath=`$CC --print-file-name libstdc++.so`
         rpath=`realpath $rpath`
         rpath=`dirname $rpath`
@@ -1711,7 +1718,6 @@ if test "$_os" = "FreeBSD"; then
             FBSD_GCC_RPATH="-Wl,-rpath=$rpath"
 	fi
     fi
-    AC_SUBST(COM_IS)
     AC_SUBST(FBSD_GCC_RPATH)
 fi
 

Modified: openoffice/trunk/main/graphite/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/graphite/makefile.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/graphite/makefile.mk (original)
+++ openoffice/trunk/main/graphite/makefile.mk Tue Feb  7 16:32:02 2017
@@ -92,7 +92,7 @@ CFLAGS4MSC= $(CFLAGS2MSC:s/ -/ $(JUSTASL
 BUILD_FLAGS+= "CFLAGS4MSC=$(CFLAGS4MSC)" /F makefile.vc$(VCNUM) lib_dll
 .ENDIF
 
-.IF "$(COM)"=="GCC" || "$(OS)"=="FREEBSD"
+.IF "$(COM)"=="GCC" || "$(COM)"=="CLANG"
 
 # Does linux want --disable-shared?
 .IF "x$(debug)"!="x"
@@ -137,7 +137,7 @@ OUT2LIB=engine$/release$/*.lib
 OUT2LIB=engine$/src$/.libs$/libgraphite*.a
 .ENDIF
 
-.IF "$(COM)"=="GCC" || "$(OS)"=="FREEBSD"
+.IF "$(COM)"=="GCC" || "$(COM)"=="CLANG"
 BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
 .ENDIF
 

Modified: openoffice/trunk/main/sal/inc/sal/mathconf.h
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/inc/sal/mathconf.h?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/sal/inc/sal/mathconf.h (original)
+++ openoffice/trunk/main/sal/inc/sal/mathconf.h Tue Feb  7 16:32:02 2017
@@ -61,9 +61,10 @@ extern "C" {
 	#else
 		#define SAL_MATH_FINITE(d) finite(d) // fall back to pre-C99 name
 	#endif
-#elif defined(__STDC__)
+#elif defined(__STDC__) && !(defined(LINUX) && defined(__clang__))
 	// isfinite() should be available in math.h according to C99,C++99,SUSv3,etc.
-	// unless GCC bug 14608 hits us where cmath undefines isfinite() as macro
+	// unless GCC bug 14608 hits us where cmath undefines isfinite() as macro.
+	// Clang on Linux runs into that bug too.
 	#define SAL_MATH_FINITE(d) isfinite(d)
 #elif defined( WNT)
 #define SAL_MATH_FINITE(d) _finite(d)

Modified: openoffice/trunk/main/set_soenv.in
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/set_soenv.in?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/set_soenv.in (original)
+++ openoffice/trunk/main/set_soenv.in Tue Feb  7 16:32:02 2017
@@ -442,7 +442,7 @@ elsif ( $platform =~ m/linux/ )
 # General Linux settings:
       $CVER           = "C341";
       $BIG_SVX        = "TRUE";
-      $COM            = "GCC";
+      $COM            = "@COM_IS@";
       $COMPATH        = '@COMPATH@'; 
       $GLIBC          = "2REDHAT60";
       $GUI            = "UNX";

Modified: openoffice/trunk/main/solenv/gbuild/platform/linux.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/gbuild/platform/linux.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/gbuild/platform/linux.mk (original)
+++ openoffice/trunk/main/solenv/gbuild/platform/linux.mk Tue Feb  7 16:32:02 2017
@@ -22,7 +22,6 @@
 
 
 GUI := UNX
-COM := GCC
 
 gb_MKTEMP := mktemp -t gbuild.XXXXXX
 
@@ -110,8 +109,10 @@ gb_LinkTarget_LDFLAGS := -Wl,--sysroot=$
 endif
 gb_LinkTarget_EXCEPTIONFLAGS := \
 	-DEXCEPTIONS_ON \
-	-fexceptions \
-	-fno-enforce-eh-specs \
+	-fexceptions
+ifeq ($(COM),GCC)
+gb_LinkTarget_EXCEPTIONFLAGS +=  -fno-enforce-eh-specs
+endif
 
 gb_LinkTarget_NOEXCEPTIONFLAGS := \
 	-DEXCEPTIONS_OFF \
@@ -141,11 +142,19 @@ ifeq ($(gb_DEBUGLEVEL),0)
 gb_LinkTarget_LDFLAGS += -Wl,-O1
 endif
 
+ifeq ($(COM),CLANG)
+ifeq ($(ENABLE_SYMBOLS),SMALL)
+gb_DEBUG_CFLAGS := -ggdb1 -fno-inline
+else
+gb_DEBUG_CFLAGS := -ggdb3 -fno-inline
+endif
+else
 ifeq ($(ENABLE_SYMBOLS),SMALL)
 gb_DEBUG_CFLAGS := -ggdb1 -finline-limit=0 -fno-inline -fno-default-inline
 else
 gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
 endif
+endif
 
 ifeq ($(gb_DEBUGLEVEL),2)
 gb_COMPILEROPTFLAGS := -O0

Modified: openoffice/trunk/main/solenv/inc/tg_compv.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/tg_compv.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/inc/tg_compv.mk (original)
+++ openoffice/trunk/main/solenv/inc/tg_compv.mk Tue Feb  7 16:32:02 2017
@@ -104,7 +104,7 @@ COMNAME=MipsPro
 .ENDIF
 
 .IF "$(COM)"=="CLANG"
-.IF "$(OS)" == "FREEBSD"
+.IF "$(OS)" == "FREEBSD" || "$(OS)" == "LINUX"
 COMID=gcc3
 COMNAME=gcc3
 .ELSE

Modified: openoffice/trunk/main/solenv/inc/unx.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/unx.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/inc/unx.mk (original)
+++ openoffice/trunk/main/solenv/inc/unx.mk Tue Feb  7 16:32:02 2017
@@ -75,39 +75,39 @@
 .INCLUDE : unxscoi.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXS"
+.IF "$(OS)$(CPU)" == "LINUXS"
 .INCLUDE : unxlngs.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXI"
+.IF "$(OS)$(CPU)" == "LINUXI"
 .INCLUDE : unxlngi.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXX"
+.IF "$(OS)$(CPU)" == "LINUXX"
 .INCLUDE : unxlngx.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)$(CPUNAME)" == "GCCLINUXPPOWERPC"
+.IF "$(OS)$(CPU)$(CPUNAME)" == "LINUXPPOWERPC"
 .INCLUDE : unxlngppc.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)$(CPUNAME)" == "GCCLINUXPPOWERPC64"
+.IF "$(OS)$(CPU)$(CPUNAME)" == "LINUXPPOWERPC64"
 .INCLUDE : unxlngppc64.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)$(CPUNAME)" == "GCCLINUX3S390"
+.IF "$(OS)$(CPU)$(CPUNAME)" == "LINUX3S390"
 .INCLUDE : unxlngs390.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)$(CPUNAME)" == "GCCLINUX3S390X"
+.IF "$(OS)$(CPU)$(CPUNAME)" == "LINUX3S390X"
 .INCLUDE : unxlngs390x.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXR"
+.IF "$(OS)$(CPU)" == "LINUXR"
 .INCLUDE : unxlngr.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXA"
+.IF "$(OS)$(CPU)" == "LINUXA"
 .INCLUDE : unxlnga.mk
 .ENDIF
 
@@ -160,19 +160,19 @@
 .INCLUDE : unxmaccx.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXM"
+.IF "$(OS)$(CPU)" == "LINUXM"
 .INCLUDE : unxlngmips.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUX6"
+.IF "$(OS)$(CPU)" == "LINUX6"
 .INCLUDE : unxlngm68k.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXH"
+.IF "$(OS)$(CPU)" == "LINUXH"
 .INCLUDE : unxlnghppa.mk
 .ENDIF
 
-.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXL"
+.IF "$(OS)$(CPU)" == "LINUXL"
 .INCLUDE : unxlngaxp.mk
 .ENDIF
 

Modified: openoffice/trunk/main/solenv/inc/unxlng.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/unxlng.mk?rev=1782030&r1=1782029&r2=1782030&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/inc/unxlng.mk (original)
+++ openoffice/trunk/main/solenv/inc/unxlng.mk Tue Feb  7 16:32:02 2017
@@ -79,7 +79,11 @@ CFLAGSENABLESYMBOLS=-g # was temporarily
 # flags for the C++ Compiler
 CFLAGSCC= -pipe $(ARCH_FLAGS)
 # Flags for enabling exception handling
+.IF "$(COM)"=="CLANG"
+CFLAGSEXCEPTIONS=-fexceptions
+.ELSE
 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
+.ENDIF
 # Flags for disabling exception handling
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
 



Mime
View raw message