From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 9F01C3854807 for ; Fri, 6 Aug 2021 23:08:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9F01C3854807 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x03.wildebeest.org [172.31.17.133]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 9E27030291A9; Sat, 7 Aug 2021 01:08:38 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 3CBFD2E80640; Sat, 7 Aug 2021 01:08:38 +0200 (CEST) Date: Sat, 7 Aug 2021 01:08:38 +0200 From: Mark Wielaard To: Philip Herron Cc: gcc-rust@gcc.gnu.org Subject: Re: [PATCH] More rustspec.cc cleanups Message-ID: References: <20210805233424.331178-1-mark@klomp.org> <9ebd75fa-b14a-b224-93a9-e8f4f0363672@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ebd75fa-b14a-b224-93a9-e8f4f0363672@embecosm.com> X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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-rust@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: gcc-rust mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Aug 2021 23:08:42 -0000 Hi Philip, On Fri, Aug 06, 2021 at 03:58:24PM +0100, Philip Herron wrote: > Great patch, this file has been neglected. This is now being merged > https://github.com/Rust-GCC/gccrs/pull/610 > > Its not 100% clear but is the compiler driver here automatically adding > in -lc or is it simply checking if it saw_libc? It does pass -lc (if not saw_libc). You can see what is invoked with which arguments using -v (e.g. gcc/gccrs -B gcc -v foobar.rs). One of the things we are using is the crt1.o startup code, which provides the _start symbol and which relies on libc (in particular __libc_start_main and abort). The patch wasn't really meant to change how we currently do assembling, linking and startup. But just to remove those parts that were unnecessary because they were go specific. Cheers, Mark