From: Rongqing Li <rongqing.li@windriver.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH][v4] mmc-utils: fix the building failure when DEBUG_BUILD is 1
Date: Thu, 25 Jun 2015 14:59:07 +0800 [thread overview]
Message-ID: <558BA6BB.10301@windriver.com> (raw)
In-Reply-To: <CAJTo0LZx+nUqwQKwGcO7G7xHHQkYF0Gp8p2bsGageFKLcM74Lw@mail.gmail.com>
On 2015年06月24日 22:16, Burton, Ross wrote:
>
> On 24 June 2015 at 02:42, Rongqing Li <rongqing.li@windriver.com
> <mailto:rongqing.li@windriver.com>> wrote:
>
> #warning _FORTIFY_SOURCE requires compiling with optimization (-O)
> [-Werror=cpp]
> | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
>
>
> So security_flags and debug build are mutually exclusive, and no amount
> of fixing recipes one by one will fix that. This is a compiler warning
> (presumably the result being that fortify isn't enabled in debug builds)
> that the mmc-utils build is treating as an error, so a more reasonable
> fix would be to remove -Werror from the build which is a reasonable
> thing to do - only the developer of software should use -Werror as it
> causes untold amounts of pain on everyone else if something changes
> (say, gcc adds a new warning).
>
> Ross
How about the below patch
From 6de0180f5332880195e315fdaf4899406dc54d99 Mon Sep 17 00:00:00 2001
From: Roy Li <rongqing.li@windriver.com>
Date: Thu, 25 Jun 2015 14:44:05 +0800
Subject: [PATCH] mmc-utils: fix the building failure when DEBUG_BUILD is 1
AM_CFLAGS in Makefile includes -D_FORTIFY_SOURCE=2 which will lead
to building failure when DEBUG_BUILD is 1.
Cancel the definition of _FORTIFY_SOURCE by passing -U_FORTIFY_SOURCE
via TARGET_CPPFLAGS; this does not effect the security cflags usage,
since the cflags is equal to:
CFLAGS="${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION} ${SECURITY_CFLAGS}"
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
meta/recipes-devtools/mmc/mmc-utils_git.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb
b/meta/recipes-devtools/mmc/mmc-utils_git.bb
index bdb4fed..976bdf8 100644
--- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -12,6 +12,7 @@ SRC_URI =
"git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branc
file://0001-mmc.h-don-t-include-asm-generic-int-ll64.h.patch"
S = "${WORKDIR}/git"
+TARGET_CPPFLAGS += "-U_FORTIFY_SOURCE"
do_install() {
install -d ${D}${bindir}
--
1.9.1
next prev parent reply other threads:[~2015-06-25 6:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 1:24 [PATCH][v4] mmc-utils: fix the building failure when DEBUG_BUILD is 1 rongqing.li
2015-06-10 8:58 ` Rongqing Li
2015-06-18 9:12 ` Rongqing Li
2015-06-23 11:23 ` Burton, Ross
2015-06-24 1:42 ` Rongqing Li
2015-06-24 14:16 ` Burton, Ross
2015-06-25 6:59 ` Rongqing Li [this message]
2015-06-25 9:30 ` Burton, Ross
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=558BA6BB.10301@windriver.com \
--to=rongqing.li@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.