From 884293b5473e36e87d82d64ca004c4f8d3272cd4 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Sat, 4 Apr 2020 01:17:14 +0300 Subject: [PATCH] Use libstdc++-gcc10 because of ABI incompatibility of libc++ and libstdc++ --- libreoffice.spec | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/libreoffice.spec b/libreoffice.spec index 79b7263..90371de 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -48,9 +48,6 @@ Source1: %{relurl}/%{ooname}-dictionaries-%{buildver}.tar.xz Source2: %{relurl}/%{ooname}-help-%{buildver}.tar.xz Source3: %{relurl}/%{ooname}-translations-%{buildver}.tar.xz Source4: %{devexurl}/185d60944ea767075d27247c3162b3bc-unowinreg.dll -%if %{with clang} -Source5: http://dev-www.libreoffice.org/src/cppunit-1.14.0.tar.gz -%endif # Unused, should be dropped in future package updates Source10: Mandriva-Rosa_Icons.tar.bz2 @@ -101,9 +98,7 @@ BuildRequires: ccache %endif %if %{with clang} BuildRequires: clang -BuildRequires: clang-devel -BuildRequires: libcxx-devel -BuildRequires: libcxxabi-devel +BuildRequires: stdc++-gcc10-devel %endif BuildRequires: desktop-file-utils BuildRequires: doxygen >= 1.8.4 @@ -153,9 +148,7 @@ BuildRequires: unixODBC-devel #BuildRequires: vigra-devel BuildRequires: gpgmepp-devel BuildRequires: pkgconfig(bluez) -%if !%{with clang} BuildRequires: pkgconfig(cppunit) >= 1.14.0 -%endif BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(libetonyek-0.1) @@ -2958,19 +2951,11 @@ export CCACHE_DIR=%{ccachedir} %setup_compile_flags %if %{with clang} -# libstdc++ from gcc5 is too old, use LLVM libc++ -# https://libcxx.llvm.org/docs/UsingLibcxx.html -# clang -c -stdlib=libc++ -> -# -> "argument unused during compilation: '-stdlib=libc++'" -> -# -> -Wno-unused-command-line-argument -export CXXFLAGS="$CXXFLAGS -stdlib=libc++ -nostdinc++ -I/usr/include/c++/v1 -Wno-unused-command-line-argument" -export CPPFLAGS="$CPPFLAGS -I/usr/include/c++/v1" -# Workaround old system boost being incompatible with C++17 which removed std::auto_ptr -# https://github.com/TRIQS/triqs/issues/523#issuecomment-351960463 -export CXXFLAGS="$CXXFLAGS -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" +# libstdc++ from gcc5 is too old, use newer version of libstdc++ +export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libstdc++-gcc10 -I%{_includedir}/libstdc++-gcc10/%{_host}" +export CXXFLAGS="$CXXFLAGS -nostdinc++ $CPPFLAGS -Wno-unused-command-line-argument" %clang_gcc_wrapper -export LIBCCX_LIBS="-lc++ -lc++abi" -export CPPUNIT_LIBS="-lcppunit" +export LIBCCX_LIBS="-lstdc++-gcc10" install -m0755 %{SOURCE80} "local_bin/clang++wr" sed -i -e "s,/usr/bin/clang++,${PWD}/local_bin/clang++wr,g" "local_bin/clang++" %endif @@ -3022,9 +3007,6 @@ sed -i \ --with-external-thes-dir=%{_datadir}/dict/ooo \ --with-system-libs \ --with-system-ucpp \ -%if %{with clang} - --without-system-cppunit \ -%endif --enable-ext-ct2n \ --enable-ext-numbertext \ --enable-ext-nlpsolver \