From: Richard Biener <rguenther@suse.de>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: gcc-patches@gcc.gnu.org, Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] Fix genmatch linking
Date: Thu, 23 Oct 2014 14:18:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.11.1410231602080.9891@zhemvz.fhfr.qr> (raw)
In-Reply-To: <alpine.LSU.2.11.1410231455160.9891@zhemvz.fhfr.qr>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 4025 bytes --]
On Thu, 23 Oct 2014, Richard Biener wrote:
> On Thu, 23 Oct 2014, Rainer Orth wrote:
>
> > Richard Biener <rguenther@suse.de> writes:
> >
> > > This adds a libcpp host module without NLS and ICONV support
> > > and properly links genmatch against the build libcpp instead of
> > > the host one.
> > >
> > > Bootstrap running on x86_64-unknown-linux-gnu (stage1 all-gcc
> > > finished fine).
> >
> > Unfortunately, this doesn't work on i386-pc-solaris2.10:
> >
> > In stage1, build/genmatch is linked correctly
> >
> > g++ -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ -static-libgcc -o build/genmatch \
> > build/genmatch.o ../build-i386-pc-solaris2.10/libcpp/libcpp.a build/errors.o build/vec.o build/hash-table.o ../build-i386-pc-solaris2.10/libiberty/libiberty.a
> >
> > OTOH, in stage2, I get
> >
> > /var/gcc/regression/trunk/10-gcc/build/./prev-gcc/xg++ -B/var/gcc/regression/trunk/10-gcc/build/./prev-gcc/ -B/vol/gcc/i386-pc-solaris2.10/bin/ -nostdinc++ -B/var/gcc/regression/trunk/10-gcc/build/prev-i386-pc-solaris2.10/libstdc++-v3/src/.libs -B/var/gcc/regression/trunk/10-gcc/build/prev-i386-pc-solaris2.10/libstdc++-v3/libsupc++/.libs -I/var/gcc/regression/trunk/10-gcc/build/prev-i386-pc-solaris2.10/libstdc++-v3/include/i386-pc-solaris2.10 -I/var/gcc/regression/trunk/10-gcc/build/prev-i386-pc-solaris2.10/libstdc++-v3/include -I/vol/gcc/src/hg/trunk/local/libstdc++-v3/libsupc++ -L/var/gcc/regression/trunk/10-gcc/build/prev-i386-pc-solaris2.10/libstdc++-v3/src/.libs -L/var/gcc/regression/trunk/10-gcc/build/prev-i386-pc-solaris2.10/libstdc++-v3/libsupc++/.libs -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macro
s -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ -static-libgcc -o build/genmatch \
> > build/genmatch.o .././libcpp/libcpp.a build/errors.o build/vec.o build/hash-table.o .././libiberty/libiberty.a
> > Undefined first referenced
> > symbol in file
> > libintl_bindtextdomain .././libcpp/libcpp.a(init.o)
> > libintl_dgettext .././libcpp/libcpp.a(errors.o)
> > ld: fatal: symbol referencing errors. No output written to build/genmatch
> > collect2: error: ld returned 1 exit status
> > make[3]: *** [build/genmatch] Error 1
> >
> > Diffing the stage1 and 2 gcc/Makefiles, I see
> >
> > --- prev-gcc/Makefile 2014-10-23 13:45:20.720460523 +0200
> > +++ gcc/Makefile 2014-10-23 14:32:06.111476537 +0200
> > @@ -86 +86 @@
> > -build_libsubdir=build-i386-pc-solaris2.10
> > +build_libsubdir=.
>
> Hmm, why do stage2+ use the host libraries? Ah, because they can
> assume that host == build. Ok, so when bootstrapping you then
> need to link libcpp dependencies as well, for stage2+. Not sure
> how to achieve that. I guess doing sth in gcc/configure - but
> how does that know what stage we are in?
I wonder if the following works
Richard.
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
+ifeq ($(current_stage),stage1)
BUILD_CPPLIB = $(build_libobjdir)/libcpp/libcpp.a
+else
+ifeq ($(current_stage),)
+BUILD_CPPLIB = $(build_libobjdir)/libcpp/libcpp.a
+else
+BUILD_CPPLIB = $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) ($LIBICONV_DEP)
+endif
+endif
# Dependencies on the intl and portability libraries.
LIBDEPS= libcommon.a $(CPPLIB) $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) \
next prev parent reply other threads:[~2014-10-23 14:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 9:01 Richard Biener
2014-10-23 9:16 ` Jakub Jelinek
2014-10-23 12:51 ` Rainer Orth
2014-10-23 13:10 ` Richard Biener
2014-10-23 14:18 ` Richard Biener [this message]
2014-10-23 14:30 ` Richard Biener
2014-10-23 14:37 ` Richard Biener
2014-10-23 14:38 ` Richard Biener
2014-10-24 7:56 ` Rainer Orth
2014-10-24 8:07 ` Richard Biener
2014-10-24 9:51 ` Richard Biener
2014-10-24 11:04 ` Rainer Orth
2014-10-24 11:29 ` Richard Biener
2014-10-23 15:27 ` Jakub Jelinek
2014-10-23 21:35 ` Richard Sandiford
2014-10-24 8:00 ` Richard Biener
2014-10-24 4:32 ` PATCH: fix breakage from "[PATCH] Fix genmatch linking" Hans-Peter Nilsson
2014-10-24 5:02 ` Hans-Peter Nilsson
2014-10-24 8:03 ` Richard Biener
2014-10-24 17:04 ` Hans-Peter Nilsson
2014-10-25 8:57 ` Richard Biener
2014-10-29 0:22 ` Paolo Bonzini
2014-10-29 0:30 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.11.1410231602080.9891@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).