From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24136 invoked by alias); 22 Oct 2008 10:54:50 -0000 Received: (qmail 22743 invoked by uid 48); 22 Oct 2008 10:53:17 -0000 Date: Wed, 22 Oct 2008 10:54:00 -0000 Message-ID: <20081022105317.22742.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/35942] Self Reference In Dynamic Linked Library builds for building Cross-Compiler In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "earthengine at gmail dot com" 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: 2008-10/txt/msg01429.txt.bz2 ------- Comment #8 from earthengine at gmail dot com 2008-10-22 10:53 ------- Let me explain it more clearly. Suppose I am building a toolchain to be running on a x86 Linux machine, and it will generate code for mips Linux. With gcc 4.2.x, I can use --host=i686-pc-linux-gnu --target=mips-linux-gnu and it will work on both x86-64 marchines as well because the 4.2.x build system will use i686-pc-linux-gnu as the --build parameter, and then it will be a case of normal cross compile. However, the previous configuration does not work under 4.3+. The reason is under 4.3+ the build system will detect the --build parameter as well, so the configuration will become --build=x86_64-unknown-linux-gnu --host=i686-pc-linux-gnu --target=mips-linux-gnu This is a Canadian cross compile! Usually, to complete a Canadian cross compile, we need the libstdc++ for mips-linux-gnu already because it can not depending on the just-compiled compiler (it would not run on the build machine) to compile this library. This is why we have this problem. The solution is to explicitly use --build=i686-pc-linux-gnu --host-pc-linux-gnu --target=mips-linux-gnu to force a normal cross compile. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35942