From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bat.birch.relay.mailchannels.net (bat.birch.relay.mailchannels.net [23.83.209.13]) by sourceware.org (Postfix) with ESMTPS id 714233858D35 for ; Tue, 16 Nov 2021 15:18:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 714233858D35 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 0C12D922DC7; Tue, 16 Nov 2021 15:17:57 +0000 (UTC) Received: from pdx1-sub0-mail-a305.dreamhost.com (100-96-133-208.trex.outbound.svc.cluster.local [100.96.133.208]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 6EA37922D47; Tue, 16 Nov 2021 15:17:56 +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.96.133.208 (trex/6.4.3); Tue, 16 Nov 2021 15:17:56 +0000 X-MC-Relay: Junk X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Decisive-Spicy: 64ade15e559dea7d_1637075876726_1931818284 X-MC-Loop-Signature: 1637075876726:2739545157 X-MC-Ingress-Time: 1637075876726 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 4HtqSL5X2tz1Wk; Tue, 16 Nov 2021 07:17:54 -0800 (PST) Message-ID: Date: Tue, 16 Nov 2021 20:47:49 +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: Florian Weimer Cc: libc-alpha@sourceware.org, carlos@redhat.com References: <20211116135240.3092651-1-siddhesh@sourceware.org> <87czn0cicn.fsf@oldenburg.str.redhat.com> From: Siddhesh Poyarekar In-Reply-To: <87czn0cicn.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3489.5 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, 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: Tue, 16 Nov 2021 15:18:03 -0000 On 11/16/21 19:28, Florian Weimer wrote: > * Siddhesh Poyarekar: > >> Add a new option --enable-pie-programs to build tests and binaries as >> PIE. This allows building all dynamic programs in glibc (e.g. >> iconvconfig, getconf, etc.) as PIE on architectures that do not have >> -static-pie. > > Please integrate this in some way with libc_cv_cc_pie_default and > libc_cv_pie_default. Probably --enable-pie-programs should default to > yes if the toolchain defauls to PIE. AFAICT, libc_cv_cc_pie_default is only to set -fno-pie for non-PIE linking with a toolchain that defaults to pie. PIE linking otherwise is controlled accross the board with libc_cv_pie_default, which includes build-pie-default, static-pie and now pie-programs. So I reckon it is integrated; the new pie-programs variable is only to set CFLAGS to -fPIC. Siddhesh