blob: 1c10e5452c78bf7e6479beec7423e635956a5c37 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 6bec1e7e7fe0ae5bbeb66fc9f32b0b1dd156957d Mon Sep 17 00:00:00 2001
2From: Sergey Poznyakoff <gray@gnu.org>
3Date: Tue, 18 Jun 2024 14:31:17 +0200
4Subject: [PATCH] Fix savannah bug #64441
5
6* src/Makefile.am (tar_LDADD): Add libiconv libraries.
7
8Adapted upstream commit 8632df398b2f548465ebe68b8f494c0d6f8d913d to patch
9the pregenerated Makefile.in instead of Makefile.am to avoid invoking
10automake which requires m4.
11
12This is required for macOS, as otherwise it will fail with:
13Undefined symbols for architecture arm64:
14 "_iconv", referenced from:
15 _utf8_convert in utf8.o
16 "_iconv_open", referenced from:
17 _utf8_convert in utf8.o
18ld: symbol(s) not found for architecture arm64
19clang: error: linker command failed with exit code 1 (use -v to see invocation)
20---
21 src/Makefile.in | 3 ++-
22 1 file changed, 2 insertions(+), 1 deletion(-)
23
24--- a/src/Makefile.in
25+++ b/src/Makefile.in
26@@ -1793,7 +1793,8 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLA
27 tar_LDADD = $(LIBS) ../lib/libtar.a ../gnu/libgnu.a\
28 $(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\
29 $(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\
30- $(LIB_SELINUX) $(LIB_SETLOCALE_NULL)
31+ $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \
32+ $(LIBINTL) $(LIBICONV)
33
34 all: all-am
35