ports/186846: [patch] converters/libiconv: compilation with -Oz broken

Tijl Coosemans tijl at FreeBSD.org
Mon Feb 17 15:50:02 UTC 2014


>Number:         186846
>Category:       ports
>Synopsis:       [patch] converters/libiconv: compilation with -Oz broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 17 15:50:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 11.0-CURRENT i386
>Organization:
>Environment:
>Description:
Compilation is currently broken with clang and "env CFLAGS=-Oz make".

libtool: link: cc -Oz -fno-strict-aliasing iconv_no_i18n.o -o .libs/iconv_no_i18
n  ../srclib/libicrt.a ../lib/.libs/libiconv.so -Wl,-rpath -Wl,/usr/local/lib
../lib/.libs/libiconv.so: undefined reference to `aliases2_lookup'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

aliases2_lookup is an inline function that isn't inlined with -Oz so it
must be exported, meaning the code expects gnu89 semantics for the inline
keyword.

The patch below also enables -fvisibility=hidden and adds a patch to keep
some symbols like iconv_open visible.  It was disabled because it caused
these symbols to be hidden:
http://www.marcuscom.com:8080/cgi-bin/cvsweb.cgi/ports/converters/libiconv/Attic/Makefile?rev=1.2&content-type=text/x-cvsweb-markup
>How-To-Repeat:
>Fix:

--- libiconv.patch begins here ---
Index: converters/libiconv/Makefile
===================================================================
--- converters/libiconv/Makefile	(revision 344709)
+++ converters/libiconv/Makefile	(working copy)
@@ -3,21 +3,21 @@
 
 PORTNAME=	libiconv
 PORTVERSION=	1.14
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	converters devel
 MASTER_SITES=	GNU
 
 MAINTAINER=	gnome at FreeBSD.org
-COMMENT=	A character set conversion library
+COMMENT=	Character set conversion library
 
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-static \
 		--without-libintl-prefix \
 		--docdir=${DOCSDIR}
-CONFIGURE_ENV=	gl_cv_cc_visibility="no" \
-		am_cv_func_iconv="yes" \
+CONFIGURE_ENV=	am_cv_func_iconv="yes" \
 		am_cv_proto_iconv_arg1="const"
 MAKE_JOBS_UNSAFE=	yes
+USE_CSTD=	gnu89
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=	ENCODINGS PATCHES
Index: converters/libiconv/files/patch-lib-iconv.c
===================================================================
--- converters/libiconv/files/patch-lib-iconv.c	(revision 0)
+++ converters/libiconv/files/patch-lib-iconv.c	(working copy)
@@ -0,0 +1,11 @@
+--- lib/iconv.c.orig
++++ lib/iconv.c
+@@ -598,7 +598,7 @@
+    It wants to define the symbols 'iconv_open', 'iconv', 'iconv_close'.  */
+ #define strong_alias(name, aliasname) _strong_alias(name, aliasname)
+ #define _strong_alias(name, aliasname) \
+-  extern __typeof (name) aliasname __attribute__ ((alias (#name)));
++  extern LIBICONV_DLL_EXPORTED __typeof (name) aliasname __attribute__ ((alias (#name)));
+ #undef iconv_open
+ #undef iconv
+ #undef iconv_close

Property changes on: converters/libiconv/files/patch-lib-iconv.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- libiconv.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list