Skip to contentSkip to conversation

gcc 4.7/gcc 4.8 fails when libunwind is built first

PATCH New Mark Hatle 2 participants 3 messages May 31, 2013

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

PATCH 1/1 gcc 4.7/gcc 4.8 fails when libunwind is built first

Recently Marcin Juszkiewicz reported an issues w/ gcc 4.8 when libunwind was built first. This sounded familar when I encountered the same problem.

Back in February Roy Li found the same problem w/ gcc_4.7 and submitted a fix for the issue. I've updated this fix for both gcc 4.7 and gcc 4.8.

I tested this and it does resolve the issue for me.

Roy.Li (1):
gcc: add build directory to include directories

 meta/recipes-devtools/gcc/gcc_4.7.bb | 2 +-
 meta/recipes-devtools/gcc/gcc_4.8.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.rc1.25.g423ecb0
author
#1 lore raw

PATCH 1/1 gcc: add build directory to include directories

From: "Roy.Li" <[email protected]>

[ CQID: WIND00386962 ]

Add build directory to include directories by -I${B}/include which will be searched before standard system include directories.

Both libunwind and gcc supply unwind.h, once gcc use libunwind's unwind.h, the compiling will fail.

This patch is generally not applicable to the upstream as they do not use libunwind.

(LOCAL REV: NOT UPSTREAM)

---
 meta/recipes-devtools/gcc/gcc_4.7.bb | 2 +-
 meta/recipes-devtools/gcc/gcc_4.8.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/gcc/gcc_4.7.bb +1 -1
index 9954375..f68c67a 100644
@@ -2,4 +2,4 @@ require recipes-devtools/gcc/gcc-${PV}.inc
 require gcc-configure-target.inc
 require gcc-package-target.inc
 
-ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR} -I${B}/gcc/include/ "
meta/recipes-devtools/gcc/gcc_4.8.bb +1 -1
index 9954375..f68c67a 100644
@@ -2,4 +2,4 @@ require recipes-devtools/gcc/gcc-${PV}.inc
 require gcc-configure-target.inc
 require gcc-package-target.inc
 
-ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR} -I${B}/gcc/include/ "
Signature · 1 line
1.8.3.rc1.25.g423ecb0
Acked-by on v1 1/1
#2 lore raw

Re: [PATCH] gcc: add build directory to include directories

W dniu 31.05.2013 17:54, Mark Hatle pisze:

Quoted 10 lines

From: "Roy.Li" <[email protected]>

[ CQID: WIND00386962 ]

Add build directory to include directories by -I${B}/include which will be searched before standard system include directories.

Both libunwind and gcc supply unwind.h, once gcc use libunwind's unwind.h, the compiling will fail.

Quoted 8 lines

This patch is generally not applicable to the upstream as they do not use libunwind.

(LOCAL REV: NOT UPSTREAM)

It works! Thanks a lot guys.