From 95ee4896608074232cbc8126d4ee0208c2fe6afa Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 25 Apr 2017 10:59:41 +0100 Subject: libiconv: fix linker failure under GCC 7 (From OE-Core rev: 7e646dd052c7013416d99d4c0201b4694fc1bbb6) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- ...Fix-link-error-when-compiling-with-gcc-O0.patch | 36 ++++++++++++++++++++++ meta/recipes-support/libiconv/libiconv_1.14.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-support/libiconv/libiconv-1.14/0001-Fix-link-error-when-compiling-with-gcc-O0.patch diff --git a/meta/recipes-support/libiconv/libiconv-1.14/0001-Fix-link-error-when-compiling-with-gcc-O0.patch b/meta/recipes-support/libiconv/libiconv-1.14/0001-Fix-link-error-when-compiling-with-gcc-O0.patch new file mode 100644 index 0000000000..15af15ff8c --- /dev/null +++ b/meta/recipes-support/libiconv/libiconv-1.14/0001-Fix-link-error-when-compiling-with-gcc-O0.patch @@ -0,0 +1,36 @@ +This fix is also needed for GCC7. + +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From b29089d8b43abc8fba073da7e6dccaeba56b2b70 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sat, 19 Nov 2016 17:13:56 +0100 +Subject: [PATCH] Fix link error when compiling with gcc -O0. + +--- + ChangeLog | 7 +++++++ + lib/iconv.c | 6 +++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/lib/iconv.c b/lib/iconv.c +index 5a1a325..31853a7 100644 +--- a/lib/iconv.c ++++ b/lib/iconv.c +@@ -178,8 +178,12 @@ static const struct alias sysdep_aliases[] = { + }; + #ifdef __GNUC__ + __inline ++#else ++#ifdef __cplusplus ++inline ++#endif + #endif +-const struct alias * ++static const struct alias * + aliases2_lookup (register const char *str) + { + const struct alias * ptr; +-- +2.8.1 + diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb b/meta/recipes-support/libiconv/libiconv_1.14.bb index 9fd5114ac8..8d272eb6a0 100644 --- a/meta/recipes-support/libiconv/libiconv_1.14.bb +++ b/meta/recipes-support/libiconv/libiconv_1.14.bb @@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \ SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ file://autoconf.patch \ file://add-relocatable-module.patch \ + file://0001-Fix-link-error-when-compiling-with-gcc-O0.patch \ " SRC_URI[md5sum] = "e34509b1623cec449dfeb73d7ce9c6c6" -- cgit v1.2.3-54-g00ecf