From 1084afc3c4d9c83e61620de60ba59a4393a33cb0 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 20 Apr 2022 22:40:49 +0000 Subject: fixed create to work within env --- extra/binutils/defang-no-split.patch | 38 +++++++++++++++++++ extra/icu/fix-ucptrietest-golden-diff.patch | 33 +++++++++++++++++ extra/snappy/cmakelists.patch | 20 ---------- extra/snappy/rtti.patch | 57 ++++++++++++++++++++++++++++- 4 files changed, 127 insertions(+), 21 deletions(-) create mode 100644 extra/binutils/defang-no-split.patch create mode 100644 extra/icu/fix-ucptrietest-golden-diff.patch (limited to 'extra') diff --git a/extra/binutils/defang-no-split.patch b/extra/binutils/defang-no-split.patch new file mode 100644 index 0000000..cea68ed --- /dev/null +++ b/extra/binutils/defang-no-split.patch @@ -0,0 +1,38 @@ +From 2dad02b6d46eef438cbd14d8511487b056628a38 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Mon, 26 Jul 2021 22:51:18 +0100 +Subject: [PATCH 1/1] texi2pod.pl: add no-op --no-split option support + [PR28144] + +Change 2faf902da ("generate single html manual page by default") +added use of --no-split option to makeinfo. binutils reuses +makeinfo options for texi2pod.pl wrapper. Unsupported option +led to silent manpage truncation. + +The change adds no-op option support. + +etc/ + PR 28144 + * texi2pod.pl: Handle no-op --no-split option. + +(cherry picked from commit 96a7037cd8573cf065aa6b12baca68696f96d9ca) +--- + etc/texi2pod.pl | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/etc/texi2pod.pl b/etc/texi2pod.pl +index 11f70d156be..dcf2b437640 100644 +--- a/etc/texi2pod.pl ++++ b/etc/texi2pod.pl +@@ -59,6 +59,8 @@ while ($_ = shift) { + $flag = shift; + } + push (@ipath, $flag); ++ } elsif (/^--no-split$/) { ++ # ignore option for makeinfo compatibility + } elsif (/^-/) { + usage(); + } else { +-- +2.27.0 + diff --git a/extra/icu/fix-ucptrietest-golden-diff.patch b/extra/icu/fix-ucptrietest-golden-diff.patch new file mode 100644 index 0000000..1b8082e --- /dev/null +++ b/extra/icu/fix-ucptrietest-golden-diff.patch @@ -0,0 +1,33 @@ +Patch-Source: https://github.com/unicode-org/icu/pull/1925 +Subject: [PATCH] ICU-21793 Fix ucptrietest golden diff + +diff --git a/icu4c/source/tools/toolutil/toolutil.cpp b/icu4c/source/tools/toolutil/toolutil.cpp +index 1fc68aa69c8..a9dc37377a8 100644 +--- a/tools/toolutil/toolutil.cpp ++++ b/tools/toolutil/toolutil.cpp +@@ -228,18 +228,19 @@ uprv_compareGoldenFiles( + std::ifstream ifs(goldenFilePath, std::ifstream::in); + int32_t pos = 0; + char c; +- while ((c = ifs.get()) != std::char_traits::eof() && pos < bufferLen) { ++ while (ifs.get(c) && pos < bufferLen) { + if (c != buffer[pos]) { + // Files differ at this position +- return pos; ++ break; + } + pos++; + } +- if (pos < bufferLen || c != std::char_traits::eof()) { +- // Files are different lengths +- return pos; ++ if (pos == bufferLen && ifs.eof()) { ++ // Files are same lengths ++ pos = -1; + } +- return -1; ++ ifs.close(); ++ return pos; + } + + /*U_CAPI UDate U_EXPORT2 diff --git a/extra/snappy/cmakelists.patch b/extra/snappy/cmakelists.patch index 9c16853..d6576a8 100644 --- a/extra/snappy/cmakelists.patch +++ b/extra/snappy/cmakelists.patch @@ -1,25 +1,5 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -86,6 +86,8 @@ - # it prominent in the GUI. - option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF) - -+option(BUILD_STATIC_LIBS "Build static libraries." ON) -+ - option(SNAPPY_BUILD_TESTS "Build Snappy's own tests." ON) - - option(SNAPPY_BUILD_BENCHMARKS "Build Snappy's benchmarks" ON) -@@ -98,6 +100,10 @@ - - option(SNAPPY_INSTALL "Install Snappy's header and library" ON) - -+if(NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) -+ set(BUILD_STATIC_LIBS OFF) -+endif () -+ - include(TestBigEndian) - test_big_endian(SNAPPY_IS_BIG_ENDIAN) - @@ -213,19 +219,28 @@ "snappy-stubs-public.h.in" "${PROJECT_BINARY_DIR}/snappy-stubs-public.h") diff --git a/extra/snappy/rtti.patch b/extra/snappy/rtti.patch index 77b8178..80f89ff 100644 --- a/extra/snappy/rtti.patch +++ b/extra/snappy/rtti.patch @@ -1 +1,56 @@ -Too Many Requests \ No newline at end of file +From f73b11e87dfbe1cb4862b8ee489679d99534f40b Mon Sep 17 00:00:00 2001 +From: Tim Serong +Date: Wed, 27 Oct 2021 18:49:04 +1100 +Subject: [PATCH] Re-enable RTTI (needed in order to subclass Source, etc.) + +Commit c98344f in snappy 1.1.9 disabled RTTI, which means the +snappy library no longer exports typeinfo for snappy::Source, +snappy::Sink, ..., so users of the library can't subclass these +classes anymore. + +Here's a trivial reproducer: + + #include + class MySource : snappy::Source { + public: + size_t Available() const override { return 0; } + const char *Peek(size_t *len) override { return NULL; } + void Skip(size_t n) override {} + }; + int main(int argc, char **argv) { + MySource m; + return 0; + } + +Try `g++ -o snappy-test ./snappy-test.cc -lsnappy` with the above +and the linker will fail with "undefined reference to `typeinfo +for snappy::Source'" if RTTI was disabled in the snappy build. +--- + CMakeLists.txt | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6eef485..755605d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,10 +51,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHs-c-") + add_definitions(-D_HAS_EXCEPTIONS=0) +- +- # Disable RTTI. +- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") + else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # Use -Wall for clang and gcc. + if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") +@@ -77,9 +73,6 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") + +- # Disable RTTI. +- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") + endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + + # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make -- cgit v1.2.1