On Thu, Jan 19, 2023 at 1:58 AM Damjan Jovanovic <dam...@apache.org> wrote:

>
>
> On Sat, Jan 14, 2023 at 8:25 PM Pedro Giffuni <p...@freebsd.org> wrote:
>
>> Helo guys;
>> I don't currently have all the time I'd wish for AOO development so I
>> thought I'd suggest this task for some volunteer.
>> The Apache OpenOffice FreeBSD port has been broken for awhile and getting
>> boost updated would be of great help. Boost would also be useful to add
>> some functionality like support for more complex trigonometric functions.
>> I looked at the different verions and 1.79 seems to hit the right spot by
>> adding the right level of new functionality without causing trouble on old
>> compilers. So I just went ahead and uploaded boost_1_79_0.tar.bz2 to the
>> OOO extras repo on sourceforge.
>>
>> The process should be the regular update tarball, cleanup the patch, and
>> test on Windows/linux, however that is done with gbuild nowadays.
>>
>
> No, external dependencies still only build with dmake.
>
>
>> Of course in the case of boost it is easier said than done so .. good
>> luck! :-P
>> Pedro.
>
>
> Recent boost versions, 1.79.0 for example, require variadic templates and
> use a new and incompatible syntax for templates, which don't go with our
> "-std=gnu++98", eg:
> inc/boost/math/tools/mp.hpp:291:53: error: a space is required between
> consecutive right angle brackets (use '> >')
> struct mp_append_impl<L1<T1...>, L2<T2...>, L3<T3...>>
>
> We get far fewer errors when "-std=gnu++98" is removed, but since C++ 2011
> is stricter, then there are other issues in our code to fix.
>
>
So I eventually succeeded in getting OpenOffice to compile against the
"c++14" standard now, and to use a newer Boost.

The latest trunk should build successfully on FreeBSD using either:
- Clang, internal boost 1.55.0, internal vigra.
- Clang, system boost 1.80.0, system vigra, and the small patch I am
attaching to remove "-std=gnu++98" from the compiler flags (which uses
Clang's default instead, c++14).

I doubt we can use newer Boost versions on Windows, with the old compiler
we use there. Also what compiler do we use on OS/2?

Building against c++14 is full of warnings, and ::std::auto_ptr is obsolete
as of c++17 but we use it in 797 places...

Regards
Damjan
commit 4b9171ad362c8ba1283a0224d77740950773abc4
Author: Damjan Jovanovic <dam...@apache.org>
Date:   Thu Jan 19 09:32:00 2023 +0200

    FreeBSD C++ 2014 support.

diff --git a/main/solenv/gbuild/platform/freebsd.mk b/main/solenv/gbuild/platform/freebsd.mk
index 6fa486e0e2..587a5bde13 100644
--- a/main/solenv/gbuild/platform/freebsd.mk
+++ b/main/solenv/gbuild/platform/freebsd.mk
@@ -92,7 +92,6 @@ gb_CXXFLAGS := \
 	-fno-use-cxa-atexit \
 	-fvisibility-inlines-hidden \
 	-fvisibility=hidden \
-	-std=gnu++98 \
 	-pipe
 ifeq ($(COM),CLANG)
 gb_CXXFLAGS += -DHAVE_STL_INCLUDE_PATH
diff --git a/main/solenv/inc/unxfbsd.mk b/main/solenv/inc/unxfbsd.mk
index 92db30a813..246768c3ea 100644
--- a/main/solenv/inc/unxfbsd.mk
+++ b/main/solenv/inc/unxfbsd.mk
@@ -105,7 +105,7 @@ 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
+CFLAGSCXX= -pipe $(ARCH_FLAGS)
 .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