[Buildroot] [PATCH 3/4] package/Makefile.in: Remove RELRO linker flags from CFLAGS

Matthew Weber matthew.weber at rockwellcollins.com
Tue May 1 15:05:36 UTC 2018


Stefan,

On Mon, Apr 30, 2018 at 12:57 PM, Matthew Weber
<matthew.weber at rockwellcollins.com> wrote:
> Stefan,
>
> On Wed, Apr 25, 2018 at 1:45 AM, Stefan Sørensen
> <stefan.sorensen at spectralink.com> wrote:
>> The RELRO related flags are for the linker, not the compiler, so they belong
>> in LDFLAGS.
>>
>> Signed-off-by: Stefan Sørensen <stefan.sorensen at spectralink.com>
>> ---
>>  package/Makefile.in | 10 +++-------
>>  1 file changed, 3 insertions(+), 7 deletions(-)
>>
>> diff --git a/package/Makefile.in b/package/Makefile.in
>> index 1cbf34e0df..4525b8e79f 100644
>> --- a/package/Makefile.in
>> +++ b/package/Makefile.in
>> @@ -141,9 +141,6 @@ ifeq ($(BR2_DEBUG_3),y)
>>  TARGET_DEBUGGING = -g3
>>  endif
>>
>> -TARGET_CFLAGS_RELRO = -Wl,-z,relro
>> -TARGET_CFLAGS_RELRO_FULL = -Wl,-z,now $(TARGET_CFLAGS_RELRO)
>> -
>
> If you remove these flags from CFLAGS then packages that link with gcc
> vs explicitly ld won't get the flag.

Suggest dropping this patch as we want to maintain the ability for gcc
to use flags when linking an executable directly.

Matt


More information about the buildroot mailing list