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

Matthew Weber matthew.weber at rockwellcollins.com
Mon Apr 30 17:57:00 UTC 2018


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.


More information about the buildroot mailing list