This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gengenrtl needs to link with libintl


> 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]