]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Linux: link against libdl
authorbrian m. carlson <sandals@crustytoothpaste.net>
Thu, 9 Apr 2026 22:44:33 +0000 (22:44 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Apr 2026 00:25:36 +0000 (17:25 -0700)
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>
config.mak.uname

index ccb3f718812740d2feda1d212e1e95ea7222c4f3..7aab56c590069e31d1a2f75e53bccaa985f0c282 100644 (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