diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/packages/gcc/gcc-configure-cross.inc | 29 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-initial.inc | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-initial_4.3.1.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-initial_4.3.2.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-initial_4.3.3.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-intermediate.inc | 2 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-kernel.inc | 10 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross.inc | 13 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-package-cross.inc | 84 |
16 files changed, 65 insertions, 117 deletions
diff --git a/meta/packages/gcc/gcc-configure-cross.inc b/meta/packages/gcc/gcc-configure-cross.inc index 8a47a45bc..569d4b7a8 100644 --- a/meta/packages/gcc/gcc-configure-cross.inc +++ b/meta/packages/gcc/gcc-configure-cross.inc @@ -19,33 +19,4 @@ do_compile_prepend () { LIBGCCS_VAR = "-lgcc_s" LIBGCCS_VAR_avr32 = "" -do_stage_append () { - for d in info man share/doc share/locale ; do - rm -rf ${CROSS_DIR}/$d - done - - # We use libiberty from binutils - rm -f ${CROSS_DIR}/lib/libiberty.a - - # We probably don't need these - rmdir ${CROSS_DIR}/include || : - - # Move libssp into staging - install -d ${STAGING_DIR_TARGET}${target_base_libdir}/ - mv ${CROSS_DIR}/${TARGET_SYS}/lib/libssp* ${STAGING_DIR_TARGET}${target_base_libdir}/ || true - - # We don't really need to keep this around - # rm -rf ${CROSS_DIR}/share but leave java there - for d in share/man share/info; - do - rm -rf ${CROSS_DIR}/$d - done - - #fix up libsupc++ and libstdc++ la files - for d in lib lib/nof; do - sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libsupc++.la || true - sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/$d ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/$d/libstdc++.la || true - done -} - do_package_write_ipk[depends] += "virtual/libc:do_package" diff --git a/meta/packages/gcc/gcc-cross-initial.inc b/meta/packages/gcc/gcc-cross-initial.inc index a2c444557..8da7d7968 100644 --- a/meta/packages/gcc/gcc-cross-initial.inc +++ b/meta/packages/gcc/gcc-cross-initial.inc @@ -17,7 +17,3 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \ --with-sysroot=${STAGING_DIR_TARGET} \ --with-build-sysroot=${STAGING_DIR_TARGET} \ ${@get_gcc_fpu_setting(bb, d)}" - -do_install () { - : -} diff --git a/meta/packages/gcc/gcc-cross-initial_4.3.1.bb b/meta/packages/gcc/gcc-cross-initial_4.3.1.bb index 1543f72c9..2cd2adc48 100644 --- a/meta/packages/gcc/gcc-cross-initial_4.3.1.bb +++ b/meta/packages/gcc/gcc-cross-initial_4.3.1.bb @@ -9,7 +9,7 @@ EXTRA_OECONF += " --disable-libmudflap \ --disable-libssp" # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-initial_4.3.2.bb b/meta/packages/gcc/gcc-cross-initial_4.3.2.bb index 1543f72c9..2cd2adc48 100644 --- a/meta/packages/gcc/gcc-cross-initial_4.3.2.bb +++ b/meta/packages/gcc/gcc-cross-initial_4.3.2.bb @@ -9,7 +9,7 @@ EXTRA_OECONF += " --disable-libmudflap \ --disable-libssp" # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-initial_4.3.3.bb b/meta/packages/gcc/gcc-cross-initial_4.3.3.bb index 1543f72c9..2cd2adc48 100644 --- a/meta/packages/gcc/gcc-cross-initial_4.3.3.bb +++ b/meta/packages/gcc/gcc-cross-initial_4.3.3.bb @@ -9,7 +9,7 @@ EXTRA_OECONF += " --disable-libmudflap \ --disable-libssp" # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb b/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb index 99656dbe8..1a921d2d9 100644 --- a/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb +++ b/meta/packages/gcc/gcc-cross-initial_csl-arm-2007q3.bb @@ -6,7 +6,7 @@ S = "${WORKDIR}/gcc-4.2" EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap " # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb b/meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb index 99656dbe8..1a921d2d9 100644 --- a/meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb +++ b/meta/packages/gcc/gcc-cross-initial_csl-arm-2008q1.bb @@ -6,7 +6,7 @@ S = "${WORKDIR}/gcc-4.2" EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap " # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-intermediate.inc b/meta/packages/gcc/gcc-cross-intermediate.inc index 57fa94948..7cc822fb7 100644 --- a/meta/packages/gcc/gcc-cross-intermediate.inc +++ b/meta/packages/gcc/gcc-cross-intermediate.inc @@ -17,5 +17,5 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \ ${@get_gcc_fpu_setting(bb, d)}" do_install () { - : + oe_runmake 'DESTDIR=${D}' install } diff --git a/meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb b/meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb index b0932f520..854911552 100644 --- a/meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb +++ b/meta/packages/gcc/gcc-cross-intermediate_4.3.1.bb @@ -8,7 +8,7 @@ EXTRA_OECONF += " --disable-libmudflap \ --disable-libssp" # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb b/meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb index b0932f520..854911552 100644 --- a/meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb +++ b/meta/packages/gcc/gcc-cross-intermediate_4.3.2.bb @@ -8,7 +8,7 @@ EXTRA_OECONF += " --disable-libmudflap \ --disable-libssp" # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb b/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb index b0932f520..854911552 100644 --- a/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb +++ b/meta/packages/gcc/gcc-cross-intermediate_4.3.3.bb @@ -8,7 +8,7 @@ EXTRA_OECONF += " --disable-libmudflap \ --disable-libssp" # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb b/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb index 114d9831c..0dabd0b8d 100644 --- a/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb +++ b/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb @@ -6,7 +6,7 @@ S = "${WORKDIR}/gcc-4.2" EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap " # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb b/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb index 114d9831c..0dabd0b8d 100644 --- a/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb +++ b/meta/packages/gcc/gcc-cross-intermediate_csl-arm-2008q1.bb @@ -6,7 +6,7 @@ S = "${WORKDIR}/gcc-4.2" EXTRA_OECONF += "--disable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap " # Hack till we fix *libc properly -do_stage_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ +do_install_append() { + ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/meta/packages/gcc/gcc-cross-kernel.inc b/meta/packages/gcc/gcc-cross-kernel.inc index fe6539b80..c602d7251 100644 --- a/meta/packages/gcc/gcc-cross-kernel.inc +++ b/meta/packages/gcc/gcc-cross-kernel.inc @@ -4,11 +4,11 @@ PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}" do_install () { - : + cd gcc + oe_runmake 'DESTDIR=${D}' install-common install-headers install-libgcc + install -m 0755 xgcc ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV} } do_stage () { - cd gcc - oe_runmake install-common install-headers install-libgcc - install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV} -} + use_do_install_for_stage +}
\ No newline at end of file diff --git a/meta/packages/gcc/gcc-cross.inc b/meta/packages/gcc/gcc-cross.inc index 3485824b8..2ba47fef5 100644 --- a/meta/packages/gcc/gcc-cross.inc +++ b/meta/packages/gcc/gcc-cross.inc @@ -1,13 +1,8 @@ -# Path mangling needed by the cross packaging -# Note that we use := here, and require that this is included at the correct -# point (before inheriting cross) to ensure that libdir and includedir are -# target paths, not CROSS_DIR paths. -target_libdir := "${libdir}" -target_includedir := "${includedir}" -target_base_libdir := "${base_libdir}" -target_prefix := "${prefix}" - inherit cross DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc" PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" + +do_stage () { + use_do_install_for_stage +} diff --git a/meta/packages/gcc/gcc-package-cross.inc b/meta/packages/gcc/gcc-package-cross.inc index 9e54af856..cb23b23f2 100644 --- a/meta/packages/gcc/gcc-package-cross.inc +++ b/meta/packages/gcc/gcc-package-cross.inc @@ -18,55 +18,41 @@ FILES_libstdc++ = "${target_libdir}/libstdc++.so.*" do_install () { oe_runmake 'DESTDIR=${D}' install - # Move libgcc_s into /lib - mkdir -p ${D}${target_base_libdir} - if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then - # Already in the right location - : - elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then - mv -f ${D}${prefix}/lib/libgcc_s.so* ${D}${target_base_libdir} || true - elif [ -f ${D}${prefix}/*/lib/nof/libgcc_s.so.? ]; then - mv -f ${D}${prefix}/*/lib/nof/libgcc_s.so* ${D}${target_base_libdir} - elif [ -f ${D}${prefix}/*/lib64/libgcc_s.so.? ]; then - mv -f ${D}${prefix}/*/lib64/libgcc_s.so* ${D}${target_base_libdir} || true - else - mv -f ${D}${prefix}/*/lib/libgcc_s.so* ${D}${target_base_libdir} || true - fi - - - - # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr - mkdir -p ${D}${target_libdir} - - if [ -f ${D}${prefix}/*/lib/nof/libstdc++.so ]; then - - mv -f ${D}${prefix}/*/lib/nof/libstdc++.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib/nof/libg2c.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib/nof/libgfortran*.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib/nof/libssp*.so* ${D}${target_libdir} || true - elif [ -f ${D}${prefix}/*/lib64/libstdc++.so ]; then - mv -f ${D}${prefix}/*/lib64/libstdc++.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib64/libg2c.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib64/libgfortran*.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib64/libssp*.so* ${D}${target_libdir} || true - else - mv -f ${D}${prefix}/*/lib/libstdc++.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib/libg2c.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib/libgfortran*.so* ${D}${target_libdir} || true - mv -f ${D}${prefix}/*/lib/libssp*.so* ${D}${target_libdir} || true - fi - - # Manually run the target stripper since we won't get it run by - # the packaging. - if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then - ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* - ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true - ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true - ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true + install -d ${D}${target_base_libdir} + install -d ${D}${target_libdir} + + for d in ${TARGET_SYS}/lib/nof ${TARGET_SYS}/lib64 ${TARGET_SYS}/lib; do + if [ -d ${D}${prefix}/$d/ ]; then + mv -f ${D}${prefix}/$d/libgcc* ${D}${target_base_libdir} || true + mv -f ${D}${prefix}/$d/* ${D}${target_libdir} || true + fi + done + + # Manually run the target stripper since we won't get it run by + # the packaging. + if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then + ${TARGET_PREFIX}strip ${D}${target_libdir}/libstdc++.so.* || true + ${TARGET_PREFIX}strip ${D}${target_libdir}/libg2c.so.* || true + ${TARGET_PREFIX}strip ${D}${target_base_libdir}/libgcc_s.so.* || true + ${TARGET_PREFIX}strip ${D}${target_libdir}/libgfortran*.so* || true fi - # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 - # gfortran is fully backwards compatible. This is a safe and practical solution. - ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true - ln -sf ${CROSS_DIR}/${TARGET_SYS}/bin/gfortran ${CROSS_DIR}/${TARGET_SYS}/bin/g77 || true + # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 + # gfortran is fully backwards compatible. This is a safe and practical solution. + ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ${CROSS_DIR}/bin/${TARGET_PREFIX}g77 || true + ln -sf ${CROSS_DIR}/${TARGET_SYS}/bin/gfortran ${CROSS_DIR}/${TARGET_SYS}/bin/g77 || true + + # Remove things we don't need but keep share/java + for d in info man share/doc share/locale share/man share/info; do + rm -rf ${D}${CROSS_DIR}/$d + done + + #fix up libsupc++ and libstdc++ la files + for f in libssp.la libssp_nonshared.la libsupc++.la libstdc++.la ; do + # Remove any -L options from dependency_libs - we should never need them as the + # files are in the sysroot + sed -i "s|\(dependency_libs\s*=.*\)-L\s*[^ ]*\(.*\)|\1\2|g" ${D}${target_libdir}/$f || true + # Set libdir correctly + sed -i "s|libdir\s*=.*|libdir='${target_libdir}'|g" ${D}${target_libdir}/$f || true + done } |