From patchwork Fri Oct 24 12:34:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicente Olivert Riera X-Patchwork-Id: 402844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 508D1140082 for ; Fri, 24 Oct 2014 23:34:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8220433AAA; Fri, 24 Oct 2014 12:34:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B0Pz5BdQAQYp; Fri, 24 Oct 2014 12:34:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 34D8633932; Fri, 24 Oct 2014 12:34:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 320EA1BFA94 for ; Fri, 24 Oct 2014 12:34:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2F54D963BC for ; Fri, 24 Oct 2014 12:34:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z+FYRWpXh08F for ; Fri, 24 Oct 2014 12:34:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by hemlock.osuosl.org (Postfix) with ESMTP id 234B69635F for ; Fri, 24 Oct 2014 12:34:41 +0000 (UTC) Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id AE6FC44CD1818 for ; Fri, 24 Oct 2014 13:34:35 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 24 Oct 2014 13:34:38 +0100 Received: from localhost.localdomain (192.168.154.104) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 24 Oct 2014 13:34:37 +0100 From: Vicente Olivert Riera To: Date: Fri, 24 Oct 2014 13:34:30 +0100 Message-ID: <1414154070-25745-2-git-send-email-Vincent.Riera@imgtec.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1414154070-25745-1-git-send-email-Vincent.Riera@imgtec.com> References: <1414154070-25745-1-git-send-email-Vincent.Riera@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.154.104] Subject: [Buildroot] [PATCH 2/2] uclibc: Do not include __iconv_codesets into iconv utility X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Backporting an upstream patch to fix a problem in the install step: make[1]: Entering directory `/br/output/build/uclibc-0.9.31.1' make[2]: Nothing to be done for `locale_headers'. CC utils/getconf STRIP -x -R .note -R .comment ../utils/getconf CC utils/iconv ../lib/libc.a(iconv.os):(.rodata+0x18): multiple definition of `__iconv_codesets' /tmp/ccVmV8Lq.o:(.rodata+0x18): first defined here collect2: error: ld returned 1 exit status Upstream commit: http://git.uclibc.org/uClibc/commit/?id=d46dc8bc88e38251bfa3712efe7abf62933f5419 Signed-off-by: Vicente Olivert Riera --- ...clude-__iconv_codesets-into-iconv-utility.patch | 79 ++++++++++++++++++++ ...clude-__iconv_codesets-into-iconv-utility.patch | 79 ++++++++++++++++++++ 2 files changed, 158 insertions(+), 0 deletions(-) create mode 100644 package/uclibc/0.9.31.1/0014-Do-not-include-__iconv_codesets-into-iconv-utility.patch create mode 100644 package/uclibc/0.9.33.2/0065-Do-not-include-__iconv_codesets-into-iconv-utility.patch diff --git a/package/uclibc/0.9.31.1/0014-Do-not-include-__iconv_codesets-into-iconv-utility.patch b/package/uclibc/0.9.31.1/0014-Do-not-include-__iconv_codesets-into-iconv-utility.patch new file mode 100644 index 0000000..4b6a701 --- /dev/null +++ b/package/uclibc/0.9.31.1/0014-Do-not-include-__iconv_codesets-into-iconv-utility.patch @@ -0,0 +1,79 @@ +uclibc: Do not include __iconv_codesets into iconv utility + +Backporting an upstream patch to fix a problem in the install step: + +make[1]: Entering directory `/br/output/build/uclibc-0.9.31.1' +make[2]: Nothing to be done for `locale_headers'. + CC utils/getconf + STRIP -x -R .note -R .comment ../utils/getconf + CC utils/iconv +../lib/libc.a(iconv.os):(.rodata+0x18): multiple definition of +`__iconv_codesets' +/tmp/ccVmV8Lq.o:(.rodata+0x18): first defined here +collect2: error: ld returned 1 exit status + +Upstream commit: + http://git.uclibc.org/uClibc/commit/?id=d46dc8bc88e38251bfa3712efe7abf62933f5419 + +Signed-off-by: Vicente Olivert Riera + +From d46dc8bc88e38251bfa3712efe7abf62933f5419 Mon Sep 17 00:00:00 2001 +From: Peter S. Mazinger +Date: Thu, 24 Mar 2011 00:15:25 +0000 +Subject: iconv: Do not include __iconv_codesets into iconv utility + +Host iconv needs only L_iconv_main defined and __iconv_codesets +has to included, as host system does not provide it. +Keep __iconv_codesets out of iconv linked against uClibc. + +Signed-off-by: Peter S. Mazinger +Signed-off-by: Bernhard Reutner-Fischer +--- +diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c +index 412c557..0704096 100644 +--- a/libc/misc/wchar/wchar.c ++++ b/libc/misc/wchar/wchar.c +@@ -1196,6 +1196,9 @@ libc_hidden_proto(__iconv_codesets) + #endif + + #if defined L_iconv || defined L_iconv_main ++# ifdef L_iconv_main ++static ++# endif + const unsigned char __iconv_codesets[] = + "\x0a\xe0""WCHAR_T\x00" /* superset of UCS-4 but platform-endian */ + #if __BYTE_ORDER == __BIG_ENDIAN +diff --git a/utils/Makefile.in b/utils/Makefile.in +index bb85be3..1714d28 100644 +--- a/utils/Makefile.in ++++ b/utils/Makefile.in +@@ -36,8 +36,7 @@ CFLAGS-ldd := $(CFLAGS-utils-shared) -DBUILDING_LINKAGE + # Need CFLAGS-utils explicitly, because the source file is not located in utils + CFLAGS-iconv := $(CFLAGS-utils) \ + $(CFLAGS-utils-shared) \ +- -I$(top_srcdir)libc/misc/wchar \ +- -DL_iconv_main \ ++ -I$(top_srcdir)libc/misc/wchar + + CFLAGS-locale := $(CFLAGS-utils) + CFLAGS-getconf :=$(CFLAGS-utils) \ +diff --git a/utils/iconv.c b/utils/iconv.c +index 04e2c32..a0260df 100644 +--- a/utils/iconv.c ++++ b/utils/iconv.c +@@ -108,7 +108,12 @@ + #include + #include "wchar.c" /* for _UC_iconv_t and __iconv_codesets */ + +-extern const unsigned char __iconv_codesets[]; ++#ifdef L_iconv_main ++static ++#else ++extern ++#endif ++const unsigned char __iconv_codesets[]; + + #define IBUF BUFSIZ + #define OBUF BUFSIZ +-- +cgit v0.9.1 diff --git a/package/uclibc/0.9.33.2/0065-Do-not-include-__iconv_codesets-into-iconv-utility.patch b/package/uclibc/0.9.33.2/0065-Do-not-include-__iconv_codesets-into-iconv-utility.patch new file mode 100644 index 0000000..a6b5b5e --- /dev/null +++ b/package/uclibc/0.9.33.2/0065-Do-not-include-__iconv_codesets-into-iconv-utility.patch @@ -0,0 +1,79 @@ +uclibc: Do not include __iconv_codesets into iconv utility + +Backporting an upstream patch to fix a problem in the install step: + +make[1]: Entering directory `/br/output/build/uclibc-0.9.33.2' +make[2]: Nothing to be done for `locale_headers'. + CC utils/getconf + STRIP -x -R .note -R .comment ../utils/getconf + CC utils/iconv +../lib/libc.a(iconv.os):(.rodata+0x18): multiple definition of +`__iconv_codesets' +/tmp/ccVmV8Lq.o:(.rodata+0x18): first defined here +collect2: error: ld returned 1 exit status + +Upstream commit: + http://git.uclibc.org/uClibc/commit/?id=d46dc8bc88e38251bfa3712efe7abf62933f5419 + +Signed-off-by: Vicente Olivert Riera + +From d46dc8bc88e38251bfa3712efe7abf62933f5419 Mon Sep 17 00:00:00 2001 +From: Peter S. Mazinger +Date: Thu, 24 Mar 2011 00:15:25 +0000 +Subject: iconv: Do not include __iconv_codesets into iconv utility + +Host iconv needs only L_iconv_main defined and __iconv_codesets +has to included, as host system does not provide it. +Keep __iconv_codesets out of iconv linked against uClibc. + +Signed-off-by: Peter S. Mazinger +Signed-off-by: Bernhard Reutner-Fischer +--- +diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c +index 412c557..0704096 100644 +--- a/libc/misc/wchar/wchar.c ++++ b/libc/misc/wchar/wchar.c +@@ -1196,6 +1196,9 @@ libc_hidden_proto(__iconv_codesets) + #endif + + #if defined L_iconv || defined L_iconv_main ++# ifdef L_iconv_main ++static ++# endif + const unsigned char __iconv_codesets[] = + "\x0a\xe0""WCHAR_T\x00" /* superset of UCS-4 but platform-endian */ + #if __BYTE_ORDER == __BIG_ENDIAN +diff --git a/utils/Makefile.in b/utils/Makefile.in +index bb85be3..1714d28 100644 +--- a/utils/Makefile.in ++++ b/utils/Makefile.in +@@ -36,8 +36,7 @@ CFLAGS-ldd := $(CFLAGS-utils-shared) -DBUILDING_LINKAGE + # Need CFLAGS-utils explicitly, because the source file is not located in utils + CFLAGS-iconv := $(CFLAGS-utils) \ + $(CFLAGS-utils-shared) \ +- -I$(top_srcdir)libc/misc/wchar \ +- -DL_iconv_main \ ++ -I$(top_srcdir)libc/misc/wchar + + CFLAGS-locale := $(CFLAGS-utils) + CFLAGS-getconf :=$(CFLAGS-utils) \ +diff --git a/utils/iconv.c b/utils/iconv.c +index 04e2c32..a0260df 100644 +--- a/utils/iconv.c ++++ b/utils/iconv.c +@@ -108,7 +108,12 @@ + #include + #include "wchar.c" /* for _UC_iconv_t and __iconv_codesets */ + +-extern const unsigned char __iconv_codesets[]; ++#ifdef L_iconv_main ++static ++#else ++extern ++#endif ++const unsigned char __iconv_codesets[]; + + #define IBUF BUFSIZ + #define OBUF BUFSIZ +-- +cgit v0.9.1