diff mbox

Fix genmatch linking

Message ID alpine.LSU.2.11.1410241140500.9891@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Oct. 24, 2014, 9:41 a.m. UTC
On Fri, 24 Oct 2014, Richard Biener wrote:

> On Fri, 24 Oct 2014, Rainer Orth wrote:
> 
> > Richard Biener <rguenther@suse.de> writes:
> > 
> > > On Thu, 23 Oct 2014, Richard Biener wrote:
> > >
> > >> 
> > >> Final try for today.
> > >
> > > And this may work as well and is slightly simpler.
> > >
> > > Index: gcc/Makefile.in
> > > ===================================================================
> > > --- gcc/Makefile.in	(revision 216590)
> > > +++ gcc/Makefile.in	(working copy)
> > > @@ -981,7 +981,15 @@ else
> > >  LIBIBERTY = ../libiberty/libiberty.a
> > >  BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
> > >  endif
> > > +# For stage1 and when cross-compiling use the build libcpp which is
> > > +# built with NLS disabled.  For stage2+ use the host library and
> > > +# its dependencies.
> > > +ifeq ($(build_objdir),$(build_libobjdir))
> > >  BUILD_CPPLIB = $(build_libobjdir)/libcpp/libcpp.a
> > > +else
> > > +BUILD_CPPLIB = $(CPPLIB) $(LIBIBERTY) $(LIBINTL) $(LIBICONV)
> > > +build/genmatch$(build_exeext): BUILD_LIBDEPS += $(LIBINTL_DEP) $(LIBICONV_DEP)
> > > +endif
> > >  
> > >  # Dependencies on the intl and portability libraries.
> > >  LIBDEPS= libcommon.a $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) \
> > >
> > >
> > > Can you test it please?
> > 
> > Sure: this version allowed an i386-pc-solaris2.10 bootstrap to complete
> > just fine.
> 
> Great.  Installed as follows.
> 
> Richard.
> 
> 2014-10-24  Richard Biener  <rguenther@suse.de>
> 
> 	* Makefile.in (BUILD_CPPLIB): When in stage2+ use the
> 	host library and make sure to pull in the required libintl
> 	and libiconv dependencies.
> 
> Index: gcc/Makefile.in
> ===================================================================
> --- gcc/Makefile.in	(revision 216590)
> +++ gcc/Makefile.in	(working copy)
> @@ -981,7 +981,15 @@ else
>  LIBIBERTY = ../libiberty/libiberty.a
>  BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
>  endif
> +# For stage1 and when cross-compiling use the build libcpp which is
> +# built with NLS disabled.  For stage2+ use the host library and
> +# its dependencies.
> +ifeq ($(build_objdir),$(build_libobjdir))
>  BUILD_CPPLIB = $(build_libobjdir)/libcpp/libcpp.a
> +else
> +BUILD_CPPLIB = $(CPPLIB) $(LIBIBERTY) $(LIBINTL) $(LIBICONV)
> +build/genmatch$(build_exeext): BUILD_LIBDEPS += $(LIBINTL_DEP) $(LIBICONV_DEP)
> +endif
>  
>  # Dependencies on the intl and portability libraries.
>  LIBDEPS= libcommon.a $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) \

Dominique reported that this fails for system libiconv but built libintl.

Which might be fixed by the following.  Does that still work for you?

Thanks,
Richard.

Comments

Rainer Orth Oct. 24, 2014, 11:03 a.m. UTC | #1
Richard Biener <rguenther@suse.de> writes:

> Dominique reported that this fails for system libiconv but built libintl.
>
> Which might be fixed by the following.  Does that still work for you?

It does: an i386-pc-solaris2.10 bootstrap has finished by now and make
check is running.

	Rainer
diff mbox

Patch

Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in	(revision 216626)
+++ gcc/Makefile.in	(working copy)
@@ -981,15 +981,6 @@  else
 LIBIBERTY = ../libiberty/libiberty.a
 BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
 endif
-# For stage1 and when cross-compiling use the build libcpp which is
-# built with NLS disabled.  For stage2+ use the host library and
-# its dependencies.
-ifeq ($(build_objdir),$(build_libobjdir))
-BUILD_CPPLIB = $(build_libobjdir)/libcpp/libcpp.a
-else
-BUILD_CPPLIB = $(CPPLIB) $(LIBIBERTY) $(LIBINTL) $(LIBICONV)
-build/genmatch$(build_exeext): BUILD_LIBDEPS += $(LIBINTL_DEP) $(LIBICONV_DEP)
-endif
 
 # Dependencies on the intl and portability libraries.
 LIBDEPS= libcommon.a $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) \
@@ -2529,6 +2520,17 @@  genprog = $(genprogerr) check checksum c
 # These programs need libs over and above what they get from the above list.
 build/genautomata$(build_exeext) : BUILD_LIBS += -lm
 
+# For stage1 and when cross-compiling use the build libcpp which is
+# built with NLS disabled.  For stage2+ use the host library and
+# its dependencies.
+ifeq ($(build_objdir),$(build_libobjdir))
+BUILD_CPPLIB = $(build_libobjdir)/libcpp/libcpp.a
+else
+BUILD_CPPLIB = $(CPPLIB) $(LIBIBERTY)
+build/genmatch$(build_exeext): BUILD_LIBDEPS += $(LIBINTL_DEP) $(LIBICONV_DEP)
+build/genmatch$(build_exeext): BUILD_LIBS += $(LIBINTL) $(LIBICONV)
+endif
+
 build/genmatch$(build_exeext) : $(BUILD_CPPLIB) \
   $(BUILD_ERRORS) build/vec.o build/hash-table.o