From e789065c985bb319b1dff92ec34d763963be30bb Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Mon, 18 Mar 2024 10:08:50 +0100 Subject: [PATCH] Musl: add a workaround for undefined `enable_safe_libstdcxx` https://chromium.googlesource.com/chromium/src/build/+/b484740dba8205ad6cec10feb2d2e17a466ec3bf --- patches/musl/build.patch | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/patches/musl/build.patch b/patches/musl/build.patch index fb6d227f..e8386d2e 100644 --- a/patches/musl/build.patch +++ b/patches/musl/build.patch @@ -1,5 +1,5 @@ diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn -index 894e82b45..2efa618ae 100644 +index 1ed842b77..b41d3e293 100644 --- a/config/BUILDCONFIG.gn +++ b/config/BUILDCONFIG.gn @@ -135,6 +135,9 @@ declare_args() { @@ -23,8 +23,21 @@ index 894e82b45..2efa618ae 100644 _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" } else { _default_toolchain = "//build/toolchain/linux:$target_cpu" +diff --git a/config/c++/c++.gni b/config/c++/c++.gni +index bd8e7118e..87d38bb12 100644 +--- a/config/c++/c++.gni ++++ b/config/c++/c++.gni +@@ -61,7 +61,7 @@ use_safe_libcxx = (use_custom_libcxx && enable_safe_libcxx) || is_nacl_saigo + + # libstdc++ has its own hardening assertions that we want to enable by default + # in Chromium builds. +-use_safe_libstdcxx = is_linux && !use_custom_libcxx && enable_safe_libstdcxx ++use_safe_libstdcxx = is_linux && !use_custom_libcxx + + # libc++abi needs to be exported from executables to be picked up by shared + # libraries on certain instrumented builds. diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn -index 3c7b4d82d..bc5a453e8 100644 +index 24e059596..ba91b474c 100644 --- a/config/compiler/BUILD.gn +++ b/config/compiler/BUILD.gn @@ -379,7 +379,7 @@ config("compiler") {