ports/112628: gcj41 --encoding=<non-utf-8> fails
Sergiy Vyshnevetskiy
serg at vostok.net
Sun May 13 10:50:07 UTC 2007
>Number: 112628
>Category: ports
>Synopsis: gcj41 --encoding=<non-utf-8> fails
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun May 13 10:50:06 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Sergiy Vyshnevetskiy
>Release: 6.2
>Organization:
>Environment:
FreeBSD serg2.vostok.net 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Apr 29 18:08:21 EEST 2007 serg at serg2.vostok.net:/o0/obj/usr/6/src/sys/SERG i386
>Description:
Parts of gcc are compiled without libiconv even if it's present in the system and --with-libiconv-prefix specified correctly.
The reason for this is usage of HAVE_ICONV_H macro.
1. The check for iconv.h in configure does not use the value of --with-libiconv-prefix option.
2. HAVE_ICONV_H is useless because check for libiconv uses iconv.h anyway.
3. HAVE_ICONV is changed in some source files like this:
#ifndef HAVE_ICONV_H
#unset HAVE_ICONV
#endif
>How-To-Repeat:
Run gcj41 with a value of --encoding option different from "UTF-8".
>Fix:
Remove all references to HAVE_ICONV_H from source code. Use HAVE_ICONV where necessary.
Patch attached with submission follows:
--- /dev/null Sun May 13 05:00:00 2007
+++ lang/gcc41/files/patch-have_iconv_h Sun May 13 03:56:13 2007
@@ -0,0 +1,55 @@
+--- gcc/configure.orig Tue Nov 14 00:09:55 2006
++++ gcc/configure Sat May 12 21:48:18 2007
+@@ -8170,8 +8170,7 @@
+
+
+
+-
+-for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
++for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \
+ fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
+ sys/resource.h sys/param.h sys/times.h sys/stat.h \
+ direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
+--- gcc/configure.ac.orig Tue Nov 14 00:09:55 2006
++++ gcc/configure.ac Sat May 12 21:11:38 2007
+@@ -910,7 +910,7 @@
+ AC_HEADER_TIME
+ ACX_HEADER_STRING
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
++AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
+ fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
+ sys/resource.h sys/param.h sys/times.h sys/stat.h \
+ direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h)
+--- gcc/java/lex.h.orig Sat Jun 25 03:33:05 2005
++++ gcc/java/lex.h Sat May 12 21:44:38 2007
+@@ -35,10 +35,6 @@
+ /* A Unicode character, as read from the input file */
+ typedef unsigned short unicode_t;
+
+-#ifndef HAVE_ICONV_H
+-#undef HAVE_ICONV
+-#endif
+-
+ #if defined HAVE_ICONV
+ #include <iconv.h>
+ #endif /* HAVE_ICONV */
+--- libcpp/internal.h.orig Fri Oct 21 20:54:20 2005
++++ libcpp/internal.h Sat May 12 21:47:11 2007
+@@ -26,15 +26,8 @@
+ #include "symtab.h"
+ #include "cpp-id-data.h"
+
+-#ifndef HAVE_ICONV_H
+-#undef HAVE_ICONV
+-#endif
+-
+-#if HAVE_ICONV
++#ifdef HAVE_ICONV
+ #include <iconv.h>
+-#else
+-#define HAVE_ICONV 0
+-typedef int iconv_t; /* dummy */
+ #endif
+
+ struct directive; /* Deliberately incomplete. */
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list