From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25483 invoked by alias); 23 Oct 2014 13:06:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 25474 invoked by uid 89); 23 Oct 2014 13:06:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 23 Oct 2014 13:06:18 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E8B3FACC4; Thu, 23 Oct 2014 13:06:14 +0000 (UTC) Date: Thu, 23 Oct 2014 13:10:00 -0000 From: Richard Biener To: Rainer Orth cc: gcc-patches@gcc.gnu.org, Jakub Jelinek Subject: Re: [PATCH] Fix genmatch linking In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="2013970436-865867853-1414069330=:9891" X-SW-Source: 2014-10/txt/msg02397.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2013970436-865867853-1414069330=:9891 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-length: 3175 On Thu, 23 Oct 2014, Rainer Orth wrote: > Richard Biener 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-macros -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? Richard. --2013970436-865867853-1414069330=:9891--