You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by tr...@apache.org on 2020/08/25 09:55:22 UTC

[openoffice] 01/04: Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be the most compatible with our old code base rather than relying on the compiler default mode. Compiling in C++11 or newer mode is very noisy due to deprecation warnings about our use of std::auto_ptr. If the compiler defaults to C++17 mode or newer, the build would be totally broken because std::auto_ptr is removed from C++17.

This is an automated email from the ASF dual-hosted git repository.

truckman pushed a commit to branch AOO418
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 6ea0ec58da1377052f15601db6e09590e09f54bb
Author: Don Lewis <tr...@apache.org>
AuthorDate: Sun Aug 23 10:55:50 2020 -0700

    Force Linux builds to use gnu++98 (C++98 + GNU extensions) mode to be
    the most compatible with our old code base rather than relying on the
    compiler default mode.  Compiling in C++11 or newer mode is very noisy
    due to deprecation warnings about our use of std::auto_ptr.  If the
    compiler defaults to C++17 mode or newer, the build would be totally
    broken because std::auto_ptr is removed from C++17.
    
    There is an unknown amount of porting effort needed to convert to
    std::unique_ptr, which has somewhat different semantics and which is
    not available before C++11, which would break building with older versions
    of gcc which default to gnu++98 mode.
    
    std::shared_ptr, might be an alternative since there is a BOOST
    implementation.
---
 main/solenv/gbuild/platform/linux.mk | 1 +
 main/solenv/inc/unxlng.mk            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/main/solenv/gbuild/platform/linux.mk b/main/solenv/gbuild/platform/linux.mk
index 0a23a43..6ab0b33 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 032f013..f757ef1 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"