On 20 Aug, Pedro Lino wrote:
> Hi Don
> 
>> Try patching solenv/inc/unxlng.mk and solenv/gbuild/platform/linux.mk to
>> add "-std=gnu++98" to CFLAGSCXX.  I recommend doing this for 4.2.0 and
>> trunk as well.  
> 
> I have no idea how to do that... I'm just an advanced user ;)
> I can compile branch 4.2.x without problems (haven't tried trunk). My problem 
> is with branch 4.1.8...
> 
>> Newer versions of gcc default to compiling with more
>> modern C++ standards and spew lots of warnings about old C++ stuff in
>> our code.  Telling the compiler to use an older C++ standard that is
>> more compatible with our code base will greatly reduce the
>> warnings/errors.
> 
> Yes, that seems to be the problem. Too many errors :)

Save the patch below to a file 'patchfile' an apply it to the source
with
  patch -p1 patchfile
or just do the edits by hand.

diff --git a/main/solenv/gbuild/platform/linux.mk 
b/main/solenv/gbuild/platform/linux.mk
index 0a23a43f37..6ab0b336de 100644
--- a/main/solenv/gbuild/platform/linux.mk
+++ b/main/solenv/gbuild/platform/linux.mk
@@ -96,6 +96,7 @@ gb_CXXFLAGS := \
        -fuse-cxa-atexit \
        -fvisibility-inlines-hidden \
        -fvisibility=hidden \
+       -std=gnu++98 \
        -pipe \
 
 ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
diff --git a/main/solenv/inc/unxlng.mk b/main/solenv/inc/unxlng.mk
index 032f013564..f757ef14fb 100644
--- a/main/solenv/inc/unxlng.mk
+++ b/main/solenv/inc/unxlng.mk
@@ -84,7 +84,7 @@ CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
 
 # -fpermissive should be removed as soon as possible
-CFLAGSCXX= -pipe $(ARCH_FLAGS)
+CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++98
 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
 CFLAGSCXX += -fvisibility-inlines-hidden
 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to