From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31915 invoked by alias); 10 Nov 2011 17:44:12 -0000 Received: (qmail 31900 invoked by uid 22791); 10 Nov 2011 17:44:10 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Nov 2011 17:43:57 +0000 From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/51072] Build with --disable-bootstrap fails in libitm Date: Thu, 10 Nov 2011 17:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg01132.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51072 --- Comment #6 from joseph at codesourcery dot com 2011-11-10 17:43:30 UTC --- On Thu, 10 Nov 2011, rguenth at gcc dot gnu.org wrote: > Shouldn't libitm be built with the "stage1" g++ as it is a target library, > even with --disable-bootstrap? Yes, as I said in building it with a pre-installed compiler is wrong. More precisely: target libraries should always be built with a compiler from the same sources as the source tree from which the library is being built, configured in the same way except possibly for the host. For a build with build == host, the compiler used should always be the newly built one from the same build. For a build with build != host - a Canadian cross build - the compiler used should be a previously built host-x-target compiler from the same sources and identically configured except for the host setting. (For Canadian cross builds it's better to use "make all-gcc" or "make all-host" etc., and copy the libraries from the host-x-target build - but if the libraries are being rebuilt then the host-x-target compiler is the one used.) The problem here is the wrong compiler being used for a host == build case.