Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] mmc-utils: fix the building failure when DEBUG_BUILD is 1
@ 2015-04-23  3:18 rongqing.li
  2015-05-04  1:34 ` Rongqing Li
  2015-05-05 15:43 ` Burton, Ross
  0 siblings, 2 replies; 4+ messages in thread
From: rongqing.li @ 2015-04-23  3:18 UTC (permalink / raw)
  To: openembedded-core

From: Roy Li <rongqing.li@windriver.com>

Remove -D_FORTIFY_SOURCE=2 from AM_CFLAGS when DEBUG_BUILD is 1

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 meta/recipes-devtools/mmc/mmc-utils_git.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb b/meta/recipes-devtools/mmc/mmc-utils_git.bb
index bdb4fed..2b61745 100644
--- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -13,6 +13,9 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branc
 
 S = "${WORKDIR}/git"
 
+export FORITY="${@base_conditional( "DEBUG_BUILD", "1", "", "-D_FORTIFY_SOURCE=2", d )}"
+EXTRA_OEMAKE = 'AM_CFLAGS="-D_FILE_OFFSET_BITS=64 ${FORITY}"'
+
 do_install() {
     install -d ${D}${bindir}
     install -m 0755 mmc ${D}${bindir}
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc-utils: fix the building failure when DEBUG_BUILD is 1
  2015-04-23  3:18 [PATCH] mmc-utils: fix the building failure when DEBUG_BUILD is 1 rongqing.li
@ 2015-05-04  1:34 ` Rongqing Li
  2015-05-05 15:43 ` Burton, Ross
  1 sibling, 0 replies; 4+ messages in thread
From: Rongqing Li @ 2015-05-04  1:34 UTC (permalink / raw)
  To: openembedded-core

ping

-R

On 2015年04月23日 11:18, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> Remove -D_FORTIFY_SOURCE=2 from AM_CFLAGS when DEBUG_BUILD is 1
>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>   meta/recipes-devtools/mmc/mmc-utils_git.bb | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb b/meta/recipes-devtools/mmc/mmc-utils_git.bb
> index bdb4fed..2b61745 100644
> --- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
> +++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
> @@ -13,6 +13,9 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branc
>
>   S = "${WORKDIR}/git"
>
> +export FORITY="${@base_conditional( "DEBUG_BUILD", "1", "", "-D_FORTIFY_SOURCE=2", d )}"
> +EXTRA_OEMAKE = 'AM_CFLAGS="-D_FILE_OFFSET_BITS=64 ${FORITY}"'
> +
>   do_install() {
>       install -d ${D}${bindir}
>       install -m 0755 mmc ${D}${bindir}
>

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc-utils: fix the building failure when DEBUG_BUILD is 1
  2015-04-23  3:18 [PATCH] mmc-utils: fix the building failure when DEBUG_BUILD is 1 rongqing.li
  2015-05-04  1:34 ` Rongqing Li
@ 2015-05-05 15:43 ` Burton, Ross
  2015-05-06  0:56   ` Rongqing Li
  1 sibling, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2015-05-05 15:43 UTC (permalink / raw)
  To: rongqing.li@windriver.com; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

On 23 April 2015 at 04:18, <rongqing.li@windriver.com> wrote:

> +export FORITY="${@base_conditional( "DEBUG_BUILD", "1", "",
> "-D_FORTIFY_SOURCE=2", d )}"
> +EXTRA_OEMAKE = 'AM_CFLAGS="-D_FILE_OFFSET_BITS=64 ${FORITY}"'
>

"FORTIFY" not "FORITY", and why does that need to be exported?

I'm also curious as to why fortify and debug builds are incompatible, and
if there's a sufficient number of problems should we just disable fortify
in security_flags.inc when debug builds are enabled?

Ross

[-- Attachment #2: Type: text/html, Size: 1074 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc-utils: fix the building failure when DEBUG_BUILD is 1
  2015-05-05 15:43 ` Burton, Ross
@ 2015-05-06  0:56   ` Rongqing Li
  0 siblings, 0 replies; 4+ messages in thread
From: Rongqing Li @ 2015-05-06  0:56 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core



On 2015年05月05日 23:43, Burton, Ross wrote:
>
> On 23 April 2015 at 04:18, <rongqing.li@windriver.com
> <mailto:rongqing.li@windriver.com>> wrote:
>
>     +export FORITY="${@base_conditional( "DEBUG_BUILD", "1", "",
>     "-D_FORTIFY_SOURCE=2", d )}"
>     +EXTRA_OEMAKE = 'AM_CFLAGS="-D_FILE_OFFSET_BITS=64 ${FORITY}"'
>
>
> "FORTIFY" not "FORITY", and why does that need to be exported?
>

typos, but it still fix the building failure.


> I'm also curious as to why fortify and debug builds are incompatible,
> and if there's a sufficient number of problems should we just disable
> fortify in security_flags.inc when debug builds are enabled?
>

the mmc-utils always uses the _FORTIFY_SOURCE, so we
need to override AM_CFLAGS to remove FORTIFY.


mmc-utils/git$ grep AM_CFLAGS Makefile
AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
override CFLAGS := $(CHECKFLAGS) $(AM_CFLAGS) $(CFLAGS)
mmc-utils/git$


-Roy

> Ross

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-06  0:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23  3:18 [PATCH] mmc-utils: fix the building failure when DEBUG_BUILD is 1 rongqing.li
2015-05-04  1:34 ` Rongqing Li
2015-05-05 15:43 ` Burton, Ross
2015-05-06  0:56   ` Rongqing Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox