From patchwork Thu Nov 21 00:18:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1198599 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-514260-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="EnHjJ0R4"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="C5Oh5xub"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47JKtM4NJDz9sNx for ; Thu, 21 Nov 2019 11:19:05 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=ZDFBV+fi1Zdj/kMrZjBXKUsGtOU8B57ZdmtYhEwHLjO/vSRQmsm5H 1Dbp3zSJDPUyhTYqBNMUVv2HGACAFtiKxZk8ON260lhmSySdsCh3JnJIclDKnDuI oYiwLvM72Smj3Us4/m0ZAzc0MNA62IhyRYThzNp0q9y2ato4CnqBJg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :in-reply-to:content-type:content-transfer-encoding; s=default; bh=ydzSUME4PIZrERhamps/nxYH9BM=; b=EnHjJ0R41dv2uzfTWb4oa7nLJnw9 heT9xrz0gpXew3/c/EjvTFgD772s5hduUupU/PBPYmHfV0eppbtJeOzgPlmS2kgK xYju1Dyy5ZpWPLDB+VXGIP5zs6ZehCU+nS8f001pxAYiv6c1l02HHRohD3SvbnhC Y5GMRhRc6rXU2zs= Received: (qmail 57619 invoked by alias); 21 Nov 2019 00:18:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 57610 invoked by uid 89); 21 Nov 2019 00:18:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:VI1PR08 X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (205.139.110.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Nov 2019 00:18:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574295534; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=piKk4LMIbooXuLDtamY1fSvDQ4g3dFjcpLzbq6J6hLQ=; b=C5Oh5xubcsQmd94ebwVmq5NnP0/VxQyjWJ91joMnVSr65vhLzPqVw8xYmibT6Qn1PPk/q7 skJCDgOf0ONF/Ncd/qH6nwjqu2ajZ7BH8iVI4NDJEhbBj3ohBiHtjvTieYN6NMNALvUIJs JdMZexICRclP5TfK8Gm2MOPkNeWflJw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-iYOkqLcCMiKoWpF8LtKrMg-1; Wed, 20 Nov 2019 19:18:52 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AA130801FA1; Thu, 21 Nov 2019 00:18:51 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E9345ED44; Thu, 21 Nov 2019 00:18:50 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id xAL0Imma031026; Thu, 21 Nov 2019 01:18:48 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id xAL0IkIp027567; Thu, 21 Nov 2019 01:18:46 +0100 Date: Thu, 21 Nov 2019 01:18:45 +0100 From: Jakub Jelinek To: Wilco Dijkstra , Ian Lance Taylor Cc: GCC Patches Subject: [PATCH] Fix libgo build (was Re: [PATCH v3] PR85678: Change default to -fno-common) Message-ID: <20191121001845.GC4650@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Mimecast-Spam-Score: 0 Content-Disposition: inline X-IsSubscribed: yes On Tue, Nov 05, 2019 at 05:17:10PM +0000, Wilco Dijkstra wrote: > Passes bootstrap and regress on AArch64 and x64. OK for commit? This broke bootstrap on x86_64-linux as well as i686-linux (guess all targets that go supports). The following patch fixes it for me, though not sure which *.c file is best and what location in there for the definition. With this bootstrap succeeded on both x86_64-linux and i686-linux, regtest is still pending, but without it it just failed to link libgo. Jakub --- libgo/runtime/runtime.h.jj 2019-09-06 23:00:17.755294355 +0200 +++ libgo/runtime/runtime.h 2019-11-21 00:32:51.146992951 +0100 @@ -475,7 +475,7 @@ bool scanstackwithmap(void*) bool doscanstack(G*, void*) __asm__("runtime.doscanstack"); -bool runtime_usestackmaps; +extern bool runtime_usestackmaps; bool probestackmaps(void) __asm__("runtime.probestackmaps"); --- libgo/runtime/proc.c.jj 2019-08-31 13:26:29.646735239 +0200 +++ libgo/runtime/proc.c 2019-11-21 00:34:23.509610234 +0100 @@ -676,6 +676,8 @@ makeGContext(G* gp, byte* sp, uintptr sp __go_makecontext(uc, kickoff, sp, (size_t)spsize); } +bool runtime_usestackmaps; + // The goroutine g is about to enter a system call. // Record that it's not using the cpu anymore. // This is called only from the go syscall library and cgocall,