From 5166c63e9da7ebf371b7faf0afc672ce494408f7 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Thu, 10 Feb 2022 12:00:03 -0500 Subject: chromium 100 maybe? --- .../chromium-100-ByteSwapUintPtrT-constexpr.patch | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 www-client/chromium/files/chromium-100-ByteSwapUintPtrT-constexpr.patch (limited to 'www-client/chromium/files/chromium-100-ByteSwapUintPtrT-constexpr.patch') diff --git a/www-client/chromium/files/chromium-100-ByteSwapUintPtrT-constexpr.patch b/www-client/chromium/files/chromium-100-ByteSwapUintPtrT-constexpr.patch new file mode 100644 index 0000000..dc85dc2 --- /dev/null +++ b/www-client/chromium/files/chromium-100-ByteSwapUintPtrT-constexpr.patch @@ -0,0 +1,56 @@ +From 1ea2079fec7098cd0fdfabce259d65a09197532d Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Thu, 27 Jan 2022 14:36:21 +0000 +Subject: [PATCH] GCC: add constexpr to base::ByteSwapUintPtrT and + base::ByteSwap + +base::internal::EncodedPartitionFreelistEntryPtr::Transform() is +constexpr. This requires base::ByteSwapUintPtrT() and +base::ByteSwap() to be constexpr too. +--- + base/sys_byteorder.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/base/sys_byteorder.h b/base/sys_byteorder.h +index 4de2b5f..d86cc36 100644 +--- a/base/sys_byteorder.h ++++ b/base/sys_byteorder.h +@@ -22,7 +22,7 @@ + namespace base { + + // Returns a value with all bytes in |x| swapped, i.e. reverses the endianness. +-inline uint16_t ByteSwap(uint16_t x) { ++constexpr uint16_t ByteSwap(uint16_t x) { + #if defined(COMPILER_MSVC) && !defined(__clang__) + return _byteswap_ushort(x); + #else +@@ -30,7 +30,7 @@ inline uint16_t ByteSwap(uint16_t x) { + #endif + } + +-inline uint32_t ByteSwap(uint32_t x) { ++constexpr uint32_t ByteSwap(uint32_t x) { + #if defined(COMPILER_MSVC) && !defined(__clang__) + return _byteswap_ulong(x); + #else +@@ -38,7 +38,7 @@ inline uint32_t ByteSwap(uint32_t x) { + #endif + } + +-inline uint64_t ByteSwap(uint64_t x) { ++constexpr uint64_t ByteSwap(uint64_t x) { + // Per build/build_config.h, clang masquerades as MSVC on Windows. If we are + // actually using clang, we can rely on the builtin. + // +@@ -53,7 +53,7 @@ inline uint64_t ByteSwap(uint64_t x) { + #endif + } + +-inline uintptr_t ByteSwapUintPtrT(uintptr_t x) { ++constexpr uintptr_t ByteSwapUintPtrT(uintptr_t x) { + // We do it this way because some build configurations are ILP32 even when + // defined(ARCH_CPU_64_BITS). Unfortunately, we can't use sizeof in #ifs. But, + // because these conditionals are constexprs, the irrelevant branches will +-- +2.34.1 + -- cgit v1.2.3