Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] sudo: honor target cflags/ldflags
Date: Mon, 8 May 2017 12:30:51 +0200	[thread overview]
Message-ID: <20170508123051.5862946b@free-electrons.com> (raw)
In-Reply-To: <1494231273-6554-1-git-send-email-p.debruijn@unilogic.nl>

Hello,

On Mon,  8 May 2017 10:14:33 +0200, Pascal de Bruijn wrote:
> sudo would previously have not been build using flags passed
> via BR2_TARGET_OPTIMIZATION.
> 
> in our case -fPIE was being ignored.
> 
> Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl>
> ---
>  package/sudo/sudo.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk
> index 0fcd740..dc15b4f 100644
> --- a/package/sudo/sudo.mk
> +++ b/package/sudo/sudo.mk
> @@ -10,6 +10,7 @@ SUDO_LICENSE = ISC, BSD-3-Clause
>  SUDO_LICENSE_FILES = doc/LICENSE
>  # This is to avoid sudo's make install from chown()ing files which fails
>  SUDO_INSTALL_TARGET_OPTS = INSTALL_OWNER="" DESTDIR="$(TARGET_DIR)" install
> +SUDO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)"

I don't see how this can fix anything, because CFLAGS/LDFLAGS are part
of  TARGET_CONFIGURE_OPTS, which is already passed in the environment
when calling ./configure. From package/pkg-autotools.mk:

define $(2)_CONFIGURE_CMDS
        (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \
        $$(TARGET_CONFIGURE_OPTS) \
        $$(TARGET_CONFIGURE_ARGS) \
        $$($$(PKG)_CONF_ENV) \
        CONFIG_SITE=/dev/null \
        ./configure \

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

      reply	other threads:[~2017-05-08 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08  8:14 [Buildroot] [PATCH] sudo: honor target cflags/ldflags Pascal de Bruijn
2017-05-08 10:30 ` Thomas Petazzoni [this message]

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=20170508123051.5862946b@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.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