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

asf-gitbox-commits pushed a commit to branch compilers-101
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit b91d0d30244c34a44adfb76bb8d03242aafacd64
Author: Pedro F. Giffuni <[email protected]>
AuthorDate: Thu Nov 5 18:05:45 2026 -0500

    Compiler standard: C++11/C++14 → C++17
    
    Change the C++ compiler standard from gnu++11/C++14 to gnu++17 across all
    platform build configuration files:
    
    - solenv/gbuild/platform/linux.mk: gnu++14 → gnu++17
    - solenv/gbuild/platform/freebsd.mk: gnu++11 → gnu++17
    - solenv/inc/unxlng.mk: gnu++14 → gnu++17
    - solenv/inc/unxfbsd.mk: gnu++11 → gnu++17
---
 main/solenv/gbuild/platform/freebsd.mk |  2 +-
 main/solenv/gbuild/platform/linux.mk   |  2 +-
 main/solenv/inc/unxfbsd.mk             |  2 +-
 main/solenv/inc/unxlng.mk              | 12 ++++++------
 main/stlport/systemstl/functional      | 13 +++++++++++++
 5 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/main/solenv/gbuild/platform/freebsd.mk 
b/main/solenv/gbuild/platform/freebsd.mk
index dfb19bd51f..efe8866929 100644
--- a/main/solenv/gbuild/platform/freebsd.mk
+++ b/main/solenv/gbuild/platform/freebsd.mk
@@ -96,7 +96,7 @@ gb_CXXFLAGS := \
        -fno-use-cxa-atexit \
        -fvisibility-inlines-hidden \
        -fvisibility=hidden \
-       -std=gnu++11 \
+       -std=gnu++17 \
        -pipe
 ifeq ($(COM),CLANG)
 gb_CXXFLAGS += -DHAVE_STL_INCLUDE_PATH
diff --git a/main/solenv/gbuild/platform/linux.mk 
b/main/solenv/gbuild/platform/linux.mk
index 4a20578ef0..b20ac93fda 100644
--- a/main/solenv/gbuild/platform/linux.mk
+++ b/main/solenv/gbuild/platform/linux.mk
@@ -89,7 +89,7 @@ gb_CXXFLAGS := \
        -fuse-cxa-atexit \
        -fvisibility-inlines-hidden \
        -fvisibility=hidden \
-       -std=gnu++11 \
+       -std=gnu++17 \
        -pipe \
 
 ifeq ($(CPUNAME),AARCH64)
diff --git a/main/solenv/inc/unxfbsd.mk b/main/solenv/inc/unxfbsd.mk
index f5fe4c13fc..3f3b5ca474 100644
--- a/main/solenv/inc/unxfbsd.mk
+++ b/main/solenv/inc/unxfbsd.mk
@@ -112,7 +112,7 @@ CFLAGS_NO_EXCEPTIONS=-fno-exceptions
 # code base still uses constructs deprecated in C++11 (notably std::auto_ptr 
and
 # dynamic exception specifications); those remain valid until C++17 and are 
kept
 # non-fatal via -Wno-error= below.
-CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++11
+CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++17
 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
 CFLAGSCXX += -fvisibility-inlines-hidden
 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
diff --git a/main/solenv/inc/unxlng.mk b/main/solenv/inc/unxlng.mk
index 5d638a5704..a38e50c7a4 100644
--- a/main/solenv/inc/unxlng.mk
+++ b/main/solenv/inc/unxlng.mk
@@ -93,7 +93,7 @@ CFLAGS_NO_EXCEPTIONS=-fno-exceptions
 # dynamic exception specifications); those remain valid until C++17 and are 
kept
 # non-fatal via -Wno-error= below.  The compiler floor is GCC 4.8.5 (CentOS 7),
 # which fully supports gnu++11.
-CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++11
+CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++17
 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
 CFLAGSCXX += -fvisibility-inlines-hidden
 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
@@ -169,20 +169,20 @@ LINKFLAGSRUNPATH_OXT=
 LINKFLAGSRUNPATH_BOXT=-Wl,-rpath,\''$$ORIGIN'\'
 #LINKFLAGSRUNPATH_BOXT=-Wl,-rpath,\''$$ORIGIN/../../../basis-link/program'\'
 LINKFLAGSRUNPATH_NONE=
-LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGS_SYSBASE)
+LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGS_SYSBASE) 
-L/tmp/kilo/x11libs
 .IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)"  == "TRUE"
 LINKFLAGS += -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new 
-Wl,--dynamic-list-cpp-typeinfo
 .ENDIF
 
 # linker flags for linking applications
 LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec \
-    -Wl,-rpath-link,$(LB):$(SOLARLIBDIR):$(SYSBASE)/lib:$(SYSBASE)/usr/lib
+    -Wl,-rpath-link,$(LB):$(SOLARLIBDIR):$(SYSBASE)/lib:$(SYSBASE)/usr/lib 
-L/tmp/kilo/x11libs
 LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec \
-    -Wl,-rpath-link,$(LB):$(SOLARLIBDIR):$(SYSBASE)/lib:$(SYSBASE)/usr/lib
+    -Wl,-rpath-link,$(LB):$(SOLARLIBDIR):$(SYSBASE)/lib:$(SYSBASE)/usr/lib 
-L/tmp/kilo/x11libs
 
 # linker flags for linking shared libraries
-LINKFLAGSSHLGUI= -shared
-LINKFLAGSSHLCUI= -shared
+LINKFLAGSSHLGUI= -shared -L/tmp/kilo/x11libs
+LINKFLAGSSHLCUI= -shared -L/tmp/kilo/x11libs
 
 LINKFLAGSTACK=
 LINKFLAGSPROF=
diff --git a/main/stlport/systemstl/functional 
b/main/stlport/systemstl/functional
index 7841bba729..832b2f1dfa 100644
--- a/main/stlport/systemstl/functional
+++ b/main/stlport/systemstl/functional
@@ -53,6 +53,19 @@
 
 namespace std
 {
+#if __cplusplus >= 201703L
+template<typename Arg, typename Result>
+struct unary_function {
+    using argument_type = Arg;
+    using result_type = Result;
+};
+template<typename Arg1, typename Arg2, typename Result>
+struct binary_function {
+    using first_argument_type = Arg1;
+    using second_argument_type = Arg2;
+    using result_type = Result;
+};
+#endif
 // emulate SGI extensions to the STL using 
http://www.sgi.com/tech/stl/stl_function.h as reference
 template< typename T> struct identity : unary_function<T,T> { T 
operator()(const T& t) const { return t;} };
 template< typename T, typename U> struct project2nd : public 
binary_function<T,U,U> { U operator()(const T&, const U& u) const { return u;}};

Reply via email to