b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From 6bec1e7e7fe0ae5bbeb66fc9f32b0b1dd156957d Mon Sep 17 00:00:00 2001 |
| 2 | From: Sergey Poznyakoff <gray@gnu.org> |
| 3 | Date: Tue, 18 Jun 2024 14:31:17 +0200 |
| 4 | Subject: [PATCH] Fix savannah bug #64441 |
| 5 | |
| 6 | * src/Makefile.am (tar_LDADD): Add libiconv libraries. |
| 7 | |
| 8 | Adapted upstream commit 8632df398b2f548465ebe68b8f494c0d6f8d913d to patch |
| 9 | the pregenerated Makefile.in instead of Makefile.am to avoid invoking |
| 10 | automake which requires m4. |
| 11 | |
| 12 | This is required for macOS, as otherwise it will fail with: |
| 13 | Undefined 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 |
| 18 | ld: symbol(s) not found for architecture arm64 |
| 19 | clang: 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 | |