All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gcc: Make it possbile for armcc and gcc to coexist.
@ 2012-07-26  8:11 Martin Ertsaas
  2012-07-27 10:18 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Ertsaas @ 2012-07-26  8:11 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Martin Ertsaas <mertsas@cisco.com>
---
 meta/recipes-devtools/gcc/gcc-4.7.inc              |    2 +-
 .../gcc/gcc-4.7/armcc-coexistence.patch.txt        |   12 ++++++++++++
 .../recipes-devtools/gcc/gcc-configure-runtime.inc |    6 ++++++
 3 files changed, 19 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.7/armcc-coexistence.patch.txt

diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc
index 43d77ec..709d7d8 100644
--- a/meta/recipes-devtools/gcc/gcc-4.7.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r7"
+PR = "r8"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.7.1
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/armcc-coexistence.patch.txt b/meta/recipes-devtools/gcc/gcc-4.7/armcc-coexistence.patch.txt
new file mode 100644
index 0000000..61c04ac
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.7/armcc-coexistence.patch.txt
@@ -0,0 +1,12 @@
+--- /usr/local/oecore-x86_64/sysroots/armv7ahf-vfp-neon-nimbus-linux-gnueabi/usr/include/c++/OE_TARGET_SYS/bits/c++config.h~	2012-06-15 11:47:57.000000000 +0200
++++ /usr/local/oecore-x86_64/sysroots/armv7ahf-vfp-neon-nimbus-linux-gnueabi/usr/include/c++/OE_TARGET_SYS/bits/c++config.h	2012-06-29 11:57:10.000000000 +0200
+@@ -1147,7 +1147,9 @@ namespace std
+ /* #undef _GLIBCXX_VERSION */
+ 
+ /* Define if the compiler supports C++11 atomics. */
++#ifndef __ARMCC_VERSION
+ #define _GLIBCXX_ATOMIC_BUILTINS 1
++#endif
+ 
+ /* Define to use concept checking code from the boost libraries. */
+ /* #undef _GLIBCXX_CONCEPT_CHECKS */
diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
index d40383c..cdb69bf 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -2,6 +2,8 @@ require gcc-configure-common.inc
 
 CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
 
+SRC_URI += "file://armcc-coexistence.patch.txt"
+
 EXTRA_OECONF_PATHS = " \
     --with-gxx-include-dir=${includedir}/c++/ \
     --with-sysroot=${STAGING_DIR_TARGET} \
@@ -49,6 +51,10 @@ do_install () {
 			rmdir --ignore-fail-on-non-empty -p ${D}${datadir}/info
 		fi
 	done
+	cd ${D}${prefix}
+	cat ${S}/../armcc-coexistence.patch.txt \
+		| sed -e "s|OE_TARGET_SYS|${TARGET_SYS}|g" \
+		| patch -p7
 	chown -R root:root ${D}
 }
 
-- 
1.7.8.6




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

* Re: [PATCH] gcc: Make it possbile for armcc and gcc to coexist.
  2012-07-26  8:11 [PATCH] gcc: Make it possbile for armcc and gcc to coexist Martin Ertsaas
@ 2012-07-27 10:18 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2012-07-27 10:18 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, 2012-07-26 at 10:11 +0200, Martin Ertsaas wrote:
> Signed-off-by: Martin Ertsaas <mertsas@cisco.com>
> ---
>  meta/recipes-devtools/gcc/gcc-4.7.inc              |    2 +-
>  .../gcc/gcc-4.7/armcc-coexistence.patch.txt        |   12 ++++++++++++
>  .../recipes-devtools/gcc/gcc-configure-runtime.inc |    6 ++++++
>  3 files changed, 19 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-devtools/gcc/gcc-4.7/armcc-coexistence.patch.txt

I'm afraid this patch caused some build failures on the automated
regression testing. Most of the red columns on the autobuilder:

http://autobuilder.yoctoproject.org:8010/waterfall

are due to this, e.g.:

http://autobuilder.yoctoproject.org:8010/builders/nightly-non-gpl3/builds/177/steps/shell_23/logs/stdio

The problem is we share a work directory between all the gcc component
builds (gcc-cross-initial, gcc-cross-intermediate, gcc-cross, libgcc and
gcc-runtime). For this to work, they all need to have matching SRC_URIs
which is an assumption this patch breaks. We'll therefore need to find a
different way to do this. Patches should really be applied by do_patch
anyway, it confuses things not to do that as if every recipe did this,
we'd end up in a huge mess.

The patch is also missing an Upstream-Status field, author information
and a description  of what it does.

Cheers,

Richard



> diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc
> index 43d77ec..709d7d8 100644
> --- a/meta/recipes-devtools/gcc/gcc-4.7.inc
> +++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
> @@ -1,6 +1,6 @@
>  require gcc-common.inc
>  
> -PR = "r7"
> +PR = "r8"
>  
>  # Third digit in PV should be incremented after a minor release
>  # happens from this branch on gcc e.g. currently its 4.7.1
> diff --git a/meta/recipes-devtools/gcc/gcc-4.7/armcc-coexistence.patch.txt b/meta/recipes-devtools/gcc/gcc-4.7/armcc-coexistence.patch.txt
> new file mode 100644
> index 0000000..61c04ac
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc-4.7/armcc-coexistence.patch.txt
> @@ -0,0 +1,12 @@
> +--- /usr/local/oecore-x86_64/sysroots/armv7ahf-vfp-neon-nimbus-linux-gnueabi/usr/include/c++/OE_TARGET_SYS/bits/c++config.h~	2012-06-15 11:47:57.000000000 +0200
> ++++ /usr/local/oecore-x86_64/sysroots/armv7ahf-vfp-neon-nimbus-linux-gnueabi/usr/include/c++/OE_TARGET_SYS/bits/c++config.h	2012-06-29 11:57:10.000000000 +0200
> +@@ -1147,7 +1147,9 @@ namespace std
> + /* #undef _GLIBCXX_VERSION */
> + 
> + /* Define if the compiler supports C++11 atomics. */
> ++#ifndef __ARMCC_VERSION
> + #define _GLIBCXX_ATOMIC_BUILTINS 1
> ++#endif
> + 
> + /* Define to use concept checking code from the boost libraries. */
> + /* #undef _GLIBCXX_CONCEPT_CHECKS */
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> index d40383c..cdb69bf 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> @@ -2,6 +2,8 @@ require gcc-configure-common.inc
>  
>  CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
>  
> +SRC_URI += "file://armcc-coexistence.patch.txt"
> +
>  EXTRA_OECONF_PATHS = " \
>      --with-gxx-include-dir=${includedir}/c++/ \
>      --with-sysroot=${STAGING_DIR_TARGET} \
> @@ -49,6 +51,10 @@ do_install () {
>  			rmdir --ignore-fail-on-non-empty -p ${D}${datadir}/info
>  		fi
>  	done
> +	cd ${D}${prefix}
> +	cat ${S}/../armcc-coexistence.patch.txt \
> +		| sed -e "s|OE_TARGET_SYS|${TARGET_SYS}|g" \
> +		| patch -p7
>  	chown -R root:root ${D}
>  }
>  





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

end of thread, other threads:[~2012-07-27 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-26  8:11 [PATCH] gcc: Make it possbile for armcc and gcc to coexist Martin Ertsaas
2012-07-27 10:18 ` Richard Purdie

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.