Upgrade external/boost to latest Boost 1.80.0

<https://dev-www.libreoffice.org/src/boost_1_80_0.tar.xz> has been generated (on
Fedora 36) with

> $ wget https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2
> $ printf '1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0 boost_1_80_0.tar.bz2' | sha256sum -c # cf. <https://www.boost.org/users/history/version_1_80_0.html>
> boost_1_80_0.tar.bz2: OK
> $ external/boost/repack_tarball.sh boost_1_80_0.tar.bz2
> Unpacking boost_1_80_0.tar.bz2 ...
> Removing unnecessary files ...
> Creating boost_1_80_0.tar.xz ...
> Cleaning up ...
> 322e567e98c466c0aa0e380ed8c647552fe4af48998648428f1b5f0c8eff4666  boost_1_80_0.tar.xz
> Done.

* In StaticLibrary_boost_filesystem,
<36cf9aaf81>
"Updated protection of remove_all against CVE-2022-21658 on POSIX" had
introduced uses of certain POSIX *at functions (like utimensat) conditionally on
some new BOOST_FILESYSTEM_HAS_POSIX_AT_APIS, to be discovered by
workdir/UnpackedTarball/boost/libs/filesystem/CMakeLists.txt which we don't run.
At least AT_NO_AUTOMOUNT, as used in
workdir/UnpackedTarball/boost/libs/filesystem/src/operations.cpp, appears to be
unavailable on the macOS baseline, but otherwise assume that all that POSIX
functionality is available on all other non-Windows baselines and hardcode that
in external/boost/StaticLibrary_boost_filesystem.mk.  (If it turns out that we
need to exclude some more platforms there, we /might/ need to backport
<5864f397cc>
"Fixed a missing include on POSIX systems that don't support *at APIs" from the
develop branch towards Boost 1.81.)

* In StaticLibrary_boost_locale,
<41868c62a0>
"Support systems without implicit include path" had moved source files around
(and then would have failed with

> workdir/UnpackedTarball/boost/libs/locale/src/boost/locale/shared/mo_lambda.cpp:7:10: fatal error: 'boost/locale/shared/mo_lambda.hpp' file not found
> #include "boost/locale/shared/mo_lambda.hpp"
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

etc. without the additional -I option).

* Some Clang builds would have started to fail with

> In file included from desktop/qa/unit/desktop-lok-init.cxx:19:
> In file included from desktop/inc/lib/init.hxx:20:
> In file included from workdir/UnpackedTarball/boost/boost/container/flat_map.hpp:26:
> workdir/UnpackedTarball/boost/boost/container/new_allocator.hpp:168:12: error: '__cpp_sized_deallocation' is not defined, evaluates to 0 [-Werror,-Wundef]
>       # if __cpp_sized_deallocation
>            ^

so add another external/boost/include/ wrapper.

Change-Id: I5e53f7ddab07eadba9bdf653acad571f50517b46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138511
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2022-08-19 10:17:24 +02:00
parent 390c7b97ad
commit 3a04cfe27b
8 changed files with 69 additions and 31 deletions

View file

@ -6,8 +6,8 @@
export ABW_SHA256SUM := e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed
export ABW_TARBALL := libabw-0.1.3.tar.xz
# please repack the tarball using external/boost/repack_tarball.sh
export BOOST_SHA256SUM := 2058aa88758a0e1aaac1759b3c4bad2526f899c6ecc6eeea79aa5e8fd3ea95dc
export BOOST_TARBALL := boost_1_79_0.tar.xz
export BOOST_SHA256SUM := 322e567e98c466c0aa0e380ed8c647552fe4af48998648428f1b5f0c8eff4666
export BOOST_TARBALL := boost_1_80_0.tar.xz
export BOX2D_SHA256SUM := d6b4650ff897ee1ead27cf77a5933ea197cbeef6705638dd181adc2e816b23c2
export BOX2D_TARBALL := box2d-2.4.1.tar.gz
export BREAKPAD_SHA256SUM := c44a2e898895cfc13b42d2371ba4b88b0777d7782214d6cdc91c33720f3b0d91

View file

@ -16,6 +16,7 @@ $(eval $(call gb_StaticLibrary_set_warnings_disabled,boost_filesystem))
# disable "auto link" "feature" on MSVC
$(eval $(call gb_StaticLibrary_add_defs,boost_filesystem,\
-DBOOST_ALL_NO_LIB \
$(if $(filter-out MACOSX WNT,$(OS)),-DBOOST_FILESYSTEM_HAS_POSIX_AT_APIS) \
))
# See workdir/UnpackedTarball/boost/libs/filesystem/build/Jamfile.v2:

View file

@ -18,40 +18,45 @@ $(eval $(call gb_StaticLibrary_add_defs,boost_locale,\
-DBOOST_ALL_NO_LIB -DBOOST_LOCALE_NO_WINAPI_BACKEND -DBOOST_LOCALE_NO_POSIX_BACKEND -DBOOST_USE_WINDOWS_H \
))
$(eval $(call gb_StaticLibrary_set_include,boost_locale, \
-I$(call gb_UnpackedTarball_get_dir,boost)/libs/locale/src \
$$(INCLUDE) \
))
$(eval $(call gb_StaticLibrary_use_external,boost_locale,boost_headers))
$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,boost_locale,cpp))
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,boost_locale,\
UnpackedTarball/boost/libs/locale/src/encoding/codepage \
UnpackedTarball/boost/libs/locale/src/shared/date_time \
UnpackedTarball/boost/libs/locale/src/shared/format \
UnpackedTarball/boost/libs/locale/src/shared/formatting \
UnpackedTarball/boost/libs/locale/src/shared/generator \
UnpackedTarball/boost/libs/locale/src/shared/ids \
UnpackedTarball/boost/libs/locale/src/shared/localization_backend \
UnpackedTarball/boost/libs/locale/src/shared/message \
UnpackedTarball/boost/libs/locale/src/shared/mo_lambda \
UnpackedTarball/boost/libs/locale/src/std/codecvt \
UnpackedTarball/boost/libs/locale/src/std/collate \
UnpackedTarball/boost/libs/locale/src/std/converter \
UnpackedTarball/boost/libs/locale/src/std/numeric \
UnpackedTarball/boost/libs/locale/src/std/std_backend \
UnpackedTarball/boost/libs/locale/src/util/codecvt_converter \
UnpackedTarball/boost/libs/locale/src/util/default_locale \
UnpackedTarball/boost/libs/locale/src/util/gregorian \
UnpackedTarball/boost/libs/locale/src/util/info \
UnpackedTarball/boost/libs/locale/src/util/locale_data \
UnpackedTarball/boost/libs/locale/src/boost/locale/encoding/codepage \
UnpackedTarball/boost/libs/locale/src/boost/locale/shared/date_time \
UnpackedTarball/boost/libs/locale/src/boost/locale/shared/format \
UnpackedTarball/boost/libs/locale/src/boost/locale/shared/formatting \
UnpackedTarball/boost/libs/locale/src/boost/locale/shared/generator \
UnpackedTarball/boost/libs/locale/src/boost/locale/shared/ids \
UnpackedTarball/boost/libs/locale/src/boost/locale/shared/localization_backend \
UnpackedTarball/boost/libs/locale/src/boost/locale/shared/message \
UnpackedTarball/boost/libs/locale/src/boost/locale/shared/mo_lambda \
UnpackedTarball/boost/libs/locale/src/boost/locale/std/codecvt \
UnpackedTarball/boost/libs/locale/src/boost/locale/std/collate \
UnpackedTarball/boost/libs/locale/src/boost/locale/std/converter \
UnpackedTarball/boost/libs/locale/src/boost/locale/std/numeric \
UnpackedTarball/boost/libs/locale/src/boost/locale/std/std_backend \
UnpackedTarball/boost/libs/locale/src/boost/locale/util/codecvt_converter \
UnpackedTarball/boost/libs/locale/src/boost/locale/util/default_locale \
UnpackedTarball/boost/libs/locale/src/boost/locale/util/gregorian \
UnpackedTarball/boost/libs/locale/src/boost/locale/util/info \
UnpackedTarball/boost/libs/locale/src/boost/locale/util/locale_data \
))
ifeq ($(OS),WNT)
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,boost_locale,\
UnpackedTarball/boost/libs/locale/src/win32/collate \
UnpackedTarball/boost/libs/locale/src/win32/converter \
UnpackedTarball/boost/libs/locale/src/win32/lcid \
UnpackedTarball/boost/libs/locale/src/win32/numeric \
UnpackedTarball/boost/libs/locale/src/win32/win_backend \
UnpackedTarball/boost/libs/locale/src/boost/locale/win32/collate \
UnpackedTarball/boost/libs/locale/src/boost/locale/win32/converter \
UnpackedTarball/boost/libs/locale/src/boost/locale/win32/lcid \
UnpackedTarball/boost/libs/locale/src/boost/locale/win32/numeric \
UnpackedTarball/boost/libs/locale/src/boost/locale/win32/win_backend \
))
endif

View file

@ -1,6 +1,6 @@
diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
+++ foo/misc/boost/libs/locale/src/encoding/codepage.cpp
+++ foo/misc/boost/libs/locale/src/boost/locale/encoding/codepage.cpp
@@ -58,6 +58,9 @@
return cvt->convert(begin,end);
#endif

View file

@ -1,5 +1,5 @@
--- foo/misc/boost.orig/libs/locale/src/util/locale_data.cpp.new 2022-02-17 22:41:27.730549039 +0000
+++ foo/misc/boost/libs/locale/src/util/locale_data.cpp
+++ foo/misc/boost/libs/locale/src/boost/locale/util/locale_data.cpp
@@ -18,8 +18,8 @@
language = "C";
country.clear();

View file

@ -1,6 +1,6 @@
diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
+++ foo/misc/boost/libs/locale/src/encoding/codepage.cpp
+++ foo/misc/boost/libs/locale/src/boost/locale/encoding/codepage.cpp
@@ -39,6 +39,7 @@
char const *from_charset,
method_type how)

View file

@ -0,0 +1,32 @@
/* generated by bin/gen-boost-headers, do not edit! */
#pragma once
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas" /* first! for GCC */
#pragma GCC diagnostic ignored "-Wunknown-warning-option" // second! for Clang 5
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
#pragma GCC diagnostic ignored "-Wdeprecated-builtins"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#pragma GCC diagnostic ignored "-Wdeprecated-copy-dtor"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#pragma GCC diagnostic ignored "-Winvalid-constexpr"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic ignored "-Wmicrosoft-unqualified-friend"
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#pragma GCC diagnostic ignored "-Wnonnull"
#pragma GCC diagnostic ignored "-Wparentheses"
#pragma GCC diagnostic ignored "-Wplacement-new"
#pragma GCC diagnostic ignored "-Wreturn-type"
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
#pragma GCC diagnostic ignored "-Wtype-limits"
#pragma GCC diagnostic ignored "-Wundef"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#pragma GCC diagnostic ignored "-Wunused-macros"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-variable"
#include_next <boost/container/flat_map.hpp>
#pragma GCC diagnostic pop

View file

@ -1,7 +1,7 @@
Don't ever attempt to initialise a std::locale with a UTF-8 locale on Windows -*- Mode: Diff -*-
--- libs/locale/src/std/std_backend.cpp
+++ libs/locale/src/std/std_backend.cpp
--- libs/locale/src/boost/locale/std/std_backend.cpp
+++ libs/locale/src/boost/locale/std/std_backend.cpp
@@ -109,12 +109,13 @@
#endif
}