From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mengyan1223.wang (mengyan1223.wang [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 6BA843858C27 for ; Sat, 11 Sep 2021 08:32:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6BA843858C27 Received: from [192.168.124.4] (unknown [113.140.11.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 66A4C660F0; Sat, 11 Sep 2021 04:32:16 -0400 (EDT) Message-ID: <494c39c9462eaf036e04aa7ede61325585af4da6.camel@mengyan1223.wang> Subject: Re: Building a host-isolated gcc without faking cross-compiling From: Xi Ruoyao To: Anthony de Almeida Lopes , gcc-help@gcc.gnu.org Date: Sat, 11 Sep 2021 16:32:14 +0800 In-Reply-To: <452e4e21-7dd8-5102-3fd2-dda12abde50d@falsifiable.net> References: <86a5dbe8-28c1-3113-b585-4e195c3f6534@gmail.com> <97c0acc2-5be0-30f3-6f2f-4b60eef95cb9@falsifiable.net> <1f4faf06-24ab-886b-d3db-a5fac2b34c15@gmail.com> <452e4e21-7dd8-5102-3fd2-dda12abde50d@falsifiable.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3030.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2021 08:32:21 -0000 On Sat, 2021-09-11 at 04:55 +0000, Anthony de Almeida Lopes via Gcc-help wrote: > Alright, progress. I'm still researching the next problems that I ran > into but I thought I'd post an update. First, I ran into > GCC_NO_EXECUTABLES while the build was in configure-stage2-zlib and in > anticipating what Lance might say to that, I checked and there doesn't > seem to be a --without-zlib although I did test that just in case and > it > did nothing. The best explanation for what GCC_NO_EXECUTABLES is that > I > found so far is in a post to the list about a similar problem: > > https://gcc.gnu.org/legacy-ml/gcc/2008-03/msg00515.html > > I went ahead and built it anyway with --disable-bootstrap. glibc > compiled but not too surprisingly running ldd or /usr/lib/libc.so.6 > with > LD_LIBRARY_PATH to $DISTRO/usr/lib just segfaults, so it seems like it > wasn't really a sane build of gcc after all. > > Ignoring that problem, configuring libstdc++-v3 after having glibc > fails > which is kind of obvious since the host glibc differs in version from > the target version. You know, the typical "version `GLIBC_2.34' not > found" errors. This seems like a proper motivating reason for using > the > fake cross-compiling trick but I'm determined to figure out if there's > a > way around that. As a LFS editor (and I also have several commits in GCC) I'd say there is no rational way for this, expect cross-compilation. Maybe you can use a dozen of switches to accomplish the object, but at last it will be almost equivelent to run a cross-compilation. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University