[oe-commits] [meta-openembedded] 03/15: meta-networking: override SECURITY_CFLAGS for c-ares

git at git.openembedded.org git at git.openembedded.org
Sun Aug 7 19:37:51 UTC 2016


joe_macdonald pushed a commit to branch master
in repository meta-openembedded.

commit abf5445c1ae2f4f89fdc77b6194309d2c4588855
Author: André Draszik <adraszik at tycoint.com>
AuthorDate: Mon Jul 18 09:02:48 2016 +0100

    meta-networking: override SECURITY_CFLAGS for c-ares
    
    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 at tycoint.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
---
 .../conf/distro/include/meta_networking_security_flags.inc          | 6 ++++++
 meta-networking/conf/layer.conf                                     | 3 +++
 2 files changed, 9 insertions(+)

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}"
diff --git a/meta-networking/conf/layer.conf b/meta-networking/conf/layer.conf
index 5fd636a..c09ba4a 100644
--- a/meta-networking/conf/layer.conf
+++ b/meta-networking/conf/layer.conf
@@ -21,3 +21,6 @@ LICENSE_PATH += "${LAYERDIR}/licenses"
 
 # used by waf-samba.bbclass
 WAF_CROSS_ANSWERS_PATH = "${LAYERDIR}/files/waf-cross-answers"
+
+# Override security flags
+require conf/distro/include/meta_networking_security_flags.inc

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list