[PATCH] D42825: Fix typo: --nopie -> --no-pie.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 15:16:40 PST 2018


I was looking at the openbsd src and ports repos.

My point was that since there seem to be a total of 85 occurrences of
this option, openbsd is probably in a good place to change it to use the
spelling that is supported in all linkers.

Cheers,
Rafael


Rui Ueyama <ruiu at google.com> writes:

> I was thinking that -nopie is an OpenBSD-local extension, but does that
> mean FreeBSD also accept that flag?
>
> Can you give me a list of occurrences of -nopie in ports?
>
> On Mon, Feb 19, 2018 at 8:16 PM, Rafael Avila de Espindola <
> rafael.espindola at gmail.com> wrote:
>
>> Running
>>
>> git grep -- -nopie
>>
>> finds 50 lines in src and 35 in ports.
>>
>> Cheers,
>> Rafael
>>
>> Brad Smith <brad at comstyle.com> writes:
>>
>> > No.
>> >
>> > On 2/16/2018 11:22 PM, Rui Ueyama wrote:
>> >> Can you start using --no-pie instead of -nopie in OpenBSD?
>> >>
>> >> On Fri, Feb 16, 2018 at 8:18 PM, Brad Smith <brad at comstyle.com
>> >> <mailto:brad at comstyle.com>> wrote:
>> >>
>> >>     This breaks lld on OpenBSD. The command line parameter was taken
>> >>     from our linker which we've been using for almost 6 years.
>> >>
>> >>
>> >>     On 2/16/2018 11:10 PM, Rui Ueyama wrote:
>> >>>     If you give "-nopie" (with single leading hyphen) to gold, it
>> >>>     looks like gold interprets it as "-n -o pie". So, it doesn't
>> >>>     print out any error message, and it silently sets the output file
>> >>>     name to "pie", which is I think worse than reporting an error on
>> >>>     "-nopie".
>> >>>
>> >>>     On Fri, Feb 16, 2018 at 7:59 PM, Rui Ueyama <ruiu at google.com
>> >>>     <mailto:ruiu at google.com>> wrote:
>> >>>
>> >>>         Can you explain why you think so?
>> >>>
>> >>>         $ ld.gold --no-pie
>> >>>         ld.gold: fatal error: no input files
>> >>>
>> >>>         $ ld.gold --nopie
>> >>>         ld.gold: --nopie: unknown option
>> >>>         ld.gold: use the --help option for usage information
>> >>>
>> >>>         $ ld.bfd --no-pie
>> >>>         ld.bfd: unrecognized option '--no-pie'
>> >>>         ld.bfd: use the --help option for usage information
>> >>>
>> >>>         $ ld.bfd --nopie
>> >>>         ld.bfd: unrecognized option '--nopie'
>> >>>         ld.bfd: use the --help option for usage information
>> >>>
>> >>>         On Fri, Feb 16, 2018 at 7:55 PM, Brad Smith via Phabricator
>> >>>         <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>>
>> >>>         wrote:
>> >>>
>> >>>             brad added a comment.
>> >>>             Herald added a subscriber: arichardson.
>> >>>
>> >>>             This was NOT a typo.
>> >>>
>> >>>
>> >>>             Repository:
>> >>>               rLLD LLVM Linker
>> >>>
>> >>>             https://reviews.llvm.org/D42825
>> >>>             <https://reviews.llvm.org/D42825>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>>


More information about the llvm-commits mailing list