Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] package/libva: bump version to 2.2.0
Date: Sat, 14 Jul 2018 22:11:02 +0200	[thread overview]
Message-ID: <20180714221102.3f88c992@windsurf> (raw)
In-Reply-To: <20180714105513.16687-1-bernd.kuhls@t-online.de>

Hello,

On Sat, 14 Jul 2018 12:55:11 +0200, Bernd Kuhls wrote:

> +define LIBVA_DISABLE_STACK_PROTECTOR
> +	$(SED) 's%-fstack-protector%%' $(@D)/va/Makefile
> +endef
> +
> +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
> +LIBVA_POST_CONFIGURE_HOOKS += LIBVA_DISABLE_STACK_PROTECTOR
> +endif

Please fix this properly, by adding an autoconf check testing if
-fstack-protector is available and/or making sure CFLAGS passed in the
environment are properly taken into account.

Here is an example that tests the availability of -fstack-protector in
autoconf (taken from the rpm package) :

if test "$GCC" = yes; then
    cflags_to_try="-fno-strict-aliasing -fstack-protector -Wempty-body"
    AC_MSG_CHECKING([supported compiler flags])
    old_cflags=$CFLAGS
    echo
    for flag in $cflags_to_try; do
        CFLAGS="$CFLAGS $flag -Werror"
        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])],[
                echo "   $flag"
                RPMCFLAGS="$RPMCFLAGS $flag"
        ],[])
        CFLAGS=$old_cflags
    done
    CFLAGS="$CFLAGS -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes $RPMCFLAGS"
fi

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2018-07-14 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14 10:55 [Buildroot] [PATCH 1/3] package/libva: bump version to 2.2.0 Bernd Kuhls
2018-07-14 10:55 ` [Buildroot] [PATCH 2/3] package/libva-intel-driver: " Bernd Kuhls
2018-07-14 10:55 ` [Buildroot] [PATCH 3/3] package/libva-utils: " Bernd Kuhls
2018-07-14 20:11 ` Thomas Petazzoni [this message]
2018-07-28 22:23   ` [Buildroot] [PATCH 1/3] package/libva: " Bernd Kuhls

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180714221102.3f88c992@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox