This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix for creating statically linked gcc
- To: gcc-patches at gcc dot gnu dot org
- Subject: Fix for creating statically linked gcc
- From: Philipp Thomas <pthomas at suse dot de>
- Date: Tue, 19 Sep 2000 02:15:15 +0200
- Cc: Greg McGary <greg at mcgary dot org>
Creating a statically linked gcc on a system using glibc and configured
with --with-included-gettext (former default) failed because of
multiple defined symbols.
Bruno Haible, comaintainer of gettext, sent me this patch which I've
committed. This solves the problem first reported by Greg McGary.
2000-09-18 Bruno Haible <haible@clisp.cons.org>
* intl/dcgettext.c: Outside libc, use local variable names that don't
clash with those in libc.
* intl/bindtextdom.c: Likewise.
* intl/textdomain.c: Likewise.
Index: bindtextdom.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/intl/bindtextdom.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- bindtextdom.c 1999/09/04 15:08:49 1.2
+++ bindtextdom.c 2000/09/18 22:05:52 1.3
@@ -46,6 +46,14 @@ void free ();
#include "gettext.h"
#include "gettextP.h"
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_dirname _nl_default_dirname__
+# define _nl_domain_bindings _nl_domain_bindings__
+#endif
+
/* @@ end of prolog @@ */
/* Contains the default location of the message catalogs. */
Index: dcgettext.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/intl/dcgettext.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- dcgettext.c 2000/08/02 17:01:13 1.4
+++ dcgettext.c 2000/09/18 22:05:52 1.5
@@ -85,6 +85,16 @@ void free ();
#endif
#include "hash-string.h"
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_default_domain _nl_default_default_domain__
+# define _nl_current_default_domain _nl_current_default_domain__
+# define _nl_default_dirname _nl_default_dirname__
+# define _nl_domain_bindings _nl_domain_bindings__
+#endif
+
/* @@ end of prolog @@ */
#ifdef _LIBC
Index: textdomain.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/intl/textdomain.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- textdomain.c 1999/09/04 15:08:49 1.2
+++ textdomain.c 2000/09/18 22:05:52 1.3
@@ -39,6 +39,14 @@
# include "libgettext.h"
#endif
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_default_domain _nl_default_default_domain__
+# define _nl_current_default_domain _nl_current_default_domain__
+#endif
+
/* @@ end of prolog @@ */
/* Name of the default text domain. */
--
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany
#define NINODE 50 /* number of in core inodes */
#define NPROC 30 /* max number of processes */
-- Version 7 UNIX for PDP 11, /usr/include/sys/param.h