This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Building gcc 4.6 without libiconv
- From: John Marino <gnugcc at marino dot st>
- To: Jay K <jay dot krell at cornell dot edu>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>, iant at google dot com
- Date: Sun, 09 Jan 2011 22:29:16 +0100
- Subject: Re: Building gcc 4.6 without libiconv
- References: <1294596014.17275.ezmlm@gcc.gnu.org> <COL101-W16FA4BDF9DF89B73C0FA6CE60D0@phx.gbl>
For my part, I was able to build bootstrap compilers that pull in z,
mpc, mpfr, gmp, and iconv statically. That only left libc as a shared
object, and that's acceptable for my use. In case others are
interested, the patch I used follows. Maybe not the best, but it got
the job done for me.
Thanks,
John
--- gcc/Makefile.in.orig 2011-01-09 00:44:20.000000000 +0100
+++ gcc/Makefile.in 2011-01-09 00:53:28.000000000 +0100
@@ -306,11 +306,11 @@
# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
# -I../zlib, unless we were configured with --with-system-zlib, in which
# case both are empty.
-ZLIB = @zlibdir@ -lz
+ZLIB = -Wl,-Bstatic @zlibdir@ -lz -Wl,-Bdynamic
ZLIBINC = @zlibinc@
# How to find GMP
-GMPLIBS = @GMPLIBS@
+GMPLIBS = -Wl,-Bstatic @GMPLIBS@ -Wl,-Bdynamic
GMPINC = @GMPINC@
# How to find PPL
@@ -626,8 +626,8 @@
LIBINTL_DEP = @LIBINTL_DEP@
# Character encoding conversion library.
-LIBICONV = @LIBICONV@
-LIBICONV_DEP = @LIBICONV_DEP@
+LIBICONV = -Wl,-Bstatic -L/usr/local/lib -liconv -Wl,-Bdynamic
+LIBICONV_DEP =
# The GC method to be used on this system.
GGC=@GGC@.o
On 1/9/2011 10:10 PM, Jay K wrote:
John I'm trying to build gcc 4.6 without libiconv. My understanding is
Ian Is it causing a problem?
I've repeatedly run into the problem where a private gcc 4.3 or? 4.5 frontend built on one Solaris machine and then run on another fails
because the second doesn't have libiconv but the first did. I have since carefully patched all the libiconv use out.
(not to mention the gmp/mpfr/mpc dependencies...)
It *appears* but I didn't confirm that all frontends pull in libcpp and libiconv, but I haven't fully looked into it.
- Jay