1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# 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/.../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",
]
[target.x86_64-unknown-linux-gnu]
rustflags = [
"-C", "link-arg=-Wl,--defsym,pidfd_spawnp=0",
"-C", "link-arg=-Wl,--defsym,pidfd_getpid=0",
]
|