parted/SOURCES/0080-libparted-labels-link-with-libiconv-if-needed.patch

52 lines
1.6 KiB
Diff
Raw Normal View History

2019-05-07 13:06:40 +00:00
From 8bec8bcc639cfc7ed0ca7cd3a5321513aa4348fd Mon Sep 17 00:00:00 2001
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Date: Sun, 5 Nov 2017 23:33:37 +0100
Subject: [PATCH 80/81] libparted/labels: link with libiconv if needed
gpt.c uses iconv so it should link with it. Otherwise, on platforms
where libiconv is a separate library, we get a link failure of parted:
CCLD parted
../libparted/.libs/libparted.so: undefined reference to `libiconv'
../libparted/.libs/libparted.so: undefined reference to `libiconv_open'
../libparted/.libs/libparted.so: undefined reference to `libiconv_close'
Since iconv functionality is needed unconditionally (not only when
gettext is enabled), AM_ICONV needs to be added to configure.ac.
(cherry picked from commit 571293e3f9ee45f37867578899c6a8a9cd35afd4)
---
configure.ac | 2 ++
libparted/labels/Makefile.am | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 3d57157..5251dfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -288,6 +288,8 @@ fi
AC_PROG_LIBTOOL
LT_INIT
+AM_ICONV
+
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external])
if test "$USE_INCLUDED_LIBINTL" = "yes"; then
diff --git a/libparted/labels/Makefile.am b/libparted/labels/Makefile.am
index 3327c8c..db612d1 100644
--- a/libparted/labels/Makefile.am
+++ b/libparted/labels/Makefile.am
@@ -36,7 +36,7 @@ liblabels_la_SOURCES = \
rdb.c \
sun.c
-liblabels_la_LIBADD = $(OS_LIBS) $(INTLLIBS)
+liblabels_la_LIBADD = $(OS_LIBS) $(INTLLIBS) $(LIBICONV)
AM_CPPFLAGS = $(partedincludedir) $(INTLINCS)
--
2.13.6