[oe] [PATCH][STABLE] gcc-pacpake-cross.inc: Clean up do_install function massively (from Poky)

Khem Raj raj.khem at gmail.com
Wed Jun 9 13:17:37 UTC 2010


On (09/06/10 14:13), Vitus Jensen wrote:
> This fixes floating-point problems on machine n1200 and others caused by
> installing softfloat libraries while the toolchain creates hardfloat
> programs.
> 
> Signed-off-by: Vitus Jensen <vjensen at gmx.de>

looks ok.

Acked-by: Khem Raj <raj.khem at gmail.com>

> ---
>  recipes/gcc/gcc-package-cross.inc |   81 +++++++++++++-----------------------
>  1 files changed, 29 insertions(+), 52 deletions(-)
> 
> diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
> index 77da3fe..b205b8c 100644
> --- a/recipes/gcc/gcc-package-cross.inc
> +++ b/recipes/gcc/gcc-package-cross.inc
> @@ -18,58 +18,35 @@ 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}
> -        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 	
> -
> -        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
> -
> -
> +	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.*
> +		${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
>  
> -       # 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
> +	# 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.
> +	if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
> +		currdir="$PWD"
> +		cd ${CROSS_DIR}/bin/
> +		ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
> +		if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then
> +			cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> +			ln -sf gfortran g77 || true
> +		fi
> +		cd $currdir
>  	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.
> -       if [ -f ${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then
> -              currdir="$PWD"
> -              cd ${CROSS_DIR}/bin/
> -              ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true
> -              cd ${CROSS_DIR}/${TARGET_SYS}/bin/
> -              ln -sf gfortran g77 || true
> -              cd $currdir
> -       fi
>  }
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel




More information about the Openembedded-devel mailing list