summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/gcc/gcc-configure-runtime.inc23
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-cross.inc14
-rw-r--r--meta/recipes-devtools/gcc/libgcc_4.6.bb33
4 files changed, 40 insertions, 32 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
index 34bfaeb960..d2e4ab334b 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -16,26 +16,32 @@ RUNTIMETARGET = "libssp libstdc++-v3"
16 16
17do_configure () { 17do_configure () {
18 export CXX="${CXX} -nostdinc++ -nostdlib++" 18 export CXX="${CXX} -nostdinc++ -nostdlib++"
19 for d in ${RUNTIMETARGET}; do 19 mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
20 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
21 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B}
22 for d in libgcc ${RUNTIMETARGET}; do
20 echo "Configuring $d" 23 echo "Configuring $d"
21 mkdir -p ${B}/$d/ 24 rm -rf ${B}/$target/$d/
22 cd ${B}/$d/ 25 mkdir -p ${B}/$target/$d/
26 cd ${B}/$target/$d/
23 chmod a+x ${S}/$d/configure 27 chmod a+x ${S}/$d/configure
24 ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} 28 ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
25 done 29 done
26} 30}
27 31
28do_compile () { 32do_compile () {
29 for d in ${RUNTIMETARGET}; do 33 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
30 cd ${B}/$d/ 34 for d in libgcc ${RUNTIMETARGET}; do
31 oe_runmake 35 cd ${B}/$target/$d/
36 oe_runmake MULTIBUILDTOP=${B}/$target/$d/
32 done 37 done
33} 38}
34 39
35do_install () { 40do_install () {
41 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
36 for d in ${RUNTIMETARGET}; do 42 for d in ${RUNTIMETARGET}; do
37 cd ${B}/$d/ 43 cd ${B}/$target/$d/
38 oe_runmake 'DESTDIR=${D}' install 44 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
39 done 45 done
40 chown -R root:root ${D} 46 chown -R root:root ${D}
41} 47}
@@ -45,4 +51,3 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
45PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs" 51PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
46 52
47BBCLASSEXTEND = "nativesdk" 53BBCLASSEXTEND = "nativesdk"
48
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index f0e7810273..66c47e027c 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -25,5 +25,5 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \
25 ${@get_gcc_fpu_setting(bb, d)}" 25 ${@get_gcc_fpu_setting(bb, d)}"
26 26
27do_compile () { 27do_compile () {
28 oe_runmake 28 oe_runmake all-gcc all-target-libgcc
29} 29}
diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc
index e32412c127..9718101a3d 100644
--- a/meta/recipes-devtools/gcc/gcc-package-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-cross.inc
@@ -36,19 +36,7 @@ do_install () {
36 case ${PN} in 36 case ${PN} in
37 *gcc-cross|*gcc-crosssdk) 37 *gcc-cross|*gcc-crosssdk)
38 dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS} 38 dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS}
39 oe_runmake "DESTDIR=$dest" libdir=${target_libdir} base_libdir=${target_base_libdir} prefix=${target_prefix} exec_prefix=${target_exec_prefix} install-target-libgcc 39 cp -fpPR . $dest
40
41 # Ideally here we'd override the libgcc Makefile's idea of slibdir but
42 # for now, we just move the files to the correct location
43
44 install -d $dest${target_base_libdir}
45 mv $dest${target_exec_prefix}/${TARGET_SYS}/lib*/* $dest${target_base_libdir}
46 rm -rf $dest${target_exec_prefix}/${TARGET_SYS}
47
48 # Also need to move gcc from /usr/lib/gcc/* to /usr/lib/ else the search paths won't find the crt*.o files
49
50 mv $dest${target_libdir}/gcc/* $dest${target_libdir}/
51 rmdir $dest${target_libdir}/gcc
52 ;; 40 ;;
53 esac 41 esac
54} 42}
diff --git a/meta/recipes-devtools/gcc/libgcc_4.6.bb b/meta/recipes-devtools/gcc/libgcc_4.6.bb
index 9a8b20d87c..9db7243531 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.6.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.6.bb
@@ -1,6 +1,7 @@
1require gcc-${PV}.inc 1require gcc-${PV}.inc
2 2
3INHIBIT_DEFAULT_DEPS = "1" 3INHIBIT_DEFAULT_DEPS = "1"
4
4DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" 5DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
5 6
6PKGSUFFIX = "" 7PKGSUFFIX = ""
@@ -23,15 +24,26 @@ FILES_libgcov${PKGSUFFIX}-dev = " \
23 24
24FILES_${PN}-dbg += "${base_libdir}/.debug/" 25FILES_${PN}-dbg += "${base_libdir}/.debug/"
25 26
26do_configure[noexec] = "1" 27do_configure () {
27do_compile[noexec] = "1"
28
29do_install () {
30 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` 28 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
31
32 # Install libgcc from our gcc-cross saved data
33 install -d ${D}${base_libdir} ${D}${libdir} 29 install -d ${D}${base_libdir} ${D}${libdir}
34 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D} 30 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
31 mkdir -p ${B}/${PN}
32 cd ${B}/${PN}
33 chmod a+x ${S}/${PN}/configure
34 ${S}/${PN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
35}
36
37do_compile () {
38 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
39 cd ${B}/${PN}
40 oe_runmake MULTIBUILDTOP=${B}/$target/${PN}/
41}
42
43do_install () {
44 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
45 cd ${B}/${PN}
46 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${PN}/ install
35 47
36 # Move libgcc_s into /lib 48 # Move libgcc_s into /lib
37 mkdir -p ${D}${base_libdir} 49 mkdir -p ${D}${base_libdir}
@@ -41,8 +53,11 @@ do_install () {
41 mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true 53 mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
42 fi 54 fi
43 55
44 chown -R root:root ${D} 56 # install the runtime in /usr/lib/ not in /usr/lib/gcc on target
45 chmod +x ${D}${base_libdir}/libgcc_s.so.* 57 # so that cross-gcc can find it in the sysroot
58
59 mv ${D}${libdir}/gcc/* ${D}${libdir}
60 rm -rf ${D}${libdir}/gcc/
46} 61}
47 62
48do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package" 63do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package"