summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2024-09-03 14:40:23 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2024-09-03 14:40:23 -0400
commit130925baf43d1d33d2b412ee6616c969bdbcf99a (patch)
treeb8852a445d3a66cc5e479e999d76c27740c59fb0
parentedd50222f6dc84d6d76acdd3e1ad23ad1bc3bec6 (diff)
Update patches and bump internal namespace
-rw-r--r--debian/copyright4
-rw-r--r--debian/patches/configure.diff23
-rw-r--r--debian/patches/cpu-features.diff8
-rw-r--r--debian/patches/mips-cxa-demangle.diff21
-rw-r--r--debian/patches/overload-test-dependencies.diff27
-rw-r--r--debian/patches/pkg-config-directives.diff14
-rw-r--r--debian/patches/riscv-nan-formatting.diff20
-rw-r--r--debian/patches/riscv-rdcycle.diff71
-rw-r--r--debian/patches/series4
9 files changed, 26 insertions, 166 deletions
diff --git a/debian/copyright b/debian/copyright
index 50743e9c..19a3388c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -15,10 +15,6 @@ Files: debian/*
Copyright: 2020-2022 Google LLC
License: Apache-2.0
-Files: debian/patches/riscv-nan-formatting.diff
-Copyright: 2024 aurel32 <aurelien@aurel32.net>
-License: Apache-2.0
-
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
diff --git a/debian/patches/configure.diff b/debian/patches/configure.diff
index c9a28733..30d1152b 100644
--- a/debian/patches/configure.diff
+++ b/debian/patches/configure.diff
@@ -15,13 +15,11 @@ Configure Abseil for Debian.
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
-@@ -298,7 +298,8 @@
- if(ABSL_ENABLE_INSTALL)
+@@ -314,6 +314,7 @@
set_target_properties(${_NAME} PROPERTIES
OUTPUT_NAME "absl_${_NAME}"
-- SOVERSION "2401.0.0"
-+ SOVERSION 20240116
-+ VERSION "20240116.0.1"
+ SOVERSION "${ABSL_SOVERSION}"
++ VERSION "${ABSL_SOVERSION}.0.0"
)
endif()
else()
@@ -67,8 +65,8 @@ Configure Abseil for Debian.
// allowed.
#define ABSL_OPTION_USE_INLINE_NAMESPACE 1
--#define ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240116
-+#define ABSL_OPTION_INLINE_NAMESPACE_NAME debian6
+-#define ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722
++#define ABSL_OPTION_INLINE_NAMESPACE_NAME debian7
// ABSL_OPTION_HARDENED
//
@@ -80,3 +78,14 @@ Configure Abseil for Debian.
+#define ABSL_OPTION_HARDENED 1
#endif // ABSL_BASE_OPTIONS_H_
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,7 +24,7 @@
+ endif (POLICY CMP0141)
+
+ project(absl LANGUAGES CXX VERSION 20240722)
+-set(ABSL_SOVERSION "2407.0.0")
++set(ABSL_SOVERSION "20240722")
+ include(CTest)
+
+ # Output directory is correct by default for most build setups. However, when
diff --git a/debian/patches/cpu-features.diff b/debian/patches/cpu-features.diff
index 485d2bc5..9328e9dc 100644
--- a/debian/patches/cpu-features.diff
+++ b/debian/patches/cpu-features.diff
@@ -17,7 +17,7 @@ Explicitly set supported CPU features.
--- a/absl/base/config.h
+++ b/absl/base/config.h
-@@ -915,7 +915,7 @@
+@@ -875,7 +875,7 @@
// which architectures support the various x86 instruction sets.
#ifdef ABSL_INTERNAL_HAVE_SSE
#error ABSL_INTERNAL_HAVE_SSE cannot be directly set
@@ -26,7 +26,7 @@ Explicitly set supported CPU features.
#define ABSL_INTERNAL_HAVE_SSE 1
#elif (defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1)) && \
!defined(_M_ARM64EC)
-@@ -931,7 +931,7 @@
+@@ -891,7 +891,7 @@
// which architectures support the various x86 instruction sets.
#ifdef ABSL_INTERNAL_HAVE_SSE2
#error ABSL_INTERNAL_HAVE_SSE2 cannot be directly set
@@ -35,7 +35,7 @@ Explicitly set supported CPU features.
#define ABSL_INTERNAL_HAVE_SSE2 1
#elif (defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2)) && \
!defined(_M_ARM64EC)
-@@ -953,8 +953,6 @@
+@@ -913,8 +913,6 @@
// by the CPU.
#ifdef ABSL_INTERNAL_HAVE_SSSE3
#error ABSL_INTERNAL_HAVE_SSSE3 cannot be directly set
@@ -44,7 +44,7 @@ Explicitly set supported CPU features.
#endif
// ABSL_INTERNAL_HAVE_ARM_NEON is used for compile-time detection of NEON (ARM
-@@ -966,7 +964,7 @@
+@@ -926,7 +924,7 @@
// https://llvm.org/docs/CompileCudaWithLLVM.html#detecting-clang-vs-nvcc-from-code
#ifdef ABSL_INTERNAL_HAVE_ARM_NEON
#error ABSL_INTERNAL_HAVE_ARM_NEON cannot be directly set
diff --git a/debian/patches/mips-cxa-demangle.diff b/debian/patches/mips-cxa-demangle.diff
deleted file mode 100644
index 81a5cbac..00000000
--- a/debian/patches/mips-cxa-demangle.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Benjamin Barenblat <bbaren@google.com>
-Subject: Allow __cxa_demangle on MIPS
-Origin: backport, https://github.com/abseil/abseil-cpp/commit/519ef3b3f1927972bce669d775abb9b512dd590d
-
-Both libstdc++ and libc++abi currently ship a __cxa_demangle on MIPS;
-there’s no reason to avoid using it.
-
---- a/absl/base/config.h
-+++ b/absl/base/config.h
-@@ -902,9 +902,8 @@
- #error ABSL_INTERNAL_HAS_CXA_DEMANGLE cannot be directly set
- #elif defined(OS_ANDROID) && (defined(__i386__) || defined(__x86_64__))
- #define ABSL_INTERNAL_HAS_CXA_DEMANGLE 0
--#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && \
-- (__GNUC__ >= 4 || (__GNUC__ >= 3 && __GNUC_MINOR__ >= 4)) && \
-- !defined(__mips__)
-+#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && \
-+ (__GNUC__ >= 4 || (__GNUC__ >= 3 && __GNUC_MINOR__ >= 4))
- #define ABSL_INTERNAL_HAS_CXA_DEMANGLE 1
- #elif defined(__clang__) && !defined(_MSC_VER)
- #define ABSL_INTERNAL_HAS_CXA_DEMANGLE 1
diff --git a/debian/patches/overload-test-dependencies.diff b/debian/patches/overload-test-dependencies.diff
deleted file mode 100644
index fb843c91..00000000
--- a/debian/patches/overload-test-dependencies.diff
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Benjamin Barenblat <bbaren@google.com>
-Subject: Resynchronize absl/functional/CMakeLists.txt with BUILD.bazel
-Forwarded: yes
-Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/7b87d959346cab4ab9829724efee377f7fb254ed
-
-overload_test needs some extra dependencies to build when absl::variant
-is not an alias for std::variant; these dependencies are listed in
-absl/functional/BUILD.bazel but not in absl/functional/CMakeLists.txt.
-Copy dependencies from BUILD.bazel to CMakeLists.txt.
-
-The author works at Google. Upstream applied this patch as Piper
-revision 631845552 and exported it to GitHub; the Applied-Upstream URL
-above points to the exported commit.
-
---- a/absl/functional/CMakeLists.txt
-+++ b/absl/functional/CMakeLists.txt
-@@ -129,6 +129,10 @@
- COPTS
- ${ABSL_TEST_COPTS}
- DEPS
-+ absl::config
-+ absl::overload
-+ absl::string_view
- absl::strings
-+ absl::variant
- GTest::gmock_main
- )
diff --git a/debian/patches/pkg-config-directives.diff b/debian/patches/pkg-config-directives.diff
index 726d6aec..ad3782d2 100644
--- a/debian/patches/pkg-config-directives.diff
+++ b/debian/patches/pkg-config-directives.diff
@@ -7,15 +7,13 @@ disable warnings.
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
-@@ -187,10 +187,7 @@
- endif()
- endforeach()
- foreach(cflag ${ABSL_CC_LIB_COPTS})
-- if(${cflag} MATCHES "^(-Wno|/wd)")
+@@ -195,9 +195,6 @@
+ # specified platform. Filter both of them out before the successor
+ # reaches the "^-m" filter.
+ set(skip_next_cflag ON)
+- elseif(${cflag} MATCHES "^(-Wno|/wd)")
- # These flags are needed to suppress warnings that might fire in our headers.
- set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
-- elseif(${cflag} MATCHES "^(-W|/w[1234eo])")
-+ if(${cflag} MATCHES "^(-W|/w[1234eo])")
+ elseif(${cflag} MATCHES "^(-W|/w[1234eo])")
# Don't impose our warnings on others.
elseif(${cflag} MATCHES "^-m")
- # Don't impose CPU instruction requirements on others, as
diff --git a/debian/patches/riscv-nan-formatting.diff b/debian/patches/riscv-nan-formatting.diff
deleted file mode 100644
index 8ad9b629..00000000
--- a/debian/patches/riscv-nan-formatting.diff
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Benjamin Barenblat <bbaren@google.com>
-Subject: riscv64: Disable negative NaN float ostream format checking
-Bug-Debian: https://bugs.debian.org/1059340
-
-Streaming a negative NaN float with libstdc++ on riscv64 produces an
-optimization-dependent result. Don't require that logging such a float with
-Abseil produce the same result as libstdc++ streaming.
-
---- a/absl/log/log_format_test.cc
-+++ b/absl/log/log_format_test.cc
-@@ -611,7 +611,9 @@
- EXPECT_CALL(
- test_sink,
- Send(AllOf(
-+#ifndef __riscv // see https://bugs.debian.org/1059340
- TextMessage(MatchesOstream(comparison_stream)),
-+#endif
- TextMessage(AnyOf(Eq("-nan"), Eq("nan"), Eq("NaN"), Eq("-nan(ind)"))),
- ENCODED_MESSAGE(
- AnyOf(EqualsProto(R"pb(value { str: "-nan" })pb"),
diff --git a/debian/patches/riscv-rdcycle.diff b/debian/patches/riscv-rdcycle.diff
deleted file mode 100644
index 24682c93..00000000
--- a/debian/patches/riscv-rdcycle.diff
+++ /dev/null
@@ -1,71 +0,0 @@
-From: aurel32 <aurelien@aurel32.net>
-Subject: unscaledcycleclock: remove RISC-V support
-Bug-Debian: https://bugs.debian.org/1059532
-Origin: upstream, https://github.com/abseil/abseil-cpp/commit/7335a36d0b5c1c597566f9aa3f458a5b6817c3b4
-
-Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on
-RISC-V and can't be used directly from userland. There is a sysctl
-option to change that as a transition period, but it will eventually
-disappear.
-
-The RDTIME instruction is another less accurate alternative, however its
-frequency varies from board to board, and there is currently now way to
-get its frequency from userland [2].
-
-Therefore this patch just removes the code for unscaledcycleclock on
-RISC-V. Without processor specific implementation, abseil relies on
-std::chrono::steady_clock::now().time_since_epoch() which is basically a
-wrapper around clock_gettime (CLOCK_MONOTONIC), which in turns use
-__vdso_clock_gettime(). On RISC-V this VDSO is just a wrapper around
-RDTIME correctly scaled to use nanoseconds units.
-
-This fixes the testsuite on riscv64, tested on a VisionFive 2 board.
-
-[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3
-[2] https://github.com/abseil/abseil-cpp/pull/1631
-
---- a/absl/base/internal/unscaledcycleclock.cc
-+++ b/absl/base/internal/unscaledcycleclock.cc
-@@ -121,18 +121,6 @@
- return aarch64_timer_frequency;
- }
-
--#elif defined(__riscv)
--
--int64_t UnscaledCycleClock::Now() {
-- int64_t virtual_timer_value;
-- asm volatile("rdcycle %0" : "=r"(virtual_timer_value));
-- return virtual_timer_value;
--}
--
--double UnscaledCycleClock::Frequency() {
-- return base_internal::NominalCPUFrequency();
--}
--
- #elif defined(_M_IX86) || defined(_M_X64)
-
- #pragma intrinsic(__rdtsc)
---- a/absl/base/internal/unscaledcycleclock_config.h
-+++ b/absl/base/internal/unscaledcycleclock_config.h
-@@ -21,8 +21,8 @@
-
- // The following platforms have an implementation of a hardware counter.
- #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
-- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \
-- defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
-+ defined(__powerpc__) || defined(__ppc__) || defined(_M_IX86) || \
-+ (defined(_M_X64) && !defined(_M_ARM64EC))
- #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
- #else
- #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 0
-@@ -53,8 +53,8 @@
- #if ABSL_USE_UNSCALED_CYCLECLOCK
- // This macro can be used to test if UnscaledCycleClock::Frequency()
- // is NominalCPUFrequency() on a particular platform.
--#if (defined(__i386__) || defined(__x86_64__) || defined(__riscv) || \
-- defined(_M_IX86) || defined(_M_X64))
-+#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
-+ defined(_M_X64))
- #define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY
- #endif
- #endif
diff --git a/debian/patches/series b/debian/patches/series
index b7caff14..46fa489b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,7 +3,3 @@ cpu-features.diff
latomic.diff
cordz-info-statistics-test.diff
pkg-config-directives.diff
-riscv-nan-formatting.diff
-riscv-rdcycle.diff
-overload-test-dependencies.diff
-mips-cxa-demangle.diff