This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 03/12] Mark all machinery needed in early static-link init as -fno-stack-protector.
- From: Nick Alcock <nick dot alcock at oracle dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 15 Dec 2016 14:21:42 +0000
- Subject: Re: [PATCH 03/12] Mark all machinery needed in early static-link init as -fno-stack-protector.
- Authentication-results: sourceware.org; auth=none
- References: <20161128123228.30856-1-nix@esperi.org.uk> <20161128123228.30856-4-nix@esperi.org.uk> <33cf777d-28a1-b551-7a32-fda553a7bc4b@redhat.com>
On 15 Dec 2016, Florian Weimer outgrape:
> On 11/28/2016 01:32 PM, Nix wrote:
>> diff --git a/csu/Makefile b/csu/Makefile
>> index 31e8bb9..22afe67 100644
>> --- a/csu/Makefile
>> +++ b/csu/Makefile
>> @@ -45,6 +45,11 @@ before-compile += $(objpfx)version-info.h
>> tests := tst-empty tst-atomic tst-atomic-long
>> tests-static := tst-empty
>>
>> +CFLAGS-.o += $(no-stack-protector)
>
> This also applies to the tests in the csu subdirectory, which is probably not what we want.
Definitely not!
> We have two options here: List the .c source files explicitly (like you do in string/), or move the test to a different subdirectory
> (perhaps misc/ or stdlib/). In the second case, there should be an empty “tests” variable assignment in csu/Makefile which
> documents why there can't be any tests in this subdirectory.
Listing explicitly seems likely to be horrifically hard to maintain. I'm
not even sure how many .o's there *are* that this would apply to.
Is there really no way to say 'add these flags to all the tests' so we
can add a $(stack-protector) to that?
--
NULL && (void)