From patchwork Tue Dec 5 10:57:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 173963 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3346160vqy; Tue, 5 Dec 2023 02:58:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEA8uSiJ1xa2vZ/CRB+rMVrQNLXqRkLu80jjKMyY14zmjGnL5+4E7cH7nEXm696rtj5s+so X-Received: by 2002:ad4:470b:0:b0:67a:a466:2322 with SMTP id qb11-20020ad4470b000000b0067aa4662322mr1078011qvb.46.1701773906069; Tue, 05 Dec 2023 02:58:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701773906; cv=pass; d=google.com; s=arc-20160816; b=VFGwq9FrgBiMYnGtjFZ8k8WtBvqI2521DB+xce8Ugu/lARy5MmsimiQzAM0VjqZwtY upYU2aC8Agak3Cr80hVo03UUkKJSoagLHAzHzo7euZGfyaxCRs67scEwB07IyY1nP9lS StMW1fYuLqwnMgpaVJegBfWGUAcOWXkHxrjHYoV624dyXAwjkjE5X8rYFA4ioWRKwuG4 k6rpZJ1lULs9eTKM1tFlXF6GhmwOgB9K+6a+IqrfhCJnYFvebWzdOhjfTpKu9Zt87poH MDsF6z9NIsL5ibRZWIxelbusk6IDurdgsCFTFA11ea2lxc1qHeZ87syN9gMWuMAkWqO8 gkDA== 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=PGgMV6gCBzVa45MYArOA4jvC68bmz15js+T38dHaCic=; fh=J2UFU/ziSJCn5iF/3GcRN5qS3GlcOswXxzL5hH8We+Q=; b=mhDqPCQs8/cn9jWhlTVC3AMJclga+EiU1RVii33936pN5rYuYTzeUM1tllC3YIEXqI LNauqULsu1K3B7BNql4RcbW1BamLQzP0980jaSHKvZd2PpJZ/GlnEbJiLREHTkrGBN4q Lw5t7wVx7zeYxVUzVZEppwp85fgwj92+/HjPzppMVjzMAGIarox81iB7qq9c/MX0/lC+ osft35znpqO1T1cBu3FZGoK+KMKsihoXKf6zVxgi9J/Kt+tYLtTh99ZlFA55UXEvDGsE qFpvATEuXmEyarXoO4gvl25ytd7DVdjFrdcTRCvKndd2XmTdjhVh5k2icqd9q0gz7330 CLcw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bNxObZuL; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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. [8.43.85.97]) by mx.google.com with ESMTPS id y16-20020a05620a44d000b0077d89e15632si11658235qkp.75.2023.12.05.02.58.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 02:58:26 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bNxObZuL; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 B9B97384CB9D for ; Tue, 5 Dec 2023 10:58:25 +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 644C93864C5D for ; Tue, 5 Dec 2023 10:58:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 644C93864C5D 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 644C93864C5D 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=1701773883; cv=none; b=gqWEQIO46lVLHV8zmpzP8fnbMonUukxgla+rgFC4iHmtrxunErX9c5qjNYm315grxfXByQPMGfXLUuPlRlKqI4gefrIaJM0oBXOQ8d7VCeiricKLEUig6iS7yxQtLXeYdjEkExOExKudzVaDc+5VLwnXGX4QDsVM+IT4wSABu2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701773883; c=relaxed/simple; bh=bbzxZyYzmNnO5qsYjhQUyTygJLrRgOcl0qLVu7zLoYk=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=xNWBFJMk62e4WgIxa6/S4BO9NqLeu8Esy5HdDD526oaqZySGCPDF9mWh4BXNk9n41fOMe89CMShoNwE3j9mzhywcd9zhyXvaWDqYcSdqbw+AOhckbrad5w4FcFKEnRnCRyLcPliiDiI1CfwgRteo5H9Pe+B3lDdzpxA9JhWKC7Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701773881; 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=PGgMV6gCBzVa45MYArOA4jvC68bmz15js+T38dHaCic=; b=bNxObZuLosQZtkBNY8fEzdjLtU/UbibClnToB4ukO6fTifJhCqIpg2EXoOy3I/Oq3euuNT Yf54cji8sw/LNNDeeI00Rdukx//Pb3mO08g8ABzZ0/UEU3wmmh7iYqKLiMoFoDFCxqD3sA oUjhihjXXS/UK5Othji0yhV42Y9h+ho= 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-155-OLteYggcPMi8Q2DhlomTng-1; Tue, 05 Dec 2023 05:58:00 -0500 X-MC-Unique: OLteYggcPMi8Q2DhlomTng-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 EE69C101A52A; Tue, 5 Dec 2023 10:57:59 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92B903C25; Tue, 5 Dec 2023 10:57:59 +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 3B5Avu84723801 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 5 Dec 2023 11:57:57 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3B5AvtUK723800; Tue, 5 Dec 2023 11:57:55 +0100 Date: Tue, 5 Dec 2023 11:57:55 +0100 From: Jakub Jelinek To: Richard Biener , Marek Polacek Cc: gcc-patches@gcc.gnu.org, Iain Buclaw Subject: [PATCH] driver: Fix bootstrap with --enable-default-pie Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 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=ham 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: 1784439275423110530 X-GMAIL-MSGID: 1784439275423110530 Hi! On IRC Iain mentioned bootstrap is broken for him presumably since r14-5791 -fhardened addition. I think it is only a problem with --enable-default-pie when the case OPT_pie: wants to fall through into case OPT_r: and warns. Before the patch validated = true; was set up if ENABLE_DEFAULT_PIE for OPT_pie, and for -fhardened as documented I think we want to set any_link_options_p = true; for it too: /* True if -r, -shared, -pie, or -no-pie were specified on the command line. */ static bool any_link_options_p; Ok for trunk if it passes bootstrap/regtest? 2023-12-05 Jakub Jelinek * gcc.cc (driver_handle_option): Add /* FALLTHROUGH */ comment between OPT_pie and OPT_r cases. Jakub --- gcc/gcc.cc.jj 2023-12-01 08:10:43.272316590 +0100 +++ gcc/gcc.cc 2023-12-05 11:47:54.046202161 +0100 @@ -4617,6 +4617,7 @@ driver_handle_option (struct gcc_options /* -pie is turned on by default. */ validated = true; #endif + /* FALLTHROUGH */ case OPT_r: case OPT_shared: case OPT_no_pie: