Skip to content

Commit 1c6c0c3

Browse files
author
Vinh Tran
committed
Add comment
1 parent ee9c67c commit 1c6c0c3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cc-toolchain/basic/gcc/toolchain/cc_toolchain.BUILD

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ filegroup(
9898
# libc.so.6 is not found.
9999
# See https://stackoverflow.com/questions/52386530/linker-fails-in-sandbox-when-running-through-bazel-but-works-when-sandboxed-comm
100100
# Symlinks in Bazel sandbox messes up the sysroot so libc.so.6 and libc_nonshared.a can't be found
101-
# Running the link action outsize of Bazel works.
101+
# even though running the link action outsize of Bazel works.
102+
# If we can't fix bazel symlinks to work with gcc toolchain's sysroot, we have to tweak
103+
# libc.so from
104+
# GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
105+
# to
106+
# GROUP ( /libc.so.6 /libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) )
107+
# so that they're discoverable from system's /lib/x86_64-linux-gnu
102108
"x86_64-buildroot-linux-gnu/sysroot/lib64/libc.so.6",
103109
"x86_64-buildroot-linux-gnu/sysroot/usr/lib64/**",
104110
"lib64/gcc/x86_64-buildroot-linux-gnu/12.3.0/**",

0 commit comments

Comments
 (0)