On  2 Jul, [email protected] wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> jimjag pushed a commit to branch trunk
> in repository https://gitbox.apache.org/repos/asf/openoffice.git
> 
> 
> The following commit(s) were added to refs/heads/trunk by this push:
>      new 7ce5b5df31 Raise the C++ standard floor to C++11 on Linux and FreeBSD
> 7ce5b5df31 is described below
> 
> commit 7ce5b5df31d462d18bd1a27767f9ee8b2b323b86
> Author: Jim Jagielski <[email protected]>
> AuthorDate: Thu Jul 2 05:33:55 2026 -0400
> 
>     Raise the C++ standard floor to C++11 on Linux and FreeBSD

That breaks the build on CentOS 5.  Are we dropping support for it?
     
>     Linux and FreeBSD were pinned to -std=gnu++98 while macOS already
>     builds at C++11. Bump both platforms (dmake and gbuild build systems)
>     to -std=gnu++11, making C++11 the lowest supported standard across all
>     platforms. gnu++11 (rather than strict c++11) preserves the GNU dialect
>     the codebase relies on and avoids __STRICT_ANSI__ system-header fallout.
>     
>     Compiler floor is GCC 4.8.5 (CentOS 7), which fully supports gnu++11.
> ---
>  main/solenv/gbuild/platform/freebsd.mk |  8 +++++---
>  main/solenv/gbuild/platform/linux.mk   |  8 +++++---
>  main/solenv/inc/unxfbsd.mk             | 11 +++++++++--
>  main/solenv/inc/unxlng.mk              | 12 ++++++++++--
>  4 files changed, 29 insertions(+), 10 deletions(-)
> 
> diff --git a/main/solenv/gbuild/platform/freebsd.mk 
> b/main/solenv/gbuild/platform/freebsd.mk
> index b1259cb42d..6433fa2c80 100644
> --- a/main/solenv/gbuild/platform/freebsd.mk
> +++ b/main/solenv/gbuild/platform/freebsd.mk
> @@ -92,7 +92,7 @@ gb_CXXFLAGS := \
>       -fno-use-cxa-atexit \
>       -fvisibility-inlines-hidden \
>       -fvisibility=hidden \
> -     -std=gnu++98 \
> +     -std=gnu++11 \
>       -pipe
>  ifeq ($(COM),CLANG)
>  gb_CXXFLAGS += -DHAVE_STL_INCLUDE_PATH
> @@ -101,8 +101,10 @@ gb_CXXFLAGS += -DBOOST_TR1_DISABLE_INCLUDE_NEXT 
> -DBOOST_TR1_GCC_INCLUDE_PATH=c++
>  endif
>  
>  ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
> -gb_CFLAGS_WERROR := -Werror
> -gb_CXXFLAGS_WERROR := -Werror
> +# C++11 deprecation/narrowing warnings (std::auto_ptr, dynamic exception 
> specs,
> +# braced-init narrowing) must not be fatal.  Mirrors macosx.mk.
> +gb_CFLAGS_WERROR := -Werror -Wno-error=deprecated 
> -Wno-error=deprecated-declarations -Wno-error=narrowing
> +gb_CXXFLAGS_WERROR := -Werror -Wno-error=deprecated 
> -Wno-error=deprecated-declarations -Wno-error=narrowing
>  endif
>  
>  ifneq ($(strip $(SYSBASE)),)
> diff --git a/main/solenv/gbuild/platform/linux.mk 
> b/main/solenv/gbuild/platform/linux.mk
> index 874dbde417..5777898295 100644
> --- a/main/solenv/gbuild/platform/linux.mk
> +++ b/main/solenv/gbuild/platform/linux.mk
> @@ -89,12 +89,14 @@ gb_CXXFLAGS := \
>       -fuse-cxa-atexit \
>       -fvisibility-inlines-hidden \
>       -fvisibility=hidden \
> -     -std=gnu++98 \
> +     -std=gnu++11 \
>       -pipe \
>  
>  ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
> -gb_CFLAGS_WERROR := -Werror
> -gb_CXXFLAGS_WERROR := -Werror
> +# C++11 deprecation/narrowing warnings (std::auto_ptr, dynamic exception 
> specs,
> +# braced-init narrowing) must not be fatal.  Mirrors macosx.mk.
> +gb_CFLAGS_WERROR := -Werror -Wno-error=deprecated 
> -Wno-error=deprecated-declarations -Wno-error=narrowing
> +gb_CXXFLAGS_WERROR := -Werror -Wno-error=deprecated 
> -Wno-error=deprecated-declarations -Wno-error=narrowing
>  endif
>  
>  ifneq ($(strip $(SYSBASE)),)
> diff --git a/main/solenv/inc/unxfbsd.mk b/main/solenv/inc/unxfbsd.mk
> index 3e2575f53f..f27ef2a7ba 100644
> --- a/main/solenv/inc/unxfbsd.mk
> +++ b/main/solenv/inc/unxfbsd.mk
> @@ -105,7 +105,11 @@ CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
>  CFLAGS_NO_EXCEPTIONS=-fno-exceptions
>  
>  # -fpermissive should be removed as soon as possible
> -CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++98
> +# C++11 is the lowest supported standard (matches the macOS floor).  Our old
> +# 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
>  .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
>  CFLAGSCXX += -fvisibility-inlines-hidden
>  .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
> @@ -139,7 +143,10 @@ CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow 
> -Wno-ctor-dtor-privacy \
>      -Wno-non-virtual-dtor
>  CFLAGSWALLCC=$(CFLAGSWARNCC)
>  CFLAGSWALLCXX=$(CFLAGSWARNCXX)
> -CFLAGSWERRCC=-Werror
> +# Keep -Werror, but do not let the C++11 dialect's deprecation/narrowing
> +# warnings (std::auto_ptr, dynamic exception specs, braced-init narrowing) 
> break
> +# the build.  Mirrors the macOS handling in unxmacc.mk.
> +CFLAGSWERRCC=-Werror -Wno-error=deprecated 
> -Wno-error=deprecated-declarations -Wno-error=narrowing
>  
>  # Once all modules on this platform compile without warnings, set
>  # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS 
> (see
> diff --git a/main/solenv/inc/unxlng.mk b/main/solenv/inc/unxlng.mk
> index cdbe591b4d..5c2e13c936 100644
> --- a/main/solenv/inc/unxlng.mk
> +++ b/main/solenv/inc/unxlng.mk
> @@ -88,7 +88,12 @@ CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
>  CFLAGS_NO_EXCEPTIONS=-fno-exceptions
>  
>  # -fpermissive should be removed as soon as possible
> -CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++98
> +# C++11 is the lowest supported standard (matches the macOS floor).  Our old
> +# 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.  The compiler floor is GCC 4.8.5 (CentOS 
> 7),
> +# which fully supports gnu++11.
> +CFLAGSCXX= -pipe $(ARCH_FLAGS) -std=gnu++11
>  .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
>  CFLAGSCXX += -fvisibility-inlines-hidden
>  .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
> @@ -127,7 +132,10 @@ CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow 
> -Wno-ctor-dtor-privacy \
>      -Wno-non-virtual-dtor
>  CFLAGSWALLCC=$(CFLAGSWARNCC)
>  CFLAGSWALLCXX=$(CFLAGSWARNCXX)
> -CFLAGSWERRCC=-Werror
> +# Keep -Werror, but do not let the C++11 dialect's deprecation/narrowing
> +# warnings (std::auto_ptr, dynamic exception specs, braced-init narrowing) 
> break
> +# the build.  Mirrors the macOS handling in unxmacc.mk.
> +CFLAGSWERRCC=-Werror -Wno-error=deprecated 
> -Wno-error=deprecated-declarations -Wno-error=narrowing
>  
>  # Once all modules on this platform compile without warnings, set
>  # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS 
> (see
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to