Linux: link against libdl

Older versions of Rust on Linux, such as that used in Debian 11 in our
CI, require linking against libdl.  Were we linking with Cargo, this
would be included automatically, but since we're not, explicitly set it
in the system-specific config.

This library is part of libc, so linking against it if it happens to be
unnecessary will add no dependencies to the resulting binary.  In
addition, it is provided by both glibc and musl, so it should be
portable to almost all Linux systems.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
main
brian m. carlson 2026-04-09 22:44:33 +00:00 committed by Junio C Hamano
parent 40c789dfc2
commit 30e6f7adf6
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ ifeq ($(uname_S),Linux)
PROCFS_EXECUTABLE_PATH = /proc/self/exe
HAVE_PLATFORM_PROCINFO = YesPlease
COMPAT_OBJS += compat/linux/procinfo.o
EXTLIBS += -ldl
# centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7.
ifneq ($(findstring .el7.,$(uname_R)),)
BASIC_CFLAGS += -std=c99