From 1c6c0c31a1169c58327448b961d699aea5ec8a58 Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Mon, 5 Feb 2024 23:52:59 -0500 Subject: [PATCH] Add comment --- cc-toolchain/basic/gcc/toolchain/cc_toolchain.BUILD | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cc-toolchain/basic/gcc/toolchain/cc_toolchain.BUILD b/cc-toolchain/basic/gcc/toolchain/cc_toolchain.BUILD index 584b8384a..724ac3dc9 100644 --- a/cc-toolchain/basic/gcc/toolchain/cc_toolchain.BUILD +++ b/cc-toolchain/basic/gcc/toolchain/cc_toolchain.BUILD @@ -98,7 +98,13 @@ filegroup( # libc.so.6 is not found. # See https://stackoverflow.com/questions/52386530/linker-fails-in-sandbox-when-running-through-bazel-but-works-when-sandboxed-comm # Symlinks in Bazel sandbox messes up the sysroot so libc.so.6 and libc_nonshared.a can't be found - # Running the link action outsize of Bazel works. + # even though running the link action outsize of Bazel works. + # If we can't fix bazel symlinks to work with gcc toolchain's sysroot, we have to tweak + # libc.so from + # GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + # to + # GROUP ( /libc.so.6 /libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + # so that they're discoverable from system's /lib/x86_64-linux-gnu "x86_64-buildroot-linux-gnu/sysroot/lib64/libc.so.6", "x86_64-buildroot-linux-gnu/sysroot/usr/lib64/**", "lib64/gcc/x86_64-buildroot-linux-gnu/12.3.0/**",