Patchwork [meta-oe/denzil,4/6] gcc-4.5: Match with OE-Core on building procedure for libgcc and gcc-runtime

login
register
mail settings
Submitter Koen Kooi
Date May 2, 2012, 9:45 a.m.
Message ID <1335951932-6143-4-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/26807/
State New, archived
Headers show

Comments

Koen Kooi - May 2, 2012, 9:45 a.m.
From: Khem Raj <raj.khem@gmail.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Tested-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb |   47 +++++++++++++++-----
 1 file changed, 36 insertions(+), 11 deletions(-)
Martin Jansa - May 2, 2012, 9:51 a.m.
On Wed, May 02, 2012 at 11:45:30AM +0200, Koen Kooi wrote:
> From: Khem Raj <raj.khem@gmail.com>

I'm not using gcc-4.5, but aren't those 3 patches only for master? As
gcc-4.7 and other gcc changes were in oe-core only after release AFAIK.

Cheers,

> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Tested-by: Denys Dmytriyenko <denys@ti.com>
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb |   47 +++++++++++++++-----
>  1 file changed, 36 insertions(+), 11 deletions(-)
> 
> diff --git a/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb b/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
> index 1579c8b..ecef5e7 100644
> --- a/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
> +++ b/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
> @@ -1,33 +1,46 @@
>  require recipes-devtools/gcc/gcc-${PV}.inc
>  
> -
>  INHIBIT_DEFAULT_DEPS = "1"
> +
>  DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
>  
>  PACKAGES = "\
>    ${PN} \
>    ${PN}-dev \
> +  ${PN}-dbg \
> +  libgcov-dev \
>    "
>  
>  FILES_${PN} = "${base_libdir}/libgcc*.so.*"
>  FILES_${PN}-dev = " \
>    ${base_libdir}/libgcc*.so \
>    ${libdir}/${TARGET_SYS}/${BINV}/crt* \
> -  ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
>    ${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
> +FILES_libgcov-dev = " \
> +  ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a"
>  
> -do_fetch[noexec] = "1"
> -do_unpack[noexec] = "1"
> -do_patch[noexec] = "1"
> -do_configure[noexec] = "1"
> -do_compile[noexec] = "1"
> +FILES_${PN}-dbg += "${base_libdir}/.debug/"
>  
> -do_install () {
> +do_configure () {
>  	target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
> -
> -	# Install libgcc from our gcc-cross saved data
>  	install -d ${D}${base_libdir} ${D}${libdir}
> -	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D}
> +	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
> +	mkdir -p ${B}/${PN}
> +	cd ${B}/${PN}
> +	chmod a+x ${S}/${PN}/configure
> +	${S}/${PN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
> +}
> +
> +do_compile () {
> +	target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
> +	cd ${B}/${PN}
> +	oe_runmake MULTIBUILDTOP=${B}/$target/${PN}/
> +}
> +
> +do_install () {
> +	target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
> +	cd ${B}/${PN}
> +	oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${PN}/ install
>  
>  	# Move libgcc_s into /lib
>  	mkdir -p ${D}${base_libdir}
> @@ -36,7 +49,19 @@ do_install () {
>  	else
>  		mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
>  	fi
> +
> +	# install the runtime in /usr/lib/ not in /usr/lib/gcc on target
> +	# so that cross-gcc can find it in the sysroot
> +
> +	mv ${D}${libdir}/gcc/* ${D}${libdir}
> +	rm -rf ${D}${libdir}/gcc/
>  }
>  
> +do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package"
> +do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_package"
> +do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_package"
> +
>  BBCLASSEXTEND = "nativesdk"
>  
> +INSANE_SKIP_libgcc-dev = "staticdev"
> +INSANE_SKIP_libgcov-dev = "staticdev"
> -- 
> 1.7.10
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Koen Kooi - May 2, 2012, 10:33 a.m.
Op 2 mei 2012, om 11:51 heeft Martin Jansa het volgende geschreven:

> On Wed, May 02, 2012 at 11:45:30AM +0200, Koen Kooi wrote:
>> From: Khem Raj <raj.khem@gmail.com>
> 
> I'm not using gcc-4.5, but aren't those 3 patches only for master? As
> gcc-4.7 and other gcc changes were in oe-core only after release AFAIK.

I might have misunderstood the patches, but these seem to fix real issues in gcc 4.5, so I don't really care if oe-core fixed it after the release, I care about the release working :)

Anyway, if they don't work as intended, let's not apply them.

regards,

Koen
Eric BENARD - May 2, 2012, 10:35 a.m.
Hi,

Le Wed, 2 May 2012 11:51:50 +0200,
Martin Jansa <martin.jansa@gmail.com> a écrit :

> On Wed, May 02, 2012 at 11:45:30AM +0200, Koen Kooi wrote:
> > From: Khem Raj <raj.khem@gmail.com>
> 
> I'm not using gcc-4.5, but aren't those 3 patches only for master? As
> gcc-4.7 and other gcc changes were in oe-core only after release AFAIK.
> 
as I'm supposed to maintain meta-oe/denzil I would prefer that we keep a
few days before pushing patches to this branch.
I'll soon create a for-denzil branch on github to use it as a stagging
area and plan to update meta-oe/denzil once per week.

Eric
Koen Kooi - May 2, 2012, 10:45 a.m.
Op 2 mei 2012, om 12:35 heeft Eric Bénard het volgende geschreven:

> Hi,
> 
> Le Wed, 2 May 2012 11:51:50 +0200,
> Martin Jansa <martin.jansa@gmail.com> a écrit :
> 
>> On Wed, May 02, 2012 at 11:45:30AM +0200, Koen Kooi wrote:
>>> From: Khem Raj <raj.khem@gmail.com>
>> 
>> I'm not using gcc-4.5, but aren't those 3 patches only for master? As
>> gcc-4.7 and other gcc changes were in oe-core only after release AFAIK.
>> 
> as I'm supposed to maintain meta-oe/denzil I would prefer that we keep a
> few days before pushing patches to this branch.

The OE-classic release branches usually had rules like "wait at least 24 hours between post and push", so your idea makes a lot of sense.

regards,

Koen
Khem Raj - May 2, 2012, 6:14 p.m.
On Wed, May 2, 2012 at 2:51 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
>
> I'm not using gcc-4.5, but aren't those 3 patches only for master? As
> gcc-4.7 and other gcc changes were in oe-core only after release AFAIK.
>

Yes they are strictly for master to accomodate basic changes in build sequence
we did for gcc 4.7 that said, I think now that denzil has released we should
reconsider maintaining gcc 4.5 in toolchain-layer and same goes for other
recipes in the layer. Infact I feel the whole layer can be dropped.
Koen Kooi - May 2, 2012, 6:26 p.m.
Op 2 mei 2012 om 20:14 heeft Khem Raj <raj.khem@gmail.com> het volgende geschreven:

> On Wed, May 2, 2012 at 2:51 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> 
>> I'm not using gcc-4.5, but aren't those 3 patches only for master? As
>> gcc-4.7 and other gcc changes were in oe-core only after release AFAIK.
>> 
> 
> Yes they are strictly for master to accomodate basic changes in build sequence
> we did for gcc 4.7 that said, I think now that denzil has released we should
> reconsider maintaining gcc 4.5 in toolchain-layer and same goes for other
> recipes in the layer. Infact I feel the whole layer can be dropped.

I was planning to propose the same, any objections?
Martin Jansa - May 2, 2012, 6:29 p.m.
On Wed, May 02, 2012 at 08:26:49PM +0200, Koen Kooi wrote:
> 
> 
> Op 2 mei 2012 om 20:14 heeft Khem Raj <raj.khem@gmail.com> het volgende geschreven:
> 
> > On Wed, May 2, 2012 at 2:51 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> >> 
> >> I'm not using gcc-4.5, but aren't those 3 patches only for master? As
> >> gcc-4.7 and other gcc changes were in oe-core only after release AFAIK.
> >> 
> > 
> > Yes they are strictly for master to accomodate basic changes in build sequence
> > we did for gcc 4.7 that said, I think now that denzil has released we should
> > reconsider maintaining gcc 4.5 in toolchain-layer and same goes for other
> > recipes in the layer. Infact I feel the whole layer can be dropped.
> 
> I was planning to propose the same, any objections?

I've switched to gcc-4.7, so not from me.

Cheers,
Khem Raj - May 2, 2012, 9:18 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/02/2012 11:29 AM, Martin Jansa wrote:
> On Wed, May 02, 2012 at 08:26:49PM +0200, Koen Kooi wrote:
>> 
>> 
>> Op 2 mei 2012 om 20:14 heeft Khem Raj <raj.khem@gmail.com> het
>> volgende geschreven:
>> 
>>> On Wed, May 2, 2012 at 2:51 AM, Martin Jansa
>>> <martin.jansa@gmail.com> wrote:
>>>> 
>>>> I'm not using gcc-4.5, but aren't those 3 patches only for
>>>> master? As gcc-4.7 and other gcc changes were in oe-core only
>>>> after release AFAIK.
>>>> 
>>> 
>>> Yes they are strictly for master to accomodate basic changes in
>>> build sequence we did for gcc 4.7 that said, I think now that
>>> denzil has released we should reconsider maintaining gcc 4.5 in
>>> toolchain-layer and same goes for other recipes in the layer.
>>> Infact I feel the whole layer can be dropped.
>> 
>> I was planning to propose the same, any objections?
> 
> I've switched to gcc-4.7, so not from me.

good and as Koen is nodding I assume angstrom is fine too. So I think
we should drop the layer from master.

> 
> Cheers,
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+hpIoACgkQuwUzVZGdMxR1wwCfep667NaYhcoQKNuyTriVhRz4
FdwAn2sS+BlN0inqL0GsxJInP0CEnsN6
=E6x4
-----END PGP SIGNATURE-----
Denys Dmytriyenko - May 2, 2012, 10:10 p.m.
On Wed, May 02, 2012 at 02:18:02PM -0700, Khem Raj wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 05/02/2012 11:29 AM, Martin Jansa wrote:
> > On Wed, May 02, 2012 at 08:26:49PM +0200, Koen Kooi wrote:
> >> 
> >> 
> >> Op 2 mei 2012 om 20:14 heeft Khem Raj <raj.khem@gmail.com> het
> >> volgende geschreven:
> >> 
> >>> On Wed, May 2, 2012 at 2:51 AM, Martin Jansa
> >>> <martin.jansa@gmail.com> wrote:
> >>>> 
> >>>> I'm not using gcc-4.5, but aren't those 3 patches only for
> >>>> master? As gcc-4.7 and other gcc changes were in oe-core only
> >>>> after release AFAIK.
> >>>> 
> >>> 
> >>> Yes they are strictly for master to accomodate basic changes in
> >>> build sequence we did for gcc 4.7 that said, I think now that
> >>> denzil has released we should reconsider maintaining gcc 4.5 in
> >>> toolchain-layer and same goes for other recipes in the layer.
> >>> Infact I feel the whole layer can be dropped.
> >> 
> >> I was planning to propose the same, any objections?
> > 
> > I've switched to gcc-4.7, so not from me.
> 
> good and as Koen is nodding I assume angstrom is fine too. So I think
> we should drop the layer from master.

Yes, but not immediately - give one or two week notice, please :) Actually, 
this should be considered as a notice and the actual commit to remove should 
be executed later, if nobody says otherwise... Basically, sending an RFC patch 
for review that deletes gcc-4.5 and waiting few days should do it.
Khem Raj - May 3, 2012, 12:04 a.m.
On Wed, May 2, 2012 at 3:10 PM, Denys Dmytriyenko <denis@denix.org> wrote:
>> good and as Koen is nodding I assume angstrom is fine too. So I think
>> we should drop the layer from master.
>
> Yes, but not immediately - give one or two week notice, please :) Actually,
> this should be considered as a notice and the actual commit to remove should
> be executed later, if nobody says otherwise... Basically, sending an RFC patch
> for review that deletes gcc-4.5 and waiting few days should do it.

OK consider that as notice then
Martin Jansa - May 3, 2012, 5:30 a.m.
On Wed, May 02, 2012 at 05:04:42PM -0700, Khem Raj wrote:
> On Wed, May 2, 2012 at 3:10 PM, Denys Dmytriyenko <denis@denix.org> wrote:
> >> good and as Koen is nodding I assume angstrom is fine too. So I think
> >> we should drop the layer from master.
> >
> > Yes, but not immediately - give one or two week notice, please :) Actually,
> > this should be considered as a notice and the actual commit to remove should
> > be executed later, if nobody says otherwise... Basically, sending an RFC patch
> > for review that deletes gcc-4.5 and waiting few days should do it.
> 
> OK consider that as notice then

Maybe keep empty layer (without recipes) at least for a while so that
people doesn't have to update bblayers.conf immediately with next update.

Cheers,
Khem Raj - May 3, 2012, 5:38 a.m.
On Wed, May 2, 2012 at 10:30 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Wed, May 02, 2012 at 05:04:42PM -0700, Khem Raj wrote:
>> On Wed, May 2, 2012 at 3:10 PM, Denys Dmytriyenko <denis@denix.org> wrote:
>> >> good and as Koen is nodding I assume angstrom is fine too. So I think
>> >> we should drop the layer from master.
>> >
>> > Yes, but not immediately - give one or two week notice, please :) Actually,
>> > this should be considered as a notice and the actual commit to remove should
>> > be executed later, if nobody says otherwise... Basically, sending an RFC patch
>> > for review that deletes gcc-4.5 and waiting few days should do it.
>>
>> OK consider that as notice then
>
> Maybe keep empty layer (without recipes) at least for a while so that
> people doesn't have to update bblayers.conf immediately with next update.
>

ok.

> Cheers,
>
> --
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>

Patch

diff --git a/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb b/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
index 1579c8b..ecef5e7 100644
--- a/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
+++ b/toolchain-layer/recipes-devtools/gcc/libgcc_4.5.bb
@@ -1,33 +1,46 @@ 
 require recipes-devtools/gcc/gcc-${PV}.inc
 
-
 INHIBIT_DEFAULT_DEPS = "1"
+
 DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
 
 PACKAGES = "\
   ${PN} \
   ${PN}-dev \
+  ${PN}-dbg \
+  libgcov-dev \
   "
 
 FILES_${PN} = "${base_libdir}/libgcc*.so.*"
 FILES_${PN}-dev = " \
   ${base_libdir}/libgcc*.so \
   ${libdir}/${TARGET_SYS}/${BINV}/crt* \
-  ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
   ${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
+FILES_libgcov-dev = " \
+  ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a"
 
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
+FILES_${PN}-dbg += "${base_libdir}/.debug/"
 
-do_install () {
+do_configure () {
 	target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
-
-	# Install libgcc from our gcc-cross saved data
 	install -d ${D}${base_libdir} ${D}${libdir}
-	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D}
+	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
+	mkdir -p ${B}/${PN}
+	cd ${B}/${PN}
+	chmod a+x ${S}/${PN}/configure
+	${S}/${PN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+}
+
+do_compile () {
+	target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
+	cd ${B}/${PN}
+	oe_runmake MULTIBUILDTOP=${B}/$target/${PN}/
+}
+
+do_install () {
+	target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
+	cd ${B}/${PN}
+	oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${PN}/ install
 
 	# Move libgcc_s into /lib
 	mkdir -p ${D}${base_libdir}
@@ -36,7 +49,19 @@  do_install () {
 	else
 		mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
 	fi
+
+	# install the runtime in /usr/lib/ not in /usr/lib/gcc on target
+	# so that cross-gcc can find it in the sysroot
+
+	mv ${D}${libdir}/gcc/* ${D}${libdir}
+	rm -rf ${D}${libdir}/gcc/
 }
 
+do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package"
+do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_package"
+do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_package"
+
 BBCLASSEXTEND = "nativesdk"
 
+INSANE_SKIP_libgcc-dev = "staticdev"
+INSANE_SKIP_libgcov-dev = "staticdev"