From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id DD19C3858422; Thu, 18 Nov 2021 16:44:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD19C3858422 Received: by mail-pl1-x635.google.com with SMTP id v19so5730607plo.7; Thu, 18 Nov 2021 08:44:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o9JofqdOba9yTMGJlOUH1ZyKO5hIiThbaUOtzCCgc/s=; b=ZNYo/Y/2QppnwB+h5L5LC3dpO5xpkkXZ9Qd1tFwhJzGfeM9uxQefjtKEYn+oC2Ub4G j8W8EmfdwUhjE3ZdcZYaNduvpruBG+XTZYY+FIfgUYhOg2jSHiPTaxhVK7F3Mg2yZiSJ +kr71wa6ygtNf+vLsYkhx94WbeGes6grWaSJQP7FcaprvOTGFOKvRO4frucyQ/UPNA7m 3OihnhP87lYDkbtc4D7wrcX2q2u3/BG2iBw4xQXaegL8tgIYmYhtU1F1XmaWvCxmiv45 SzyIy3+z57fag10WJ9RVebUskjGOoJyGTeevsBQnTA2zpQzaERZc0WcYAAsQJ6SxediU F8Mg== X-Gm-Message-State: AOAM531Xf47NLVIccSbnvMeBvDtsv/imVTRzDiRp5dTZ9ZYqel7WlhSY XMgxq7EZa6q3ggKkBQpPWSU5/griExAqLqLHErc= X-Google-Smtp-Source: ABdhPJzZLUS05gQ6OBYyuLLal9D8xmwm1pANjIGSVmLNxXQiiYXDfPO84l1Ls2yGKNgxW0PoB1PhDytpr/sADw3jk/Q= X-Received: by 2002:a17:902:cecf:b0:141:e15d:4a2a with SMTP id d15-20020a170902cecf00b00141e15d4a2amr68048056plg.66.1637253886044; Thu, 18 Nov 2021 08:44:46 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <549f87ce-d3c1-c4ff-8aae-bc899668c730@gotplt.org> From: "H.J. Lu" Date: Thu, 18 Nov 2021 08:44:09 -0800 Message-ID: Subject: Re: [PATCH] New option --enable-pie-programs To: Siddhesh Poyarekar Cc: Adhemerval Zanella , Florian Weimer , Siddhesh Poyarekar , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3023.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 16:44:48 -0000 On Thu, Nov 18, 2021 at 8:37 AM Siddhesh Poyarekar wrote: > > On 11/18/21 19:11, H.J. Lu wrote: > >> HJ, could you describe how you'd expect it to behave? Would it map to > >> any of the options I describe above? > > > > --enable-default-pie builds all dynamic programs, including tests, as PIE. If > > compiler/target supports static PIE, it also builds static programs as PIE. > > OK I guess there's close to consensus on a single flag that enables > dynamic PIE and if supported by the target, transparently enable > static-pie as well. So next question: is it OK to enable by default and > require users to specify --enable-pie=no to disable PIE? > > Also, would you be OK with calling it --enable-pie HJ? Or do you feel --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 the default, I believe it should be NO to avoid any surprises. > strongly about calling it --enable-default-pie? Same question for > Adhemerval; I am OK with calling it --enable-cake fwiw ;) > > Thanks, > Siddhesh -- H.J.