This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gengenrtl needs to link with libintl
- To: zack at codesourcery dot com (Zack Weinberg)
- Subject: Re: gengenrtl needs to link with libintl
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Wed, 31 Oct 2001 13:12:59 -0500 (EST)
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
> On Tue, Oct 30, 2001 at 11:58:40AM -0500, John David Anglin wrote:
> > The following error occurs under hppa1.1-hp-hpux10.20 when configured as
> > follows:
> >
> > ../configure --host=hppa1.1-hp-hpux10.20 --with-gnu-as --enable-shared --enable-threads --enable-debug=no
> >
> > gcc -DIN_GCC -g -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o gengenrtl \
> > gengenrtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `
> > /usr/ccs/bin/ld: Unsatisfied symbols:
> > gettext (code)
> > collect2: ld returned 1 exit status
This patch fixes the above problem. It occurs on systems that have
installed GNU libintl. Checked with a complete bootstrap with no
regressions on hppa1.1-hp-hpux10.20. As pointed out by Zack, gettext
can't be used in generator files.
OK for installation?
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2001-10-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
* obstack.c (_): Don't use gettext for error handler when
GENERATOR_FILE is defined.
--- obstack.c.orig Fri Dec 29 14:37:03 2000
+++ obstack.c Tue Oct 30 13:14:50 2001
@@ -451,7 +451,7 @@
/* Define the error handler. */
#ifndef _
-# ifdef HAVE_LIBINTL_H
+# if ! defined (GENERATOR_FILE) && defined (HAVE_LIBINTL_H)
# include <libintl.h>
# ifndef _
# define _(Str) gettext (Str)