Patchwork [ada,build] Link gnattools with $(LIBINTL)

login
register
mail settings
Submitter Rainer Orth
Date June 20, 2011, 11:15 a.m.
Message ID <ydd1uyorbxx.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/101093/
State New
Headers show

Comments

Rainer Orth - June 20, 2011, 11:15 a.m.
On several platforms (e.g. Solaris 10/x86), several gnattools fail to
link:

Undefined                       first referenced
 symbol                             in file
libintl_gettext                     ../../libcommon.a(diagnostic.o)
libintl_textdomain                  ../../libcommon.a(intl.o)
libintl_bindtextdomain              ../../libcommon.a(intl.o)
libintl_ngettext                    ../../libcommon.a(diagnostic.o)
ld: fatal: Symbol referencing errors. No output written to ../../gnatmake
collect2: error: ld returned 1 exit status

libcommon.a may depend on libintl.a, but that is missing from
$(TOOLS_LIBS).  The following patch corrects this and allows bootstrap
to finish successfully on i386-pc-solaris2.10.

Ok for mainline?  I suppose this is obvious.

Thanks.
	Rainer


2011-06-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).

Patch

diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -1,5 +1,5 @@ 
 # Makefile for GNU Ada Compiler (GNAT).
-#   Copyright (C) 1994-2010 Free Software Foundation, Inc.
+#   Copyright (C) 1994-2011 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -246,7 +246,7 @@  LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS
 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
 # Default is no TGT_LIB; one might be passed down or something
 TGT_LIB =
-TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
+TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) $(LIBINTL) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
 
 # Convert the target variable into a space separated list of architecture,
 # manufacturer, and operating system and assign each of those to its own