Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: "André Draszik" <git@andred.net>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-networking][PATCH v2 2/2] meta-networking: override SECURITY_CFLAGS for c-ares
Date: Mon, 18 Jul 2016 10:37:24 +0100	[thread overview]
Message-ID: <1468834644.4658.4.camel@andred.net> (raw)
In-Reply-To: <CAMKF1spStNbUubBvO1DLq86wdHRVbGvOVB7LRUVa2be0Mdes3Q@mail.gmail.com>

On Mo, 2016-07-18 at 08:16 +0000, Khem Raj wrote:
> On Mon, Jul 18, 2016 at 1:03 AM <git@andred.net> wrote:
> 
> > 
> > From: André Draszik <adraszik@tycoint.com>
> > 
> > c-ares doesn't build if the distro has enabled usage of the
> > security_flags.inc file as it is picky about what is placed
> > into CPPFLAGS and CFLAGS. It complains and errors out if any
> > preprocessor options appear in CFLAGS.
> > 
> > Fix this by providing an additional include file that is
> > require'd from conf/layer.conf which for c-ares moves the
> > defines added by security_flags.inc from CFLAGS to CPPFLAGS.
> > 
> > Signed-off-by: André Draszik <adraszik@tycoint.com>
> > ---
> >  .../conf/distro/include/meta_networking_security_flags.inc          | 6
> > ++++++
> >  meta-networking/conf/layer.conf                                     | 3
> > +++
> >  2 files changed, 9 insertions(+)
> >  create mode 100644
> > meta-networking/conf/distro/include/meta_networking_security_flags.inc
> > 
> > diff --git
> > a/meta-networking/conf/distro/include/meta_networking_security_flags.inc
> > b/meta-networking/conf/distro/include/meta_networking_security_flags.inc
> > new file mode 100644
> > index 0000000..06802d6
> > --- /dev/null
> > +++
> > b/meta-networking/conf/distro/include/meta_networking_security_flags.inc
> > @@ -0,0 +1,6 @@
> > +# configure righteously complains:
> > +# | configure:3479: using CFLAGS:  -O2 -pipe -g
> > -feliminate-unused-debug-types -fstack-protector-strong -pie -fpie
> > -D_FORTIFY_SOURCE=2
> > +# | configure:3485: CFLAGS error: CFLAGS may only be used to specify C
> > compiler flags, not macro definitions. Use CPPFLAGS for:
> > -D_FORTIFY_SOURCE=2
> > +# | configure:3516: error: Can not continue. Fix errors mentioned
> > immediately above this line.
> > +TARGET_CFLAGS_remove_pn-c-ares = "${lcl_maybe_fortify}"
> > +TARGET_CPPFLAGS_append_pn-c-ares = "${lcl_maybe_fortify}"
> > 
> 
> will
> 
> lcl_maybe_fortify_pn-c-area = ""
> 
> work ?

But that would remove -D_FORTIFY_SOURCE=2 completely...

I don't want to remove it, I just want to move it from CFLAGS to CPPFLAGS,
without adding further knowledge here about  what else is in
SECURITY_CFLAGS.

a.



      parent reply	other threads:[~2016-07-18  9:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18  8:02 [meta-networking][PATCH v2 1/2] c-ares: use our compilation flags git
2016-07-18  8:02 ` [meta-networking][PATCH v2 2/2] meta-networking: override SECURITY_CFLAGS for c-ares git
2016-07-18  8:16   ` Khem Raj
2016-07-18  8:37     ` Andre McCurdy
2016-07-18  9:46       ` André Draszik
2016-07-18  9:52         ` Khem Raj
2016-07-21 14:56           ` André Draszik
2016-07-18  9:37     ` André Draszik [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=1468834644.4658.4.camel@andred.net \
    --to=git@andred.net \
    --cc=openembedded-devel@lists.openembedded.org \
    /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