aboutsummaryrefslogtreecommitdiffstats
path: root/.cargo/config.toml
blob: 17369d2d48a1a3d359c98af4c0cde94c73a19208 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Rust's std references glibc 2.39's pidfd_spawnp/pidfd_getpid as *weak* symbols.
# On an older glibc the dynamic linker resolves them to NULL (std falls back to
# posix_spawn), but it also prints a warning on every start:
#
#   /lib/i386-linux-gnu/libc.so.6: weak version `GLIBC_2.39' not found
#
# Defining them locally as absolute 0 removes the version need while keeping the
# same runtime behaviour: the check sees NULL and takes the fallback path.
[target.i686-unknown-linux-gnu]
rustflags = [
    "-C", "link-arg=-Wl,--defsym,pidfd_spawnp=0",
    "-C", "link-arg=-Wl,--defsym,pidfd_getpid=0",
]