From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from brown.birch.relay.mailchannels.net (brown.birch.relay.mailchannels.net [23.83.209.23]) by sourceware.org (Postfix) with ESMTPS id 220C83858422; Thu, 18 Nov 2021 17:54:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 220C83858422 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C1A996C0FD1; Thu, 18 Nov 2021 17:54:32 +0000 (UTC) Received: from pdx1-sub0-mail-a305.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id E074D6C191D; Thu, 18 Nov 2021 17:54:30 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a305.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.100.11.72 (trex/6.4.3); Thu, 18 Nov 2021 17:54:32 +0000 X-MC-Relay: Junk X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Squirrel-Name: 0e46819e3cad2d27_1637258072237_552431193 X-MC-Loop-Signature: 1637258072236:1081859919 X-MC-Ingress-Time: 1637258072236 Received: from [192.168.1.174] (unknown [1.186.223.33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a305.dreamhost.com (Postfix) with ESMTPSA id 4Hw6r43Mrdz2Y; Thu, 18 Nov 2021 09:54:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gotplt.org; s=gotplt.org; t=1637258070; bh=8bz8fxo37MbFsetWall1LSx7sOM=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=Kqm0uoSb5FWsW0Louq494RKk/Kf4ytPvqgbzDtFZIb05gTdrhBDnRGlTTMGNu7FBy dOl8HlpcsxE/CBHdOmVBk1fu2/TrEzrlXwQmUKfxf1bAN91/KqDLgbwRxR03lkem4Q zK5ZV5HQ+pqZW7rBEzqXk74O2f3Ezm0RNWbRNpwI= Message-ID: <838b41ee-3cbc-6ae7-0798-d2659abcea87@gotplt.org> Date: Thu, 18 Nov 2021 23:24:23 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH] New option --enable-pie-programs Content-Language: en-US To: "H.J. Lu" Cc: Adhemerval Zanella , Florian Weimer , Siddhesh Poyarekar , GNU C Library References: <20211116135240.3092651-1-siddhesh@sourceware.org> <87czn0cicn.fsf@oldenburg.str.redhat.com> <875ysr9nwo.fsf@oldenburg.str.redhat.com> <87wnl787vg.fsf@oldenburg.str.redhat.com> <4e9ac2de-aa3d-d9bf-c838-74e8fb59ead5@sourceware.org> <07d2bb89-93c7-54b0-dec6-7fdbd4e4998e@gotplt.org> <549f87ce-d3c1-c4ff-8aae-bc899668c730@gotplt.org> From: Siddhesh Poyarekar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3032.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2021 17:54:37 -0000 On 11/18/21 22:26, H.J. Lu wrote: > On Thu, Nov 18, 2021 at 8:49 AM Siddhesh Poyarekar wrote: >> >> On 11/18/21 22:14, H.J. Lu wrote: >>> --enable-pie means --disable-pie which looks odd since PIE isn't really >>> disabled, just isn't the default. But I don't feel it very strongly. As for >> >> Ahh then the option you suggested is actually different, in that >> --enable-default-pie=no doesn't actually disable PIE for default-PIE >> toolchains. That is, it is similar to the --enable-pie-programs option >> I implemented with the added functionality of transparently enabling >> static-pie. Have I understood that correctly? >> > > I am not sure. --enable-default-pie and --disable-default-pie should > be independent of compilers, except for static PIE. If compiler supports > static PIE, --enable-default-pie implies --enable-static-pie. > How do you see --disable-default-pie behaving with a compiler that produces PIE by default? That is, in case where libc_cv_cc_default_pie=yes? Should it add -fno-pie or leave it as is? Siddhesh