Patchwork [RFT] GCC 4.8 recipes

login
register
mail settings
Submitter Marcin Juszkiewicz
Date March 28, 2013, 3:46 p.m.
Message ID <515465CE.6080803@linaro.org>
Download mbox | patch
Permalink /patch/47087/
State New
Headers show

Comments

Marcin Juszkiewicz - March 28, 2013, 3:46 p.m.
W dniu 28.03.2013 10:02, Marcin Juszkiewicz pisze:
> W dniu 28.03.2013 06:51, Khem Raj pisze:
>> I have added gcc 4.8 recipes and the branch is here 
>>
>> git://git.openembedded.org/openembedded-core-contrib kraj/gcc-4.8
> 
> Übercool! Will do tests with aarch64.

After some hacking (see attachment) I got it built and booted
core-image-minimal.

Problem was with paths - lib contra lib64. Will look at it more next week.
Khem Raj - March 28, 2013, 4:07 p.m.
On Mar 28, 2013, at 8:46 AM, Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> wrote:

> W dniu 28.03.2013 10:02, Marcin Juszkiewicz pisze:
>> W dniu 28.03.2013 06:51, Khem Raj pisze:
>>> I have added gcc 4.8 recipes and the branch is here 
>>> 
>>> git://git.openembedded.org/openembedded-core-contrib kraj/gcc-4.8
>> 
>> Übercool! Will do tests with aarch64.
> 
> After some hacking (see attachment) I got it built and booted
> core-image-minimal.


Nice

> 
> Problem was with paths - lib contra lib64. Will look at it more next week.
> 
> <aarch64.diff>


Well I guess aarch64 is kind of_special_ here. look into multilib we have done
for other architectures. e.g. for x86_64 if you inherit multilib class it uses 'lib64'
otherwise it uses 'lib' thats for historic reasons but for arm you could always use lib64
why its not so ?

> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Richard Purdie - March 28, 2013, 5:49 p.m.
On Thu, 2013-03-28 at 09:07 -0700, Khem Raj wrote:
> On Mar 28, 2013, at 8:46 AM, Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> wrote:
> 
> > W dniu 28.03.2013 10:02, Marcin Juszkiewicz pisze:
> >> W dniu 28.03.2013 06:51, Khem Raj pisze:
> >>> I have added gcc 4.8 recipes and the branch is here 
> >>> 
> >>> git://git.openembedded.org/openembedded-core-contrib kraj/gcc-4.8
> >> 
> >> Übercool! Will do tests with aarch64.
> > 
> > After some hacking (see attachment) I got it built and booted
> > core-image-minimal.
> 
> 
> Nice
> 
> > 
> > Problem was with paths - lib contra lib64. Will look at it more next week.
> > 
> > <aarch64.diff>
> 
> 
> Well I guess aarch64 is kind of_special_ here. look into multilib we have done
> for other architectures. e.g. for x86_64 if you inherit multilib class it uses 'lib64'
> otherwise it uses 'lib' thats for historic reasons but for arm you could always use lib64
> why its not so ?

The build system should use whichever is configured as $libdir for any
given target.

Cheers,

Richard

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-package-runtime.inc b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
index 2e2f75a..39f053c 100644
--- a/meta/recipes-devtools/gcc/gcc-package-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
@@ -78,3 +78,13 @@  FILES_libgomp-staticdev = "\
 do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
 do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
 do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
+
+do_install_append_aarch64() {
+
+    if [ -d ${D}${libdir}64 ]; then
+        mv ${D}${libdir}64/* ${D}${libdir}
+    fi
+    if [ -d ${D}${libdir}64/.debug ]; then
+        mv ${D}${libdir}64/.debug ${D}${libdir}/.debug
+    fi
+}
diff --git a/meta/recipes-devtools/gcc/libgcc_4.8.bb b/meta/recipes-devtools/gcc/libgcc_4.8.bb
index 47669a2..51ed2ff 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.8.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.8.bb
@@ -51,7 +51,11 @@  do_install () {
 	if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then
 		mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir}
 	else
-		mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
+        if [ -f ${D}${libdir}64/libgcc_s.so ]; then
+            mv ${D}${libdir}64/libgcc* ${D}${base_libdir}
+        else
+            mv ${D}${libdir}64/libgcc* ${D}${base_libdir} || true
+        fi
 	fi
 
 	# install the runtime in /usr/lib/ not in /usr/lib/gcc on target