summaryrefslogtreecommitdiffstats
path: root/package/parted/0004-libparted-labels-link-with-libiconv-if-needed.patch
blob: a4a1b003315e04fd1ad8b7137769f44ea09ef5e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From dd17f55b2ac189ccd3b8025e4f6509537d00f9d3 Mon Sep 17 00:00:00 2001
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Date: Sun, 8 Oct 2017 00:53:31 +0200
Subject: [PATCH] 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.

Upstream status: sent to mailing list
http://lists.alioth.debian.org/pipermail/parted-devel/2017-November/005131.html

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 configure.ac                 | 2 ++
 libparted/labels/Makefile.am | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 50ad478..62f1b4d 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 c996f81..b204379 100644
--- a/libparted/labels/Makefile.am
+++ b/libparted/labels/Makefile.am
@@ -35,7 +35,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.14.2

OpenPOWER on IntegriCloud