[OpenWrt-Devel] [PATCH] grub2: disable stack-protector

Jonas Gorski jogo at openwrt.org
Wed Jun 10 06:11:51 EDT 2015


Hi,

On Tue, Jun 9, 2015 at 12:14 PM, Dirk Neukirchen <dirkneukirchen at web.de> wrote:
> - enabling "-fstack-protector" results in build errors
> - Upstream explicitly tests & disables it
>
> reference: upstream commit baa2a121e004a95a12e2bb7f2419de6625a30c2d
>
> Signed-off-by: Dirk Neukirchen <dirkneukirchen at web.de>
> ---
>  package/boot/grub2/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
> index 64a3058..ca59a87 100644
> --- a/package/boot/grub2/Makefile
> +++ b/package/boot/grub2/Makefile
> @@ -43,6 +43,10 @@ define Package/grub2-editenv/description
>         Edit grub2 environment files.
>  endef
>
> +ifeq ($(strip $(PKG_CC_STACKPROTECTOR_REGULAR)),1)
> +  TARGET_CFLAGS := $(filter-out -fstack-protector,$(TARGET_CFLAGS))
> +endif
> +

Why not just filter it out unconditionally? If -fstack-protecor isn't
present in the CFLAGS it's just a nop.


Regards
Jonas
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list