From 5691ff399e824c79090f2c7f3d08218fde4f9560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Tue, 21 May 2024 13:08:45 +0100 Subject: [PATCH] build: fix build failure in --enable-single-binary mode * src/local.mk: Avoid overriding automake generated DEPENDENCIES, so that it applies its adjustments to LDADD to avoid propagating flags (like -Wl,-rpath) into make targets. This was seen on FreeBSD where LIBINTL is set to: /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib Instead let automake generate a sanitized src_coreutils_DEPENDENCIES (based on LDADD), which we then augment with the EXTRA_... variable. --- src/local.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/local.mk b/src/local.mk index 3356f8a2a..8133925ac 100644 --- a/src/local.mk +++ b/src/local.mk @@ -482,13 +482,13 @@ if SINGLE_BINARY src_coreutils_CFLAGS = -DSINGLE_BINARY $(AM_CFLAGS) #src_coreutils_LDFLAGS = $(AM_LDFLAGS) src_coreutils_LDADD = $(single_binary_deps) $(LDADD) $(single_binary_libs) -src_coreutils_DEPENDENCIES = $(LDADD) $(single_binary_deps) +EXTRA_src_coreutils_DEPENDENCIES = $(single_binary_deps) include $(top_srcdir)/src/single-binary.mk # Creates symlinks or shebangs to the installed programs when building # coreutils single binary. -EXTRA_src_coreutils_DEPENDENCIES = src/coreutils_$(single_binary_install_type) +EXTRA_src_coreutils_DEPENDENCIES += src/coreutils_$(single_binary_install_type) endif SINGLE_BINARY CLEANFILES += src/coreutils_symlinks -- 2.44.0