From patchwork Fri Nov 24 15:53:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 169484 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1316009vqx; Fri, 24 Nov 2023 07:54:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYyFMYuTW2oxS2pbQXBIOEqgcWimsBR5K36m/hSy5DAa2t5o4OUvqm5wgQFALhS+nrQVXD X-Received: by 2002:a05:6830:1245:b0:6bf:3f4:3edc with SMTP id s5-20020a056830124500b006bf03f43edcmr3528617otp.22.1700841260482; Fri, 24 Nov 2023 07:54:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700841260; cv=pass; d=google.com; s=arc-20160816; b=ByNY3rqd5+exWkRbzX/4lT/NtodUEGUWRupY/my6x0UiYSYshNgxCI9bNpQNJxzl7N vs7qHgZtIV/8SZLf6mVAdVWjbgEAYem9E2iYuTJtMy2Myoh5j0aZE2F68HwXsGBiXNEk rcqPCrWg5TtxNLjdt/FOT885JHEun9hgkn7xG/FHrUtzu0O45WWa+vMAaumkaA9of6aF jgMJRXY01ooMH+FSc8zLa056A/XKw5F4+Gk8uPRRQxzX56Qolbn9XKZjgBhgVbXaRyDX UShXDBC0JZFrD5vnjVcnRxTYxn8nu+SvgMZyA8E9ofTTLIaiiqIq81eypouQ01TEcvW2 UCYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=1sGYwUPFlm8CV2gniy3cS9RQsgbfxSTkMpFJIDTFR6I=; fh=CKPUm9hi8J6KlRUx6/Yt4mQV9HQHKUzgewiII4A6Ca0=; b=e1er4dlX/VN/UFLJj4cKKX6rOzvQNvp5/q2+9KEGulkk0gygBWEOuCtzz2M9NlBSVH rPk+qcUyDW6QiU4x6l+tebzEutUmsIolwjtJpGmwQVxwh5qV2pteEgT75zhAWxOUChQQ d1xdI4WfW8B+RRL3l520lhERKqMvSE8bSNJaIcOuwK5F58OOIH0muim7TXL9EDuwcwJ7 HtSfw4RvzhBls/RZqKvJATklmVOTfz5Q0jIlvDxt3/qpfF4vu+OjxHSD3gPvRSjCGg7i DE3HjzCsYySddQluK9K4t7F8VBF9HbKWkNqdmdwGtsR9I2pplIgqc9gtbEQez2kkBrj0 Az+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cwq2uYH2; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f17-20020a05621400d100b00679e02bc140si3405332qvs.497.2023.11.24.07.54.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 07:54:20 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cwq2uYH2; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3BE33385843E for ; Fri, 24 Nov 2023 15:54:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 2FE7B3858D32 for ; Fri, 24 Nov 2023 15:53:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2FE7B3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2FE7B3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700841237; cv=none; b=WwKO2MEosoOdqtbPu5e1rDbcNEYFD2G2KDtbvVJ07SrAi7YCRvhsh50fRvw7mtVIkTzjSgbpAlHaKfG2n2soZNgQYteL5Fi6hfIjJMEiYV3XmWhDB33JaNs7P/vSNt7AWgJMehXyCzQzF2/u+z1mPMYYzNQKEQvIzPCXkp7rwgA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700841237; c=relaxed/simple; bh=2vvXOCRvPd4+8I2cea4CmeBEwhkoRlKWCQVQmgfE+EE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=aBzjJpR7wphC89lkyITHSIkLjKp8aoZuJ/ZBP2NNNQGgxi8wZd8eoNIPRq+gy6SF2sE/ozDgK3CtQh2WzDdhQhM/keLnVfeRMZdh26bDv5V1KfHKxmO1O/hBmPdlSnOKhZiCJPFJHtqL9e8r/2AxpZOP5CwwXDGd3L+xMCb5nd8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700841235; 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; bh=1sGYwUPFlm8CV2gniy3cS9RQsgbfxSTkMpFJIDTFR6I=; b=Cwq2uYH2kb20ofrSW9CHlM5vmx1dKMbvf+qOjzsTvSsRD8Lbh340HOW1sFPUOT1skR+78u gzQ24GHMSDqKlbO5DpTACGF5Xfehrl00GfnAne7fngWH5ZNbq1yc4T2TTsfub7cSrCEKon REqcBR3lhKOsjkaD5ZtxE/yKtQttktg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-567-QJ_LrXYNMHS928p4Xey0nA-1; Fri, 24 Nov 2023 10:53:52 -0500 X-MC-Unique: QJ_LrXYNMHS928p4Xey0nA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 82BB3101A52D; Fri, 24 Nov 2023 15:53:52 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45F8040C6EBB; Fri, 24 Nov 2023 15:53:52 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3AOFrnGg3470888 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 24 Nov 2023 16:53:50 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3AOFrnb03470887; Fri, 24 Nov 2023 16:53:49 +0100 Date: Fri, 24 Nov 2023 16:53:48 +0100 From: Jakub Jelinek To: YunQiang Su , Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] mips: Fix up mips*-sde-elf* build [PR112300] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783461325239263363 X-GMAIL-MSGID: 1783461325239263363 Hi! As reported in the PR, mipsisa64r2-sde-elf doesn't build because HEAP_TRAMPOLINES_INIT macro isn't defined anywhere. It is normally defined by # Figure out if we need to enable heap trampolines by default case ${target} in *-*-darwin2*) # Currently, we do this for macOS 11 and above. tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=1" ;; *) tm_defines="$tm_defines HEAP_TRAMPOLINES_INIT=0" ;; esac in config.gcc, but mips*-sde-elf* is the only target which overwrites tm_defines shell variable rather than just appending to it (or in one case prepending), all other targets append something to it, including other mips* triplets. I believe (just from looking at config.gcc) that the difference is that LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4 HEAP_TRAMPOLINES_INIT=0 isn't defined without the patch and is with the patch. I think defining those first 4 shouldn't cause any harm and defining the last one is required for it to actually build at all. Ok for trunk? Totally untested though... 2023-11-24 Jakub Jelinek PR target/112300 * config.gcc (mips*-sde-elf*): Append to tm_defines rather than overwriting them. Jakub --- gcc/config.gcc.jj 2023-11-18 09:35:20.625089143 +0100 +++ gcc/config.gcc 2023-11-24 16:41:39.194495079 +0100 @@ -2682,22 +2682,22 @@ mips*-sde-elf*) esac case ${target} in mipsisa32r6*) - tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6 MIPS_ABI_DEFAULT=ABI_32" + tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R6 MIPS_ABI_DEFAULT=ABI_32" ;; mipsisa32r2*) - tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2 MIPS_ABI_DEFAULT=ABI_32" + tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32R2 MIPS_ABI_DEFAULT=ABI_32" ;; mipsisa32*) - tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32 MIPS_ABI_DEFAULT=ABI_32" + tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS32 MIPS_ABI_DEFAULT=ABI_32" ;; mipsisa64r6*) - tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6 MIPS_ABI_DEFAULT=ABI_N32" + tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R6 MIPS_ABI_DEFAULT=ABI_N32" ;; mipsisa64r2*) - tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2 MIPS_ABI_DEFAULT=ABI_N32" + tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64R2 MIPS_ABI_DEFAULT=ABI_N32" ;; mipsisa64*) - tm_defines="MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64 MIPS_ABI_DEFAULT=ABI_N32" + tm_defines="${tm_defines} MIPS_ISA_DEFAULT=MIPS_ISA_MIPS64 MIPS_ABI_DEFAULT=ABI_N32" ;; esac ;;