public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>
Cc: libc-alpha@sourceware.org,  carlos@redhat.com
Subject: Re: [PATCH] New option --enable-pie-programs
Date: Wed, 17 Nov 2021 10:10:59 +0100	[thread overview]
Message-ID: <87wnl787vg.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <b798142a-1154-401f-a388-56769dfe047b@sourceware.org> (Siddhesh Poyarekar's message of "Wed, 17 Nov 2021 14:20:36 +0530")

* Siddhesh Poyarekar:

> On 11/17/21 14:09, Florian Weimer wrote:
>> * Siddhesh Poyarekar:
>> 
>>> 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.
>> --enable-pie-programs=no with a default-PIE toolchain still produces
>> PIE
>> programs, right?
>
> Yes, it should.  $libc_cv_pie_default is overwritten only in case of
> --enable-pie-programs=yes, otherwise it is left alone, much like 
> --enable-static-pie.

But that doesn't make sense, does it?  If the user requests non-PIE
programs, they should get that.

Thanks,
Florian


  reply	other threads:[~2021-11-17  9:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 13:52 Siddhesh Poyarekar
2021-11-16 13:58 ` Florian Weimer
2021-11-16 15:17   ` Siddhesh Poyarekar
2021-11-17  8:39     ` Florian Weimer
2021-11-17  8:50       ` Siddhesh Poyarekar
2021-11-17  9:10         ` Florian Weimer [this message]
2021-11-17 10:04           ` Siddhesh Poyarekar
2021-11-18  9:24             ` Siddhesh Poyarekar
2021-11-18 12:42               ` H.J. Lu
2021-11-18 12:49                 ` Adhemerval Zanella
2021-11-18 13:26                   ` Siddhesh Poyarekar
2021-11-18 13:41                     ` H.J. Lu
2021-11-18 16:36                       ` Siddhesh Poyarekar
2021-11-18 16:44                         ` H.J. Lu
2021-11-18 16:49                           ` Siddhesh Poyarekar
2021-11-18 16:56                             ` H.J. Lu
2021-11-18 17:54                               ` Siddhesh Poyarekar
2021-11-18 17:58                                 ` H.J. Lu
2021-11-18 18:09                                   ` Siddhesh Poyarekar
2021-11-18 18:18                                     ` H.J. Lu
2021-11-22 23:40                                       ` Fangrui Song
2021-11-24  1:04                                         ` Fāng-ruì Sòng
2021-11-24  1:27                                           ` Siddhesh Poyarekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnl787vg.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).