diff --git a/0001-add-loongarch-suopport-for-abseil-cpp.patch b/0001-add-loongarch-suopport-for-abseil-cpp.patch deleted file mode 100644 index 2a90469ea9a8ab30644b92b3429c1140a01a418a..0000000000000000000000000000000000000000 --- a/0001-add-loongarch-suopport-for-abseil-cpp.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 560380189ff29687e011eada93774af59452f2c5 Mon Sep 17 00:00:00 2001 -From: Wenlong Zhang -Date: Wed, 6 Mar 2024 03:28:59 +0000 -Subject: [PATCH] add loongarch suopport for abseil-cpp - ---- - absl/base/internal/direct_mmap.h | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h -index 1beb2ee..80fcbbb 100644 ---- a/absl/base/internal/direct_mmap.h -+++ b/absl/base/internal/direct_mmap.h -@@ -80,7 +80,8 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, - (defined(__PPC__) && !defined(__PPC64__)) || \ - (defined(__riscv) && __riscv_xlen == 32) || \ - (defined(__s390__) && !defined(__s390x__)) || \ -- (defined(__sparc__) && !defined(__arch64__)) -+ (defined(__sparc__) && !defined(__arch64__)) || \ -+ defined(__loongarch64) - // On these architectures, implement mmap with mmap2. - static int pagesize = 0; - if (pagesize == 0) { -@@ -99,6 +100,10 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, - // Workaround by invoking __mmap2() instead. - return __mmap2(start, length, prot, flags, fd, - static_cast(offset / pagesize)); -+#elif defined(__loongarch64) -+ return reinterpret_cast( -+ syscall(SYS_mmap, start, length, prot, flags, fd, -+ static_cast(offset / pagesize))); // NOLINT - #else - return reinterpret_cast( - syscall(SYS_mmap2, start, length, prot, flags, fd, --- -2.43.0 - diff --git a/0002-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch b/0002-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch deleted file mode 100644 index f9adc5d6752b688fb0e6f802219af8f1c43b48e6..0000000000000000000000000000000000000000 --- a/0002-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 7335a36d0b5c1c597566f9aa3f458a5b6817c3b4 Mon Sep 17 00:00:00 2001 -From: aurel32 -Date: Fri, 22 Mar 2024 14:21:13 -0700 -Subject: [PATCH] PR #1644: unscaledcycleclock: remove RISC-V support - -Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1644 - -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 -Merge 43356a2548cfde76e164d446cb69004b488c6a71 into 76f8011beabdaee872b5fde7546e02407b220cb1 - -Merging this change closes #1644 - -COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1644 from aurel32:rv64-no-unscaledcycleclock 43356a2548cfde76e164d446cb69004b488c6a71 -PiperOrigin-RevId: 618286262 -Change-Id: Ie4120a727e7d0bb185df6e06ea145c780ebe6652 ---- - absl/base/internal/unscaledcycleclock.cc | 12 ------------ - absl/base/internal/unscaledcycleclock_config.h | 8 ++++---- - 2 files changed, 4 insertions(+), 16 deletions(-) - -diff --git a/absl/base/internal/unscaledcycleclock.cc b/absl/base/internal/unscaledcycleclock.cc -index 05e0e7ba..a0bf3a65 100644 ---- a/absl/base/internal/unscaledcycleclock.cc -+++ b/absl/base/internal/unscaledcycleclock.cc -@@ -121,18 +121,6 @@ double UnscaledCycleClock::Frequency() { - 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) -diff --git a/absl/base/internal/unscaledcycleclock_config.h b/absl/base/internal/unscaledcycleclock_config.h -index 24b324ac..43a3dabe 100644 ---- 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 --- -2.39.2 - diff --git a/BUILD.gn b/BUILD.gn index 70afae17acdeb59bb0dfd9059f4bf4f116ec40d7..53fc2f43aa016c066da04c918b38fb6410e2dce3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -30,11 +30,13 @@ ohos_shared_library("absl_base") { sources = [ "${ABSEIL_DIR}/absl/base/internal/cycleclock.cc", "${ABSEIL_DIR}/absl/base/internal/low_level_alloc.cc", + "${ABSEIL_DIR}/absl/base/internal/raw_logging.cc", "${ABSEIL_DIR}/absl/base/internal/spinlock.cc", "${ABSEIL_DIR}/absl/base/internal/strerror.cc", "${ABSEIL_DIR}/absl/base/internal/sysinfo.cc", "${ABSEIL_DIR}/absl/base/internal/thread_identity.cc", "${ABSEIL_DIR}/absl/base/internal/throw_delegate.cc", + "${ABSEIL_DIR}/absl/base/internal/tracing.cc", "${ABSEIL_DIR}/absl/base/internal/unscaledcycleclock.cc", ] @@ -54,438 +56,151 @@ ohos_shared_library("absl_base") { ohos_static_library("absl_base_static") { sources = [ - "${ABSEIL_DIR}/absl/algorithm/algorithm.h", - "${ABSEIL_DIR}/absl/algorithm/container.h", - "${ABSEIL_DIR}/absl/base/attributes.h", - "${ABSEIL_DIR}/absl/base/call_once.h", - "${ABSEIL_DIR}/absl/base/casts.h", - "${ABSEIL_DIR}/absl/base/config.h", - "${ABSEIL_DIR}/absl/base/const_init.h", - "${ABSEIL_DIR}/absl/base/dynamic_annotations.h", - "${ABSEIL_DIR}/absl/base/internal/atomic_hook.h", "${ABSEIL_DIR}/absl/base/internal/cycleclock.cc", - "${ABSEIL_DIR}/absl/base/internal/cycleclock.h", - "${ABSEIL_DIR}/absl/base/internal/cycleclock_config.h", - "${ABSEIL_DIR}/absl/base/internal/direct_mmap.h", - "${ABSEIL_DIR}/absl/base/internal/dynamic_annotations.h", - "${ABSEIL_DIR}/absl/base/internal/endian.h", - "${ABSEIL_DIR}/absl/base/internal/errno_saver.h", - "${ABSEIL_DIR}/absl/base/internal/fast_type_id.h", - "${ABSEIL_DIR}/absl/base/internal/hide_ptr.h", - "${ABSEIL_DIR}/absl/base/internal/identity.h", - "${ABSEIL_DIR}/absl/base/internal/inline_variable.h", - "${ABSEIL_DIR}/absl/base/internal/invoke.h", "${ABSEIL_DIR}/absl/base/internal/low_level_alloc.cc", - "${ABSEIL_DIR}/absl/base/internal/low_level_alloc.h", - "${ABSEIL_DIR}/absl/base/internal/low_level_scheduling.h", - "${ABSEIL_DIR}/absl/base/internal/nullability_impl.h", - "${ABSEIL_DIR}/absl/base/internal/per_thread_tls.h", - "${ABSEIL_DIR}/absl/base/internal/prefetch.h", - "${ABSEIL_DIR}/absl/base/internal/pretty_function.h", + "${ABSEIL_DIR}/absl/base/internal/poison.cc", "${ABSEIL_DIR}/absl/base/internal/raw_logging.cc", - "${ABSEIL_DIR}/absl/base/internal/raw_logging.h", - "${ABSEIL_DIR}/absl/base/internal/scheduling_mode.h", "${ABSEIL_DIR}/absl/base/internal/scoped_set_env.cc", - "${ABSEIL_DIR}/absl/base/internal/scoped_set_env.h", "${ABSEIL_DIR}/absl/base/internal/spinlock.cc", - "${ABSEIL_DIR}/absl/base/internal/spinlock.h", "${ABSEIL_DIR}/absl/base/internal/spinlock_wait.cc", - "${ABSEIL_DIR}/absl/base/internal/spinlock_wait.h", "${ABSEIL_DIR}/absl/base/internal/strerror.cc", - "${ABSEIL_DIR}/absl/base/internal/strerror.h", "${ABSEIL_DIR}/absl/base/internal/sysinfo.cc", - "${ABSEIL_DIR}/absl/base/internal/sysinfo.h", - "${ABSEIL_DIR}/absl/base/internal/thread_annotations.h", "${ABSEIL_DIR}/absl/base/internal/thread_identity.cc", - "${ABSEIL_DIR}/absl/base/internal/thread_identity.h", "${ABSEIL_DIR}/absl/base/internal/throw_delegate.cc", - "${ABSEIL_DIR}/absl/base/internal/throw_delegate.h", - "${ABSEIL_DIR}/absl/base/internal/tsan_mutex_interface.h", - "${ABSEIL_DIR}/absl/base/internal/unaligned_access.h", + "${ABSEIL_DIR}/absl/base/internal/tracing.cc", "${ABSEIL_DIR}/absl/base/internal/unscaledcycleclock.cc", - "${ABSEIL_DIR}/absl/base/internal/unscaledcycleclock.h", - "${ABSEIL_DIR}/absl/base/internal/unscaledcycleclock_config.h", "${ABSEIL_DIR}/absl/base/log_severity.cc", - "${ABSEIL_DIR}/absl/base/log_severity.h", - "${ABSEIL_DIR}/absl/base/macros.h", - "${ABSEIL_DIR}/absl/base/nullability.h", - "${ABSEIL_DIR}/absl/base/optimization.h", - "${ABSEIL_DIR}/absl/base/options.h", - "${ABSEIL_DIR}/absl/base/policy_checks.h", - "${ABSEIL_DIR}/absl/base/port.h", - "${ABSEIL_DIR}/absl/base/prefetch.h", - "${ABSEIL_DIR}/absl/base/thread_annotations.h", - "${ABSEIL_DIR}/absl/cleanup/cleanup.h", - "${ABSEIL_DIR}/absl/cleanup/internal/cleanup.h", - "${ABSEIL_DIR}/absl/container/btree_map.h", - "${ABSEIL_DIR}/absl/container/btree_set.h", - "${ABSEIL_DIR}/absl/container/fixed_array.h", - "${ABSEIL_DIR}/absl/container/flat_hash_map.h", - "${ABSEIL_DIR}/absl/container/flat_hash_set.h", - "${ABSEIL_DIR}/absl/container/inlined_vector.h", - "${ABSEIL_DIR}/absl/container/internal/btree.h", - "${ABSEIL_DIR}/absl/container/internal/btree_container.h", - "${ABSEIL_DIR}/absl/container/internal/common.h", - "${ABSEIL_DIR}/absl/container/internal/common_policy_traits.h", - "${ABSEIL_DIR}/absl/container/internal/compressed_tuple.h", - "${ABSEIL_DIR}/absl/container/internal/container_memory.h", - "${ABSEIL_DIR}/absl/container/internal/counting_allocator.h", - "${ABSEIL_DIR}/absl/container/internal/hash_function_defaults.h", - "${ABSEIL_DIR}/absl/container/internal/hash_policy_traits.h", - "${ABSEIL_DIR}/absl/container/internal/hashtable_debug.h", - "${ABSEIL_DIR}/absl/container/internal/hashtable_debug_hooks.h", "${ABSEIL_DIR}/absl/container/internal/hashtablez_sampler.cc", - "${ABSEIL_DIR}/absl/container/internal/hashtablez_sampler.h", "${ABSEIL_DIR}/absl/container/internal/hashtablez_sampler_force_weak_definition.cc", - "${ABSEIL_DIR}/absl/container/internal/inlined_vector.h", - "${ABSEIL_DIR}/absl/container/internal/layout.h", - "${ABSEIL_DIR}/absl/container/internal/node_slot_policy.h", - "${ABSEIL_DIR}/absl/container/internal/raw_hash_map.h", "${ABSEIL_DIR}/absl/container/internal/raw_hash_set.cc", - "${ABSEIL_DIR}/absl/container/internal/raw_hash_set.h", - "${ABSEIL_DIR}/absl/container/internal/tracked.h", - "${ABSEIL_DIR}/absl/container/node_hash_map.h", - "${ABSEIL_DIR}/absl/container/node_hash_set.h", "${ABSEIL_DIR}/absl/crc/crc32c.cc", - "${ABSEIL_DIR}/absl/crc/crc32c.h", "${ABSEIL_DIR}/absl/crc/internal/cpu_detect.cc", - "${ABSEIL_DIR}/absl/crc/internal/cpu_detect.h", "${ABSEIL_DIR}/absl/crc/internal/crc.cc", - "${ABSEIL_DIR}/absl/crc/internal/crc.h", - "${ABSEIL_DIR}/absl/crc/internal/crc32_x86_arm_combined_simd.h", - "${ABSEIL_DIR}/absl/crc/internal/crc32c.h", - "${ABSEIL_DIR}/absl/crc/internal/crc32c_inline.h", "${ABSEIL_DIR}/absl/crc/internal/crc_cord_state.cc", - "${ABSEIL_DIR}/absl/crc/internal/crc_cord_state.h", - "${ABSEIL_DIR}/absl/crc/internal/crc_internal.h", - "${ABSEIL_DIR}/absl/crc/internal/crc_memcpy.h", "${ABSEIL_DIR}/absl/crc/internal/crc_memcpy_fallback.cc", - "${ABSEIL_DIR}/absl/crc/internal/crc_memcpy_x86_64.cc", + "${ABSEIL_DIR}/absl/crc/internal/crc_memcpy_x86_arm_combined.cc", "${ABSEIL_DIR}/absl/crc/internal/crc_non_temporal_memcpy.cc", "${ABSEIL_DIR}/absl/crc/internal/crc_x86_arm_combined.cc", - "${ABSEIL_DIR}/absl/crc/internal/non_temporal_arm_intrinsics.h", - "${ABSEIL_DIR}/absl/crc/internal/non_temporal_memcpy.h", "${ABSEIL_DIR}/absl/debugging/failure_signal_handler.cc", - "${ABSEIL_DIR}/absl/debugging/failure_signal_handler.h", "${ABSEIL_DIR}/absl/debugging/internal/address_is_readable.cc", - "${ABSEIL_DIR}/absl/debugging/internal/address_is_readable.h", + "${ABSEIL_DIR}/absl/debugging/internal/decode_rust_punycode.cc", "${ABSEIL_DIR}/absl/debugging/internal/demangle.cc", - "${ABSEIL_DIR}/absl/debugging/internal/demangle.h", + "${ABSEIL_DIR}/absl/debugging/internal/demangle_rust.cc", "${ABSEIL_DIR}/absl/debugging/internal/elf_mem_image.cc", - "${ABSEIL_DIR}/absl/debugging/internal/elf_mem_image.h", "${ABSEIL_DIR}/absl/debugging/internal/examine_stack.cc", - "${ABSEIL_DIR}/absl/debugging/internal/examine_stack.h", "${ABSEIL_DIR}/absl/debugging/internal/stack_consumption.cc", - "${ABSEIL_DIR}/absl/debugging/internal/stack_consumption.h", - "${ABSEIL_DIR}/absl/debugging/internal/stacktrace_config.h", - "${ABSEIL_DIR}/absl/debugging/internal/symbolize.h", + "${ABSEIL_DIR}/absl/debugging/internal/utf8_for_code_point.cc", "${ABSEIL_DIR}/absl/debugging/internal/vdso_support.cc", - "${ABSEIL_DIR}/absl/debugging/internal/vdso_support.h", "${ABSEIL_DIR}/absl/debugging/leak_check.cc", - "${ABSEIL_DIR}/absl/debugging/leak_check.h", "${ABSEIL_DIR}/absl/debugging/stacktrace.cc", - "${ABSEIL_DIR}/absl/debugging/stacktrace.h", "${ABSEIL_DIR}/absl/debugging/symbolize.cc", - "${ABSEIL_DIR}/absl/debugging/symbolize.h", - "${ABSEIL_DIR}/absl/functional/any_invocable.h", - "${ABSEIL_DIR}/absl/functional/bind_front.h", - "${ABSEIL_DIR}/absl/functional/function_ref.h", - "${ABSEIL_DIR}/absl/functional/internal/any_invocable.h", - "${ABSEIL_DIR}/absl/functional/internal/front_binder.h", - "${ABSEIL_DIR}/absl/functional/internal/function_ref.h", - "${ABSEIL_DIR}/absl/hash/hash.h", "${ABSEIL_DIR}/absl/hash/internal/city.cc", - "${ABSEIL_DIR}/absl/hash/internal/city.h", "${ABSEIL_DIR}/absl/hash/internal/hash.cc", - "${ABSEIL_DIR}/absl/hash/internal/hash.h", "${ABSEIL_DIR}/absl/hash/internal/low_level_hash.cc", - "${ABSEIL_DIR}/absl/hash/internal/low_level_hash.h", - "${ABSEIL_DIR}/absl/hash/internal/spy_hash_state.h", - "${ABSEIL_DIR}/absl/log/absl_check.h", - "${ABSEIL_DIR}/absl/log/absl_log.h", - "${ABSEIL_DIR}/absl/log/check.h", "${ABSEIL_DIR}/absl/log/die_if_null.cc", - "${ABSEIL_DIR}/absl/log/die_if_null.h", "${ABSEIL_DIR}/absl/log/globals.cc", - "${ABSEIL_DIR}/absl/log/globals.h", "${ABSEIL_DIR}/absl/log/initialize.cc", - "${ABSEIL_DIR}/absl/log/initialize.h", - "${ABSEIL_DIR}/absl/log/internal/append_truncated.h", - "${ABSEIL_DIR}/absl/log/internal/check_impl.h", "${ABSEIL_DIR}/absl/log/internal/check_op.cc", - "${ABSEIL_DIR}/absl/log/internal/check_op.h", "${ABSEIL_DIR}/absl/log/internal/conditions.cc", - "${ABSEIL_DIR}/absl/log/internal/conditions.h", - "${ABSEIL_DIR}/absl/log/internal/config.h", + "${ABSEIL_DIR}/absl/log/internal/fnmatch.cc", "${ABSEIL_DIR}/absl/log/internal/globals.cc", - "${ABSEIL_DIR}/absl/log/internal/globals.h", "${ABSEIL_DIR}/absl/log/internal/log_format.cc", - "${ABSEIL_DIR}/absl/log/internal/log_format.h", - "${ABSEIL_DIR}/absl/log/internal/log_impl.h", "${ABSEIL_DIR}/absl/log/internal/log_message.cc", - "${ABSEIL_DIR}/absl/log/internal/log_message.h", "${ABSEIL_DIR}/absl/log/internal/log_sink_set.cc", - "${ABSEIL_DIR}/absl/log/internal/log_sink_set.h", "${ABSEIL_DIR}/absl/log/internal/nullguard.cc", - "${ABSEIL_DIR}/absl/log/internal/nullguard.h", - "${ABSEIL_DIR}/absl/log/internal/nullstream.h", "${ABSEIL_DIR}/absl/log/internal/proto.cc", - "${ABSEIL_DIR}/absl/log/internal/proto.h", - "${ABSEIL_DIR}/absl/log/internal/strip.h", - "${ABSEIL_DIR}/absl/log/internal/structured.h", - "${ABSEIL_DIR}/absl/log/internal/voidify.h", - "${ABSEIL_DIR}/absl/log/log.h", + "${ABSEIL_DIR}/absl/log/internal/structured_proto.cc", + "${ABSEIL_DIR}/absl/log/internal/vlog_config.cc", "${ABSEIL_DIR}/absl/log/log_entry.cc", - "${ABSEIL_DIR}/absl/log/log_entry.h", "${ABSEIL_DIR}/absl/log/log_sink.cc", - "${ABSEIL_DIR}/absl/log/log_sink.h", - "${ABSEIL_DIR}/absl/log/log_sink_registry.h", - "${ABSEIL_DIR}/absl/log/log_streamer.h", - "${ABSEIL_DIR}/absl/log/structured.h", - "${ABSEIL_DIR}/absl/memory/memory.h", - "${ABSEIL_DIR}/absl/meta/type_traits.h", - "${ABSEIL_DIR}/absl/numeric/bits.h", "${ABSEIL_DIR}/absl/numeric/int128.cc", - "${ABSEIL_DIR}/absl/numeric/int128.h", - "${ABSEIL_DIR}/absl/numeric/internal/bits.h", - "${ABSEIL_DIR}/absl/numeric/internal/representation.h", "${ABSEIL_DIR}/absl/profiling/internal/exponential_biased.cc", - "${ABSEIL_DIR}/absl/profiling/internal/exponential_biased.h", "${ABSEIL_DIR}/absl/profiling/internal/periodic_sampler.cc", - "${ABSEIL_DIR}/absl/profiling/internal/periodic_sampler.h", - "${ABSEIL_DIR}/absl/profiling/internal/sample_recorder.h", - "${ABSEIL_DIR}/absl/random/bernoulli_distribution.h", - "${ABSEIL_DIR}/absl/random/beta_distribution.h", - "${ABSEIL_DIR}/absl/random/bit_gen_ref.h", "${ABSEIL_DIR}/absl/random/discrete_distribution.cc", - "${ABSEIL_DIR}/absl/random/discrete_distribution.h", - "${ABSEIL_DIR}/absl/random/distributions.h", - "${ABSEIL_DIR}/absl/random/exponential_distribution.h", "${ABSEIL_DIR}/absl/random/gaussian_distribution.cc", - "${ABSEIL_DIR}/absl/random/gaussian_distribution.h", - "${ABSEIL_DIR}/absl/random/internal/distribution_caller.h", - "${ABSEIL_DIR}/absl/random/internal/fast_uniform_bits.h", - "${ABSEIL_DIR}/absl/random/internal/fastmath.h", - "${ABSEIL_DIR}/absl/random/internal/generate_real.h", - "${ABSEIL_DIR}/absl/random/internal/iostream_state_saver.h", - "${ABSEIL_DIR}/absl/random/internal/nonsecure_base.h", - "${ABSEIL_DIR}/absl/random/internal/pcg_engine.h", - "${ABSEIL_DIR}/absl/random/internal/platform.h", "${ABSEIL_DIR}/absl/random/internal/pool_urbg.cc", - "${ABSEIL_DIR}/absl/random/internal/pool_urbg.h", "${ABSEIL_DIR}/absl/random/internal/randen.cc", - "${ABSEIL_DIR}/absl/random/internal/randen.h", "${ABSEIL_DIR}/absl/random/internal/randen_detect.cc", - "${ABSEIL_DIR}/absl/random/internal/randen_detect.h", - "${ABSEIL_DIR}/absl/random/internal/randen_engine.h", "${ABSEIL_DIR}/absl/random/internal/randen_hwaes.cc", - "${ABSEIL_DIR}/absl/random/internal/randen_hwaes.h", "${ABSEIL_DIR}/absl/random/internal/randen_round_keys.cc", "${ABSEIL_DIR}/absl/random/internal/randen_slow.cc", - "${ABSEIL_DIR}/absl/random/internal/randen_slow.h", - "${ABSEIL_DIR}/absl/random/internal/randen_traits.h", - "${ABSEIL_DIR}/absl/random/internal/salted_seed_seq.h", "${ABSEIL_DIR}/absl/random/internal/seed_material.cc", - "${ABSEIL_DIR}/absl/random/internal/seed_material.h", - "${ABSEIL_DIR}/absl/random/internal/sequence_urbg.h", - "${ABSEIL_DIR}/absl/random/internal/traits.h", - "${ABSEIL_DIR}/absl/random/internal/uniform_helper.h", - "${ABSEIL_DIR}/absl/random/internal/wide_multiply.h", - "${ABSEIL_DIR}/absl/random/log_uniform_int_distribution.h", - "${ABSEIL_DIR}/absl/random/poisson_distribution.h", - "${ABSEIL_DIR}/absl/random/random.h", "${ABSEIL_DIR}/absl/random/seed_gen_exception.cc", - "${ABSEIL_DIR}/absl/random/seed_gen_exception.h", "${ABSEIL_DIR}/absl/random/seed_sequences.cc", - "${ABSEIL_DIR}/absl/random/seed_sequences.h", - "${ABSEIL_DIR}/absl/random/uniform_int_distribution.h", - "${ABSEIL_DIR}/absl/random/uniform_real_distribution.h", - "${ABSEIL_DIR}/absl/random/zipf_distribution.h", - "${ABSEIL_DIR}/absl/status/internal/status_internal.h", - "${ABSEIL_DIR}/absl/status/internal/statusor_internal.h", + "${ABSEIL_DIR}/absl/status/internal/status_internal.cc", "${ABSEIL_DIR}/absl/status/status.cc", - "${ABSEIL_DIR}/absl/status/status.h", "${ABSEIL_DIR}/absl/status/status_payload_printer.cc", - "${ABSEIL_DIR}/absl/status/status_payload_printer.h", "${ABSEIL_DIR}/absl/status/statusor.cc", - "${ABSEIL_DIR}/absl/status/statusor.h", "${ABSEIL_DIR}/absl/strings/ascii.cc", - "${ABSEIL_DIR}/absl/strings/ascii.h", "${ABSEIL_DIR}/absl/strings/charconv.cc", - "${ABSEIL_DIR}/absl/strings/charconv.h", "${ABSEIL_DIR}/absl/strings/cord.cc", - "${ABSEIL_DIR}/absl/strings/cord.h", "${ABSEIL_DIR}/absl/strings/cord_analysis.cc", - "${ABSEIL_DIR}/absl/strings/cord_analysis.h", "${ABSEIL_DIR}/absl/strings/cord_buffer.cc", - "${ABSEIL_DIR}/absl/strings/cord_buffer.h", "${ABSEIL_DIR}/absl/strings/escaping.cc", - "${ABSEIL_DIR}/absl/strings/escaping.h", - "${ABSEIL_DIR}/absl/strings/internal/char_map.h", "${ABSEIL_DIR}/absl/strings/internal/charconv_bigint.cc", - "${ABSEIL_DIR}/absl/strings/internal/charconv_bigint.h", "${ABSEIL_DIR}/absl/strings/internal/charconv_parse.cc", - "${ABSEIL_DIR}/absl/strings/internal/charconv_parse.h", - "${ABSEIL_DIR}/absl/strings/internal/cord_data_edge.h", "${ABSEIL_DIR}/absl/strings/internal/cord_internal.cc", - "${ABSEIL_DIR}/absl/strings/internal/cord_internal.h", "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree.cc", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree.h", "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_navigator.cc", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_navigator.h", "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_reader.cc", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_reader.h", "${ABSEIL_DIR}/absl/strings/internal/cord_rep_consume.cc", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_consume.h", "${ABSEIL_DIR}/absl/strings/internal/cord_rep_crc.cc", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_crc.h", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_flat.h", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_ring.cc", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_ring.h", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_ring_reader.h", "${ABSEIL_DIR}/absl/strings/internal/cordz_functions.cc", - "${ABSEIL_DIR}/absl/strings/internal/cordz_functions.h", "${ABSEIL_DIR}/absl/strings/internal/cordz_handle.cc", - "${ABSEIL_DIR}/absl/strings/internal/cordz_handle.h", "${ABSEIL_DIR}/absl/strings/internal/cordz_info.cc", - "${ABSEIL_DIR}/absl/strings/internal/cordz_info.h", "${ABSEIL_DIR}/absl/strings/internal/cordz_sample_token.cc", - "${ABSEIL_DIR}/absl/strings/internal/cordz_sample_token.h", - "${ABSEIL_DIR}/absl/strings/internal/cordz_statistics.h", - "${ABSEIL_DIR}/absl/strings/internal/cordz_update_scope.h", - "${ABSEIL_DIR}/absl/strings/internal/cordz_update_tracker.h", "${ABSEIL_DIR}/absl/strings/internal/damerau_levenshtein_distance.cc", - "${ABSEIL_DIR}/absl/strings/internal/damerau_levenshtein_distance.h", "${ABSEIL_DIR}/absl/strings/internal/escaping.cc", - "${ABSEIL_DIR}/absl/strings/internal/escaping.h", - "${ABSEIL_DIR}/absl/strings/internal/has_absl_stringify.h", "${ABSEIL_DIR}/absl/strings/internal/memutil.cc", - "${ABSEIL_DIR}/absl/strings/internal/memutil.h", "${ABSEIL_DIR}/absl/strings/internal/ostringstream.cc", - "${ABSEIL_DIR}/absl/strings/internal/ostringstream.h", "${ABSEIL_DIR}/absl/strings/internal/pow10_helper.cc", - "${ABSEIL_DIR}/absl/strings/internal/pow10_helper.h", - "${ABSEIL_DIR}/absl/strings/internal/resize_uninitialized.h", - "${ABSEIL_DIR}/absl/strings/internal/stl_type_traits.h", "${ABSEIL_DIR}/absl/strings/internal/str_format/arg.cc", - "${ABSEIL_DIR}/absl/strings/internal/str_format/arg.h", "${ABSEIL_DIR}/absl/strings/internal/str_format/bind.cc", - "${ABSEIL_DIR}/absl/strings/internal/str_format/bind.h", - "${ABSEIL_DIR}/absl/strings/internal/str_format/checker.h", - "${ABSEIL_DIR}/absl/strings/internal/str_format/constexpr_parser.h", "${ABSEIL_DIR}/absl/strings/internal/str_format/extension.cc", - "${ABSEIL_DIR}/absl/strings/internal/str_format/extension.h", "${ABSEIL_DIR}/absl/strings/internal/str_format/float_conversion.cc", - "${ABSEIL_DIR}/absl/strings/internal/str_format/float_conversion.h", "${ABSEIL_DIR}/absl/strings/internal/str_format/output.cc", - "${ABSEIL_DIR}/absl/strings/internal/str_format/output.h", "${ABSEIL_DIR}/absl/strings/internal/str_format/parser.cc", - "${ABSEIL_DIR}/absl/strings/internal/str_format/parser.h", - "${ABSEIL_DIR}/absl/strings/internal/str_join_internal.h", - "${ABSEIL_DIR}/absl/strings/internal/str_split_internal.h", - "${ABSEIL_DIR}/absl/strings/internal/string_constant.h", "${ABSEIL_DIR}/absl/strings/internal/stringify_sink.cc", - "${ABSEIL_DIR}/absl/strings/internal/stringify_sink.h", "${ABSEIL_DIR}/absl/strings/internal/utf8.cc", - "${ABSEIL_DIR}/absl/strings/internal/utf8.h", "${ABSEIL_DIR}/absl/strings/match.cc", - "${ABSEIL_DIR}/absl/strings/match.h", "${ABSEIL_DIR}/absl/strings/numbers.cc", - "${ABSEIL_DIR}/absl/strings/numbers.h", "${ABSEIL_DIR}/absl/strings/str_cat.cc", - "${ABSEIL_DIR}/absl/strings/str_cat.h", - "${ABSEIL_DIR}/absl/strings/str_format.h", - "${ABSEIL_DIR}/absl/strings/str_join.h", "${ABSEIL_DIR}/absl/strings/str_replace.cc", - "${ABSEIL_DIR}/absl/strings/str_replace.h", "${ABSEIL_DIR}/absl/strings/str_split.cc", - "${ABSEIL_DIR}/absl/strings/str_split.h", "${ABSEIL_DIR}/absl/strings/string_view.cc", - "${ABSEIL_DIR}/absl/strings/string_view.h", - "${ABSEIL_DIR}/absl/strings/strip.h", "${ABSEIL_DIR}/absl/strings/substitute.cc", - "${ABSEIL_DIR}/absl/strings/substitute.h", "${ABSEIL_DIR}/absl/synchronization/barrier.cc", - "${ABSEIL_DIR}/absl/synchronization/barrier.h", "${ABSEIL_DIR}/absl/synchronization/blocking_counter.cc", - "${ABSEIL_DIR}/absl/synchronization/blocking_counter.h", "${ABSEIL_DIR}/absl/synchronization/internal/create_thread_identity.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/create_thread_identity.h", - "${ABSEIL_DIR}/absl/synchronization/internal/futex.h", "${ABSEIL_DIR}/absl/synchronization/internal/futex_waiter.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/futex_waiter.h", "${ABSEIL_DIR}/absl/synchronization/internal/graphcycles.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/graphcycles.h", "${ABSEIL_DIR}/absl/synchronization/internal/kernel_timeout.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/kernel_timeout.h", "${ABSEIL_DIR}/absl/synchronization/internal/per_thread_sem.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/per_thread_sem.h", "${ABSEIL_DIR}/absl/synchronization/internal/pthread_waiter.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/pthread_waiter.h", "${ABSEIL_DIR}/absl/synchronization/internal/sem_waiter.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/sem_waiter.h", "${ABSEIL_DIR}/absl/synchronization/internal/stdcpp_waiter.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/stdcpp_waiter.h", - "${ABSEIL_DIR}/absl/synchronization/internal/thread_pool.h", - "${ABSEIL_DIR}/absl/synchronization/internal/waiter.h", "${ABSEIL_DIR}/absl/synchronization/internal/waiter_base.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/waiter_base.h", "${ABSEIL_DIR}/absl/synchronization/internal/win32_waiter.cc", - "${ABSEIL_DIR}/absl/synchronization/internal/win32_waiter.h", "${ABSEIL_DIR}/absl/synchronization/mutex.cc", - "${ABSEIL_DIR}/absl/synchronization/mutex.h", "${ABSEIL_DIR}/absl/synchronization/notification.cc", - "${ABSEIL_DIR}/absl/synchronization/notification.h", "${ABSEIL_DIR}/absl/time/civil_time.cc", - "${ABSEIL_DIR}/absl/time/civil_time.h", "${ABSEIL_DIR}/absl/time/clock.cc", - "${ABSEIL_DIR}/absl/time/clock.h", "${ABSEIL_DIR}/absl/time/duration.cc", "${ABSEIL_DIR}/absl/time/format.cc", - "${ABSEIL_DIR}/absl/time/internal/cctz/include/cctz/civil_time.h", - "${ABSEIL_DIR}/absl/time/internal/cctz/include/cctz/civil_time_detail.h", - "${ABSEIL_DIR}/absl/time/internal/cctz/include/cctz/time_zone.h", - "${ABSEIL_DIR}/absl/time/internal/cctz/include/cctz/zone_info_source.h", "${ABSEIL_DIR}/absl/time/internal/cctz/src/civil_time_detail.cc", "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_fixed.cc", - "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_fixed.h", "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_format.cc", "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_if.cc", - "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_if.h", "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_impl.cc", - "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_impl.h", "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_info.cc", - "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_info.h", "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_libc.cc", - "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_libc.h", "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_lookup.cc", "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_posix.cc", - "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_posix.h", - "${ABSEIL_DIR}/absl/time/internal/cctz/src/tzfile.h", "${ABSEIL_DIR}/absl/time/internal/cctz/src/zone_info_source.cc", "${ABSEIL_DIR}/absl/time/time.cc", - "${ABSEIL_DIR}/absl/time/time.h", - "${ABSEIL_DIR}/absl/types/any.h", "${ABSEIL_DIR}/absl/types/bad_any_cast.cc", - "${ABSEIL_DIR}/absl/types/bad_any_cast.h", "${ABSEIL_DIR}/absl/types/bad_optional_access.cc", - "${ABSEIL_DIR}/absl/types/bad_optional_access.h", "${ABSEIL_DIR}/absl/types/bad_variant_access.cc", - "${ABSEIL_DIR}/absl/types/bad_variant_access.h", - "${ABSEIL_DIR}/absl/types/compare.h", - "${ABSEIL_DIR}/absl/types/internal/conformance_aliases.h", - "${ABSEIL_DIR}/absl/types/internal/conformance_archetype.h", - "${ABSEIL_DIR}/absl/types/internal/conformance_profile.h", - "${ABSEIL_DIR}/absl/types/internal/optional.h", - "${ABSEIL_DIR}/absl/types/internal/parentheses.h", - "${ABSEIL_DIR}/absl/types/internal/span.h", - "${ABSEIL_DIR}/absl/types/internal/transform_args.h", - "${ABSEIL_DIR}/absl/types/internal/variant.h", - "${ABSEIL_DIR}/absl/types/optional.h", - "${ABSEIL_DIR}/absl/types/span.h", - "${ABSEIL_DIR}/absl/types/variant.h", - "${ABSEIL_DIR}/absl/utility/internal/if_constexpr.h", - "${ABSEIL_DIR}/absl/utility/utility.h", ] include_dirs = [ "${ABSEIL_DIR}/" ] cflags = ABSL_DEFAULT_COPTS @@ -511,12 +226,14 @@ ohos_shared_library("absl_raw_logging_internal") { ohos_shared_library("absl_log") { branch_protector_ret = "pac_ret" sources = [ + "${ABSEIL_DIR}/absl/debugging/leak_check.cc", "${ABSEIL_DIR}/absl/log/absl_check.h", "${ABSEIL_DIR}/absl/log/die_if_null.cc", "${ABSEIL_DIR}/absl/log/globals.cc", "${ABSEIL_DIR}/absl/log/initialize.cc", "${ABSEIL_DIR}/absl/log/internal/check_op.cc", "${ABSEIL_DIR}/absl/log/internal/conditions.cc", + "${ABSEIL_DIR}/absl/log/internal/fnmatch.cc", "${ABSEIL_DIR}/absl/log/internal/globals.cc", "${ABSEIL_DIR}/absl/log/internal/log_format.cc", "${ABSEIL_DIR}/absl/log/internal/log_message.cc", @@ -524,6 +241,8 @@ ohos_shared_library("absl_log") { "${ABSEIL_DIR}/absl/log/internal/nullguard.cc", "${ABSEIL_DIR}/absl/log/internal/nullguard.h", "${ABSEIL_DIR}/absl/log/internal/proto.cc", + "${ABSEIL_DIR}/absl/log/internal/structured_proto.cc", + "${ABSEIL_DIR}/absl/log/internal/vlog_config.cc", "${ABSEIL_DIR}/absl/log/log_sink.cc", ] include_dirs = [ "${ABSEIL_DIR}/" ] @@ -622,9 +341,12 @@ ohos_shared_library("absl_stacktrace") { ohos_shared_library("absl_symbolize") { sources = [ + "${ABSEIL_DIR}/absl/debugging/internal/decode_rust_punycode.cc", "${ABSEIL_DIR}/absl/debugging/internal/demangle.cc", + "${ABSEIL_DIR}/absl/debugging/internal/demangle_rust.cc", "${ABSEIL_DIR}/absl/debugging/internal/elf_mem_image.cc", "${ABSEIL_DIR}/absl/debugging/internal/symbolize.h", + "${ABSEIL_DIR}/absl/debugging/internal/utf8_for_code_point.cc", "${ABSEIL_DIR}/absl/debugging/internal/vdso_support.cc", "${ABSEIL_DIR}/absl/debugging/symbolize.cc", "${ABSEIL_DIR}/absl/debugging/symbolize.h", @@ -688,6 +410,8 @@ ohos_shared_library("absl_int128") { ohos_shared_library("absl_status") { sources = [ "${ABSEIL_DIR}/absl/base/internal/strerror.cc", + "${ABSEIL_DIR}/absl/debugging/leak_check.cc", + "${ABSEIL_DIR}/absl/status/internal/status_internal.cc", "${ABSEIL_DIR}/absl/status/status.cc", "${ABSEIL_DIR}/absl/status/status_payload_printer.cc", "${ABSEIL_DIR}/absl/status/statusor.cc", @@ -786,6 +510,7 @@ config("cflags_config") { "-Wno-c++17-attribute-extensions", "-Wno-cast-function-type", "-Wno-atomic-implicit-seq-cst", + "-Wno-used-but-marked-unused", ] # Adapating DEBUG version, FIX ME @@ -875,7 +600,6 @@ ohos_shared_library("absl_cord") { "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_reader.cc", "${ABSEIL_DIR}/absl/strings/internal/cord_rep_consume.cc", "${ABSEIL_DIR}/absl/strings/internal/cord_rep_crc.cc", - "${ABSEIL_DIR}/absl/strings/internal/cord_rep_ring.cc", "${ABSEIL_DIR}/absl/strings/internal/cordz_functions.cc", "${ABSEIL_DIR}/absl/strings/internal/cordz_handle.cc", "${ABSEIL_DIR}/absl/strings/internal/cordz_info.cc", diff --git a/README.OpenSource b/README.OpenSource index fdeaa08f921a207edb642de0d9af213842d2fb55..d18ddcab4ca47e83819e4674f4a9770ead650809 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -3,8 +3,8 @@ "Name": "openEuler:abseil-cpp", "License": "Apache License V2.0", "License File": "LICENSE", - "Version Number": "20230802.1-5.oe2403sp1", - "Upstream URL": "https://www.openeuler.org", - "Description": "The repository contains the Abseil C++ library code. Abseil is an open-source collection of C++ code (compliant to C++11) designed to augment the C++ standard library." + "Version Number": "20250127.0", + "Upstream URL": "https://github.com/abseil/abseil-cpp", + "Description": "The repository contains the Abseil C++ library code. Abseil is an open-source collection of C++ code (compliant to C++17) designed to augment the C++ standard library." } ] \ No newline at end of file diff --git a/abseil-cpp-20210324.2-sw.patch b/abseil-cpp-20210324.2-sw.patch deleted file mode 100644 index a58aefdd187f615d53de6e2adcc5c586084165dd..0000000000000000000000000000000000000000 --- a/abseil-cpp-20210324.2-sw.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur abseil-cpp-20210324.2.org/absl/debugging/internal/examine_stack.cc abseil-cpp-20210324.2.sw/absl/debugging/internal/examine_stack.cc ---- abseil-cpp-20210324.2.org/absl/debugging/internal/examine_stack.cc 2022-03-10 01:13:54.492357080 +0000 -+++ abseil-cpp-20210324.2.sw/absl/debugging/internal/examine_stack.cc 2022-03-10 01:15:26.202357080 +0000 -@@ -46,7 +46,7 @@ - ucontext_t* context = reinterpret_cast(vuc); - #if defined(__aarch64__) - return reinterpret_cast(context->uc_mcontext.pc); --#elif defined(__alpha__) -+#elif defined(__alpha__) || defined(__sw_64__) - return reinterpret_cast(context->uc_mcontext.sc_pc); - #elif defined(__arm__) - return reinterpret_cast(context->uc_mcontext.arm_pc); diff --git a/abseil-cpp-20230802.1.tar.gz b/abseil-cpp-20230802.1.tar.gz deleted file mode 100644 index 397f6515d73a0678bbdb0db3051a451541d783ab..0000000000000000000000000000000000000000 Binary files a/abseil-cpp-20230802.1.tar.gz and /dev/null differ diff --git a/abseil-cpp-20250127.0.tar.gz b/abseil-cpp-20250127.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ed9da12690c33dbc33443500cbb2ea0577624502 Binary files /dev/null and b/abseil-cpp-20250127.0.tar.gz differ diff --git a/abseil-cpp.spec b/abseil-cpp.spec deleted file mode 100644 index c7ea286a6c93ae6191da0ee5d10d8a2731288f70..0000000000000000000000000000000000000000 --- a/abseil-cpp.spec +++ /dev/null @@ -1,212 +0,0 @@ -# Force out of source build -%undefine __cmake_in_source_build - -# Installed library version -%global lib_version 2308.0.0 - -Name: abseil-cpp -Version: 20230802.1 -Release: 5 -Summary: C++ Common Libraries - -License: Apache-2.0 -URL: https://abseil.io -Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz - -Patch1: abseil-cpp-20210324.2-sw.patch -Patch100: 0001-add-loongarch-suopport-for-abseil-cpp.patch -Patch101: 0002-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch - -BuildRequires: cmake ninja-build -BuildRequires: gcc-c++ -BuildRequires: make - -%description -Abseil is an open-source collection of C++ library code designed to augment -the C++ standard library. The Abseil library code is collected from -Google's own C++ code base, has been extensively tested and used in -production, and is the same code we depend on in our daily coding lives. - -In some cases, Abseil provides pieces missing from the C++ standard; in -others, Abseil provides alternatives to the standard for special needs we've -found through usage in the Google code base. We denote those cases clearly -within the library code we provide you. - -Abseil is not meant to be a competitor to the standard library; we've just -found that many of these utilities serve a purpose within our code base, -and we now want to provide those resources to the C++ community as a whole. - -%package devel -Summary: Development files for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} -Conflicts: grpc < 1.31.0-5 - -%description devel -Development headers for %{name} - -%prep -%autosetup -p1 - -%build -%cmake -S %{_vpath_srcdir} -B %{_vpath_builddir} -GNinja \ - -DCMAKE_BUILD_TYPE:STRING=None \ - -DCMAKE_CXX_STANDARD:STRING=17 \ - -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -%__cmake --build %{_vpath_builddir} %{?_smp_mflags} --verbose - -%install -DESTDIR="%{buildroot}" %__cmake --install "%{_vpath_builddir}" - -%files -%license LICENSE -%doc FAQ.md README.md UPGRADES.md -# All shared libraries except installed TESTONLY libraries; see the %%files -# list for the -testing subpackage for those. -%{_libdir}/libabsl_bad_any_cast_impl.so.%{lib_version} -%{_libdir}/libabsl_bad_optional_access.so.%{lib_version} -%{_libdir}/libabsl_bad_variant_access.so.%{lib_version} -%{_libdir}/libabsl_base.so.%{lib_version} -%{_libdir}/libabsl_city.so.%{lib_version} -%{_libdir}/libabsl_civil_time.so.%{lib_version} -%{_libdir}/libabsl_cord.so.%{lib_version} -%{_libdir}/libabsl_cord_internal.so.%{lib_version} -%{_libdir}/libabsl_cordz_functions.so.%{lib_version} -%{_libdir}/libabsl_cordz_handle.so.%{lib_version} -%{_libdir}/libabsl_cordz_info.so.%{lib_version} -%{_libdir}/libabsl_cordz_sample_token.so.%{lib_version} -%{_libdir}/libabsl_crc32c.so.%{lib_version} -%{_libdir}/libabsl_crc_cord_state.so.%{lib_version} -%{_libdir}/libabsl_crc_cpu_detect.so.%{lib_version} -%{_libdir}/libabsl_crc_internal.so.%{lib_version} -%{_libdir}/libabsl_debugging_internal.so.%{lib_version} -%{_libdir}/libabsl_demangle_internal.so.%{lib_version} -%{_libdir}/libabsl_die_if_null.so.%{lib_version} -%{_libdir}/libabsl_examine_stack.so.%{lib_version} -%{_libdir}/libabsl_exponential_biased.so.%{lib_version} -%{_libdir}/libabsl_failure_signal_handler.so.%{lib_version} -%{_libdir}/libabsl_flags.so.%{lib_version} -%{_libdir}/libabsl_flags_commandlineflag.so.%{lib_version} -%{_libdir}/libabsl_flags_commandlineflag_internal.so.%{lib_version} -%{_libdir}/libabsl_flags_config.so.%{lib_version} -%{_libdir}/libabsl_flags_internal.so.%{lib_version} -%{_libdir}/libabsl_flags_marshalling.so.%{lib_version} -%{_libdir}/libabsl_flags_parse.so.%{lib_version} -%{_libdir}/libabsl_flags_private_handle_accessor.so.%{lib_version} -%{_libdir}/libabsl_flags_program_name.so.%{lib_version} -%{_libdir}/libabsl_flags_reflection.so.%{lib_version} -%{_libdir}/libabsl_flags_usage.so.%{lib_version} -%{_libdir}/libabsl_flags_usage_internal.so.%{lib_version} -%{_libdir}/libabsl_graphcycles_internal.so.%{lib_version} -%{_libdir}/libabsl_hash.so.%{lib_version} -%{_libdir}/libabsl_hashtablez_sampler.so.%{lib_version} -%{_libdir}/libabsl_int128.so.%{lib_version} -%{_libdir}/libabsl_kernel_timeout_internal.so.%{lib_version} -%{_libdir}/libabsl_leak_check.so.%{lib_version} -%{_libdir}/libabsl_log_entry.so.%{lib_version} -%{_libdir}/libabsl_log_flags.so.%{lib_version} -%{_libdir}/libabsl_log_globals.so.%{lib_version} -%{_libdir}/libabsl_log_initialize.so.%{lib_version} -%{_libdir}/libabsl_log_internal_check_op.so.%{lib_version} -%{_libdir}/libabsl_log_internal_conditions.so.%{lib_version} -%{_libdir}/libabsl_log_internal_format.so.%{lib_version} -%{_libdir}/libabsl_log_internal_globals.so.%{lib_version} -%{_libdir}/libabsl_log_internal_log_sink_set.so.%{lib_version} -%{_libdir}/libabsl_log_internal_message.so.%{lib_version} -%{_libdir}/libabsl_log_internal_nullguard.so.%{lib_version} -%{_libdir}/libabsl_log_internal_proto.so.%{lib_version} -%{_libdir}/libabsl_log_severity.so.%{lib_version} -%{_libdir}/libabsl_log_sink.so.%{lib_version} -%{_libdir}/libabsl_low_level_hash.so.%{lib_version} -%{_libdir}/libabsl_malloc_internal.so.%{lib_version} -%{_libdir}/libabsl_periodic_sampler.so.%{lib_version} -%{_libdir}/libabsl_random_distributions.so.%{lib_version} -%{_libdir}/libabsl_random_internal_distribution_test_util.so.%{lib_version} -%{_libdir}/libabsl_random_internal_platform.so.%{lib_version} -%{_libdir}/libabsl_random_internal_pool_urbg.so.%{lib_version} -%{_libdir}/libabsl_random_internal_randen.so.%{lib_version} -%{_libdir}/libabsl_random_internal_randen_hwaes.so.%{lib_version} -%{_libdir}/libabsl_random_internal_randen_hwaes_impl.so.%{lib_version} -%{_libdir}/libabsl_random_internal_randen_slow.so.%{lib_version} -%{_libdir}/libabsl_random_internal_seed_material.so.%{lib_version} -%{_libdir}/libabsl_random_seed_gen_exception.so.%{lib_version} -%{_libdir}/libabsl_random_seed_sequences.so.%{lib_version} -%{_libdir}/libabsl_raw_hash_set.so.%{lib_version} -%{_libdir}/libabsl_raw_logging_internal.so.%{lib_version} -%{_libdir}/libabsl_scoped_set_env.so.%{lib_version} -%{_libdir}/libabsl_spinlock_wait.so.%{lib_version} -%{_libdir}/libabsl_stacktrace.so.%{lib_version} -%{_libdir}/libabsl_status.so.%{lib_version} -%{_libdir}/libabsl_statusor.so.%{lib_version} -%{_libdir}/libabsl_str_format_internal.so.%{lib_version} -%{_libdir}/libabsl_strerror.so.%{lib_version} -%{_libdir}/libabsl_strings.so.%{lib_version} -%{_libdir}/libabsl_strings_internal.so.%{lib_version} -%{_libdir}/libabsl_string_view.so.%{lib_version} -%{_libdir}/libabsl_symbolize.so.%{lib_version} -%{_libdir}/libabsl_synchronization.so.%{lib_version} -%{_libdir}/libabsl_throw_delegate.so.%{lib_version} -%{_libdir}/libabsl_time.so.%{lib_version} -%{_libdir}/libabsl_time_zone.so.%{lib_version} - -%files devel -%{_includedir}/absl -%{_libdir}/cmake/absl -%{_libdir}/libabsl_*.so -%{_libdir}/pkgconfig/*.pc - -%changelog -* Thu Aug 01 2024 xinghe - 20230802.1-5 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:fix license - -* Fri May 31 2024 laokz - 20230802.1-4 -- Type:bugfix -- CVE:NA -- SUG:NA -- DESC:Fix riscv64 'rdcycle' illegal instructor error - -* Wed Mar 6 2024 Wenlong Zhang - 20230802.1-3 -- Type:bugfix -- CVE:NA -- SUG:NA -- DESC:Fix build error for loongarch64 - -* Tue Jan 23 2024 xinghe - 20230802.1-2 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:optimize redundant dependence - -* Mon Dec 25 2023 xinghe - 20230802.1-1 -- Type:requirement -- ID:NA -- SUG:NA -- DESC:update to 20230802.1 - -* Thu Jul 27 2023 gaihuiying - 20230125.3-1 -- Type:requirement -- ID:NA -- SUG:NA -- DESC:update to 20230125.3 - -* Mon Nov 14 2022 Wenlong Zhang - 20220623.1-3 -- add loongarch support for abseil-cpp - -* Fri Nov 11 2022 wuzx - 20220623.1-2 -- Type:feature -- CVE:NA -- SUG:NA -- DESC:Add sw64 architecture - -* Wed Nov 02 2022 xinghe - 20220623.1-1 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC: update to 20220623.1 - -* Wed Jun 23 2021 gaihuiying - 20210324.2-1 -- package init diff --git a/adapter-ohos.patch b/adapter-ohos.patch deleted file mode 100644 index 2b4696bbb544c04bf97c527239fbb89bd69b4e20..0000000000000000000000000000000000000000 --- a/adapter-ohos.patch +++ /dev/null @@ -1,291 +0,0 @@ -diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake -index f0d984a..875517b 100644 ---- a/CMake/AbseilDll.cmake -+++ b/CMake/AbseilDll.cmake -@@ -624,24 +624,7 @@ set(ABSL_INTERNAL_TEST_DLL_TARGETS - - include(CheckCXXSourceCompiles) - --check_cxx_source_compiles( -- [==[ --#ifdef _MSC_VER --# if _MSVC_LANG < 201700L --# error "The compiler defaults or is configured for C++ < 17" --# endif --#elif __cplusplus < 201700L --# error "The compiler defaults or is configured for C++ < 17" --#endif --int main() { return 0; } --]==] -- ABSL_INTERNAL_AT_LEAST_CXX17) -- --if(ABSL_INTERNAL_AT_LEAST_CXX17) -- set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_17) --else() -- set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_14) --endif() -+set(ABSL_INTERNAL_CXX_STD_FEATURE cxx_std_14) - - function(absl_internal_dll_contains) - cmake_parse_arguments(ABSL_INTERNAL_DLL -diff --git a/absl/base/internal/low_level_alloc.cc b/absl/base/internal/low_level_alloc.cc -index 6d2cfea..9adbedb 100644 ---- a/absl/base/internal/low_level_alloc.cc -+++ b/absl/base/internal/low_level_alloc.cc -@@ -42,10 +42,6 @@ - #include - #endif - --#ifdef __linux__ --#include --#endif -- - #include - - #include -@@ -569,18 +565,6 @@ static void *DoAllocWithArena(size_t request, LowLevelAlloc::Arena *arena) { - ABSL_RAW_LOG(FATAL, "mmap error: %d", errno); - } - --#ifdef __linux__ --#if defined(PR_SET_VMA) && defined(PR_SET_VMA_ANON_NAME) -- // Attempt to name the allocated address range in /proc/$PID/smaps on -- // Linux. -- // -- // This invocation of prctl() may fail if the Linux kernel was not -- // configured with the CONFIG_ANON_VMA_NAME option. This is OK since -- // the naming of arenas is primarily a debugging aid. -- prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, new_pages, new_pages_size, -- "absl"); --#endif --#endif // __linux__ - #endif // _WIN32 - arena->mu.Lock(); - s = reinterpret_cast(new_pages); -diff --git a/absl/debugging/internal/elf_mem_image.h b/absl/debugging/internal/elf_mem_image.h -index e7fe6ab..09ada21 100644 ---- a/absl/debugging/internal/elf_mem_image.h -+++ b/absl/debugging/internal/elf_mem_image.h -@@ -34,7 +34,7 @@ - #if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \ - !defined(__native_client__) && !defined(__asmjs__) && \ - !defined(__wasm__) && !defined(__HAIKU__) && !defined(__sun) && \ -- !defined(__VXWORKS__) && !defined(__hexagon__) -+ !defined(__VXWORKS__) && !defined(__hexagon__) && !defined(__OHOS__) - #define ABSL_HAVE_ELF_MEM_IMAGE 1 - #endif - -diff --git a/absl/debugging/internal/stacktrace_config.h b/absl/debugging/internal/stacktrace_config.h -index 3929b1b..83bc8ee 100644 ---- a/absl/debugging/internal/stacktrace_config.h -+++ b/absl/debugging/internal/stacktrace_config.h -@@ -26,6 +26,10 @@ - #if defined(ABSL_STACKTRACE_INL_HEADER) - #error ABSL_STACKTRACE_INL_HEADER cannot be directly set - -+#elif defined(__OHOS__) -+#define ABSL_STACKTRACE_INL_HEADER \ -+ "absl/debugging/internal/stacktrace_unimplemented-inl.inc" -+ - #elif defined(_WIN32) - #define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_win32-inl.inc" - -diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc -index 992c89c..dcfa752 100644 ---- a/absl/debugging/failure_signal_handler.cc -+++ b/absl/debugging/failure_signal_handler.cc -@@ -36,7 +36,7 @@ - #endif - #endif - --#ifdef __linux__ -+#if defined __linux__ && !defined(__OHOS__) - #include - #endif - -@@ -177,7 +177,7 @@ static bool SetupAlternateStackOnce() { - ABSL_RAW_LOG(FATAL, "sigaltstack() failed with errno=%d", errno); - } - --#ifdef __linux__ -+#if defined __linux__ && !defined(__OHOS__) - #if defined(PR_SET_VMA) && defined(PR_SET_VMA_ANON_NAME) - // Make a best-effort attempt to name the allocated region in - // /proc/$PID/smaps. - -diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc -index c2bab71..0fdd4b9 100644 ---- a/absl/debugging/internal/examine_stack.cc -+++ b/absl/debugging/internal/examine_stack.cc -@@ -33,7 +33,9 @@ - #include - #endif - -+#if !defined(__OHOS__) - #include -+#endif - #include - - #include "absl/base/attributes.h" -@@ -155,6 +157,7 @@ SymbolizeUrlEmitter GetDebugStackTraceHook() { return debug_stack_trace_hook; } - // unknown. vuc is a ucontext_t*. We use void* to avoid the use of - // ucontext_t on non-POSIX systems. - void* GetProgramCounter(void* const vuc) { -+#if !defined(__OHOS__) - #ifdef __linux__ - if (vuc != nullptr) { - ucontext_t* context = reinterpret_cast(vuc); -@@ -233,7 +236,8 @@ void* GetProgramCounter(void* const vuc) { - return reinterpret_cast(get_user_ctx_pc(ctx)); - #endif - static_cast(vuc); -- return nullptr; -+#endif -+return nullptr; - } - - void DumpPCAndFrameSizesAndStackTrace(void* const pc, void* const stack[], - -diff --git a/absl/crc/internal/cpu_detect.cc b/absl/crc/internal/cpu_detect.cc -index 8383808..0f0fd22 100644 ---- a/absl/crc/internal/cpu_detect.cc -+++ b/absl/crc/internal/cpu_detect.cc -@@ -19,7 +19,7 @@ - - #include "absl/base/config.h" - --#if defined(__aarch64__) && defined(__linux__) -+#if defined(__aarch64__) && defined(__linux__) && !defined(__OHOS__) - #include - #include - #endif -@@ -215,7 +215,7 @@ CpuType GetCpuType() { - - bool SupportsArmCRC32PMULL() { return false; } - --#elif defined(__aarch64__) && defined(__linux__) -+#elif defined(__aarch64__) && defined(__linux__) && !defined(__OHOS__) - - #ifndef HWCAP_CPUID - #define HWCAP_CPUID (1 << 11) - -diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake -index 875517b..9e39aea 100644 ---- a/CMake/AbseilDll.cmake -+++ b/CMake/AbseilDll.cmake -@@ -788,12 +788,12 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n") - ${_dll_consume} - ) - -- if(ABSL_PROPAGATE_CXX_STD) -+ # if(ABSL_PROPAGATE_CXX_STD) - # Abseil libraries require C++14 as the current minimum standard. When - # compiled with C++17 (either because it is the compiler's default or - # explicitly requested), then Abseil requires C++17. - target_compile_features(${_dll} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE}) -- endif() -+ # endif() - - install(TARGETS ${_dll} EXPORT ${PROJECT_NAME}Targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake -index 3bd33ce..1deea98 100644 ---- a/CMake/AbseilHelpers.cmake -+++ b/CMake/AbseilHelpers.cmake -@@ -285,12 +285,12 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n") - set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER}/internal) - endif() - -- if(ABSL_PROPAGATE_CXX_STD) -+ # if(ABSL_PROPAGATE_CXX_STD) - # Abseil libraries require C++14 as the current minimum standard. When - # compiled with C++17 (either because it is the compiler's default or - # explicitly requested), then Abseil requires C++17. - target_compile_features(${_NAME} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE}) -- endif() -+ # endif() - - # When being installed, we lose the absl_ prefix. We want to put it back - # to have properly named lib files. This is a no-op when we are not being -@@ -322,12 +322,12 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n") - ) - target_compile_definitions(${_NAME} INTERFACE ${ABSL_CC_LIB_DEFINES}) - -- if(ABSL_PROPAGATE_CXX_STD) -+ # if(ABSL_PROPAGATE_CXX_STD) - # Abseil libraries require C++14 as the current minimum standard. - # Top-level application CMake projects should ensure a consistent C++ - # standard for all compiled sources by setting CMAKE_CXX_STANDARD. - target_compile_features(${_NAME} INTERFACE ${ABSL_INTERNAL_CXX_STD_FEATURE}) -- endif() -+ # endif() - endif() - - if(ABSL_ENABLE_INSTALL) -@@ -434,12 +434,12 @@ function(absl_cc_test) - # Add all Abseil targets to a folder in the IDE for organization. - set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER}/test) - -- if(ABSL_PROPAGATE_CXX_STD) -+ # if(ABSL_PROPAGATE_CXX_STD) - # Abseil libraries require C++14 as the current minimum standard. - # Top-level application CMake projects should ensure a consistent C++ - # standard for all compiled sources by setting CMAKE_CXX_STANDARD. - target_compile_features(${_NAME} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE}) -- endif() -+ # endif() - - add_test(NAME ${_NAME} COMMAND ${_NAME}) - endfunction() - -diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc -index 68c33d4..24d9727 100644 ---- a/absl/debugging/internal/examine_stack.cc -+++ b/absl/debugging/internal/examine_stack.cc -@@ -29,9 +29,11 @@ - #endif - #endif - --#if defined(__linux__) || defined(__APPLE__) -+#if !defined(__OHOS__) -+#if defined(__linux__) || defined(__APPLE__) - #include - #endif -+#endif - - #if !defined(__OHOS__) - #include - -diff --git a/absl/log/internal/log_message.cc b/absl/log/internal/log_message.cc -index 10ac245..bddc95d 100644 ---- a/absl/log/internal/log_message.cc -+++ b/absl/log/internal/log_message.cc -@@ -315,11 +315,6 @@ LogMessage& LogMessage::ToSinkOnly(absl::LogSink* sink) { - return *this; - } - --#ifdef __ELF__ --extern "C" void __gcov_dump() ABSL_ATTRIBUTE_WEAK; --extern "C" void __gcov_flush() ABSL_ATTRIBUTE_WEAK; --#endif -- - void LogMessage::FailWithoutStackTrace() { - // Now suppress repeated trace logging: - log_internal::SetSuppressSigabortTrace(true); -@@ -327,16 +322,6 @@ void LogMessage::FailWithoutStackTrace() { - // When debugging on windows, avoid the obnoxious dialog. - __debugbreak(); - #endif -- --#ifdef __ELF__ -- // For b/8737634, flush coverage if we are in coverage mode. -- if (&__gcov_dump != nullptr) { -- __gcov_dump(); -- } else if (&__gcov_flush != nullptr) { -- __gcov_flush(); -- } --#endif -- - abort(); - } diff --git a/backport-CVE-2025-0838.patch b/backport-CVE-2025-0838.patch deleted file mode 100644 index 4291e6126a9d294e0b3d36b125137d6f830f7675..0000000000000000000000000000000000000000 --- a/backport-CVE-2025-0838.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 3c4b18dc14949d1c6dac8bae2e459c71b21e3416 Mon Sep 17 00:00:00 2001 -From: Derek Mauro -Date: Wed, 22 Jan 2025 15:58:56 -0500 -Subject: [PATCH] Fix potential integer overflow in hash container - create/resize - -The sized constructors, reserve(), and rehash() methods of -absl::{flat,node}_hash_{set,map} did not impose an upper bound on -their size argument. As a result, it was possible for a caller to pass -a very large size that would cause an integer overflow when computing -the size of the container's backing store. Subsequent accesses to the -container might then access out-of-bounds memory. - -The fix is in two parts: - -1) Update max_size() to return the maximum number of items that can be -stored in the container - -2) Validate the size arguments to the constructors, reserve(), and -rehash() methods, and abort the program when the argument is invalid - -We've looked at uses of these containers in Google codebases like -Chrome, and determined this vulnerability is likely to be difficult to -exploit. This is primarily because container sizes are rarely -attacker-controlled. - -The bug was discovered by Dmitry Vyukov . - -Conflict: remove absl/base/config.h -Reference: https://github.com/abseil/abseil-cpp/commit/3c4b18dc14949d1c6dac8bae2e459c71b21e3416 ---- - absl/base/config.h | 2 +- - absl/container/internal/raw_hash_set.h | 16 +++++++++++++++- - absl/container/internal/raw_hash_set_test.cc | 8 ++++++++ - 3 files changed, 24 insertions(+), 2 deletions(-) - -diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h -index 5f89d8efee6..92b93453314 100644 ---- a/absl/container/internal/raw_hash_set.h -+++ b/absl/container/internal/raw_hash_set.h -@@ -1076,6 +1076,12 @@ inline size_t NormalizeCapacity(size_t n) { - return n ? ~size_t{} >> countl_zero(n) : 1; - } - -+template -+size_t MaxValidCapacity() { -+ return NormalizeCapacity((std::numeric_limits::max)() / 4 / -+ kSlotSize); -+} -+ - // General notes on capacity/growth methods below: - // - We use 7/8th as maximum load factor. For 16-wide groups, that gives an - // average of two empty slots per group. -@@ -1717,6 +1723,8 @@ class raw_hash_set { - const allocator_type& alloc = allocator_type()) - : settings_(CommonFields{}, hash, eq, alloc) { - if (bucket_count) { -+ ABSL_RAW_CHECK(bucket_count <= MaxValidCapacity(), -+ "Hash table size overflow"); - common().set_capacity(NormalizeCapacity(bucket_count)); - initialize_slots(); - } -@@ -1916,7 +1924,10 @@ class raw_hash_set { - bool empty() const { return !size(); } - size_t size() const { return common().size(); } - size_t capacity() const { return common().capacity(); } -- size_t max_size() const { return (std::numeric_limits::max)(); } -+ size_t max_size() const { -+ return CapacityToGrowth(MaxValidCapacity()); -+ } -+ - - ABSL_ATTRIBUTE_REINITIALIZES void clear() { - // Iterating over this container is O(bucket_count()). When bucket_count() -@@ -2266,6 +2277,8 @@ class raw_hash_set { - auto m = NormalizeCapacity(n | GrowthToLowerboundCapacity(size())); - // n == 0 unconditionally rehashes as per the standard. - if (n == 0 || m > capacity()) { -+ ABSL_RAW_CHECK(m <= MaxValidCapacity(), -+ "Hash table size overflow"); - resize(m); - - // This is after resize, to ensure that we have completed the allocation -@@ -2276,6 +2289,7 @@ class raw_hash_set { - - void reserve(size_t n) { - if (n > size() + growth_left()) { -+ ABSL_RAW_CHECK(n <= max_size(), "Hash table size overflow"); - size_t m = GrowthToLowerboundCapacity(n); - resize(NormalizeCapacity(m)); - -diff --git a/absl/container/internal/raw_hash_set_test.cc b/absl/container/internal/raw_hash_set_test.cc -index 242a97cbe3f..d5d5f3934da 100644 ---- a/absl/container/internal/raw_hash_set_test.cc -+++ b/absl/container/internal/raw_hash_set_test.cc -@@ -2510,6 +2510,14 @@ TEST(Iterator, InvalidComparisonDifferentTables) { - "Invalid iterator comparison.*non-end"); - } - -+TEST(Table, MaxSizeOverflow) { -+ size_t overflow = (std::numeric_limits::max)(); -+ EXPECT_DEATH_IF_SUPPORTED(IntTable t(overflow), "Hash table size overflow"); -+ IntTable t; -+ EXPECT_DEATH_IF_SUPPORTED(t.reserve(overflow), "Hash table size overflow"); -+ EXPECT_DEATH_IF_SUPPORTED(t.rehash(overflow), "Hash table size overflow"); -+} -+ - } // namespace - } // namespace container_internal - ABSL_NAMESPACE_END diff --git a/configure_copts.gni b/configure_copts.gni index 02fc10ab803b992b943f1019ff303a6b3efa5308..a4e50a57957c7307f73671e8350c3ec431c8502f 100644 --- a/configure_copts.gni +++ b/configure_copts.gni @@ -72,4 +72,5 @@ ABSL_DEFAULT_COPTS = [ "-Wno-c++17-attribute-extensions", "-Wno-cast-function-type", "-Wno-undef", + "-Wno-used-but-marked-unused", ] diff --git a/fix-mingw-complier-error.patch b/fix-mingw-complier-error.patch deleted file mode 100644 index a945afa151746384580f30e3adce49ff8e3f2301..0000000000000000000000000000000000000000 --- a/fix-mingw-complier-error.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -uprN a/absl/debugging/symbolize.cc b/absl/debugging/symbolize.cc ---- a/absl/debugging/symbolize.cc 2023-09-18 22:40:01.000000000 +0800 -+++ b/absl/debugging/symbolize.cc 2025-02-17 19:17:40.838757700 +0800 -@@ -19,7 +19,7 @@ - #if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)) || \ - WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - // UWP doesn't have access to win32 APIs. --#define ABSL_INTERNAL_HAVE_SYMBOLIZE_WIN32 -+//#define ABSL_INTERNAL_HAVE_SYMBOLIZE_WIN32 - #endif - #endif - -diff -uprN a/absl/synchronization/internal/pthread_waiter.h b/absl/synchronization/internal/pthread_waiter.h ---- a/absl/synchronization/internal/pthread_waiter.h 2023-09-18 22:40:01.000000000 +0800 -+++ b/absl/synchronization/internal/pthread_waiter.h 2025-02-17 16:46:03.212234400 +0800 -@@ -16,7 +16,7 @@ - #ifndef ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_ - #define ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_ - --#ifndef _WIN32 -+#if !defined(_WIN32) && !defined(__MINGW32__) - #include - - #include "absl/base/config.h" -@@ -55,6 +55,6 @@ class PthreadWaiter : public WaiterCrtp< - ABSL_NAMESPACE_END - } // namespace absl - --#endif // ndef _WIN32 -+#endif // !defined(_WIN32) && !defined(__MINGW32__) - - #endif // ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_ -diff -uprN a/absl/synchronization/internal/win32_waiter.h b/absl/synchronization/internal/win32_waiter.h ---- a/absl/synchronization/internal/win32_waiter.h 2023-09-18 22:40:01.000000000 +0800 -+++ b/absl/synchronization/internal/win32_waiter.h 2025-02-17 16:40:32.342234400 +0800 -@@ -20,7 +20,8 @@ - #include - #endif - --#if defined(_WIN32) && _WIN32_WINNT >= _WIN32_WINNT_VISTA -+#if defined(_WIN32) && !defined(__MINGW32__) && \ -+ _WIN32_WINNT >= _WIN32_WINNT_VISTA - - #include "absl/base/config.h" - #include "absl/synchronization/internal/kernel_timeout.h" diff --git a/install.sh b/install.sh index fe4ee30dd96e59f05c6fca8df6b5665864cfe32f..cff4b9b6955d2f9c7858aa21add32a97eb4c07da 100755 --- a/install.sh +++ b/install.sh @@ -13,14 +13,9 @@ flock -x 100 if [ -d "abseil-cpp" ];then rm -rf abseil-cpp fi -tar zxvf abseil-cpp-20230802.1.tar.gz -mv abseil-cpp-20230802.1 abseil-cpp +tar zxvf abseil-cpp-20250127.0.tar.gz +mv abseil-cpp-20250127.0 abseil-cpp cd $1/abseil-cpp -patch -p1 < $1/abseil-cpp-20210324.2-sw.patch -patch -p1 < $1/0001-add-loongarch-suopport-for-abseil-cpp.patch -patch -p1 < $1/0002-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch -patch -p1 < $1/fix-mingw-complier-error.patch -patch -p1 < $1/backport-CVE-2025-0838.patch flock -u 100 } 100<>$1/lock_file.lock exit 0 \ No newline at end of file diff --git a/install_no_lock.sh b/install_no_lock.sh index 0be3018d884b97228f4abc8763ecfed6c804901b..c64695523e12465cd0840a09bf93f66c2461a39e 100755 --- a/install_no_lock.sh +++ b/install_no_lock.sh @@ -11,13 +11,8 @@ cd $1 if [ -d "abseil-cpp" ];then rm -rf abseil-cpp fi -tar zxvf abseil-cpp-20230802.1.tar.gz -mv abseil-cpp-20230802.1 abseil-cpp +tar zxvf abseil-cpp-20250127.0.tar.gz +mv abseil-cpp-20250127.0 abseil-cpp cd $1/abseil-cpp -patch -p1 < $1/abseil-cpp-20210324.2-sw.patch -patch -p1 < $1/0001-add-loongarch-suopport-for-abseil-cpp.patch -patch -p1 < $1/0002-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch -patch -p1 < $1/fix-mingw-complier-error.patch -patch -p1 < $1/adapter-ohos.patch -patch -p1 < $1/backport-CVE-2025-0838.patch + exit 0