diff --git a/download.sh b/download.sh index b492ff4fb087ce12494bf94c10fdd5fe6eddb6be..3ce5947469989a632c9a1321c1fb602a8ca23e5a 100755 --- a/download.sh +++ b/download.sh @@ -3,6 +3,9 @@ set -e readonly LIB_PATH="$PWD/../open_source" source $PWD/config.xml +build_rpmdir=`rpm --eval "%{_builddir}"` +src_rpmdir=`rpm --eval "%{_sourcedir}"` +SRC_BRANCH="openEuler-22.03-LTS-SP1" #judge the open_source @@ -18,42 +21,38 @@ cd $LIB_PATH && delete_dir $GCC $BINUTILS $GMP $MPC $MPFR $ISL pushd $LIB_PATH function do_patch() { pushd $1 + cp -n * $src_rpmdir + specfile=`ls *.spec` + rpmbuild -bp $src_rpmdir/$specfile if [ $1 = "isl" ];then - tar xf $1-0.14.tar.xz - tar xf $1-0.16.1.tar.xz - patch -p1 < *.patch + cp -a $build_rpmdir/$1/$1-0.14 ./ + cp -a $build_rpmdir/$1/$1-0.16.1 ./ else PKG=$(echo *.tar.*) - tar xf *.tar.* - cat *.spec | grep "Patch" | grep "\.patch" | awk '{print $2}' > $1-patchlist - pushd ${PKG%%.tar.*} - for i in `cat ../$1-patchlist` - do - patch -p1 < ../$i - done - popd + pkg_dir=${PKG%%.tar.*} + cp -a $build_rpmdir/$pkg_dir ./ fi popd } -echo "Download $GCC" && git clone -b openEuler-22.03-LTS https://gitee.com/src-openeuler/gcc.git +echo "Download $GCC" && git clone -b $SRC_BRANCH https://gitee.com/src-openeuler/gcc.git do_patch $GCC -echo "Download $GLIBC" && git clone -b openEuler-22.03-LTS https://gitee.com/src-openeuler/glibc.git +echo "Download $GLIBC" && git clone -b $SRC_BRANCH https://gitee.com/src-openeuler/glibc.git do_patch $GLIBC -echo "Download $BINUTILS" && git clone -b openEuler-22.03-LTS https://gitee.com/src-openeuler/binutils.git +echo "Download $BINUTILS" && git clone -b $SRC_BRANCH https://gitee.com/src-openeuler/binutils.git do_patch $BINUTILS -echo "Download $GMP" && git clone -b openEuler-22.03-LTS https://gitee.com/src-openeuler/gmp.git +echo "Download $GMP" && git clone -b $SRC_BRANCH https://gitee.com/src-openeuler/gmp.git do_patch $GMP -echo "Download $MPFR" && git clone -b openEuler-22.03-LTS https://gitee.com/src-openeuler/mpfr.git +echo "Download $MPFR" && git clone -b $SRC_BRANCH https://gitee.com/src-openeuler/mpfr.git do_patch $MPFR -echo "Download $MPC" && git clone -b openEuler-22.03-LTS https://gitee.com/src-openeuler/libmpc.git +echo "Download $MPC" && git clone -b $SRC_BRANCH https://gitee.com/src-openeuler/libmpc.git do_patch $MPC -echo "Download $ISL" && git clone -b openEuler-22.03-LTS https://gitee.com/src-openeuler/isl.git +echo "Download $ISL" && git clone -b $SRC_BRANCH https://gitee.com/src-openeuler/isl.git do_patch $ISL echo "Download $LINUX_KERNEL" && git clone -b 5.10.0-60.16.0 https://gitee.com/openeuler/kernel.git --depth 1 diff --git a/gcc-cross.spec b/gcc-cross.spec index 829e580b6a9f34b9f4db8994b3ee34dd8421da33..3d96b086e02eaecbb688c1de9962c00c7372e59e 100644 --- a/gcc-cross.spec +++ b/gcc-cross.spec @@ -1,7 +1,7 @@ Summary: C/C++ Cross Compiler Toolchain Name: gcc-cross Version: 1.0 -Release: 4 +Release: 6 # libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD @@ -42,6 +42,18 @@ cp %{_builddir}/output/gcc_arm32le/gcc_arm32le.tar.gz %{buildroot}/tmp %attr(755, root, root) /tmp/gcc_arm32le.tar.gz %changelog +* Fri Jun 16 2023 dingguangya - 1.0-6 +-Type:Fix +-ID:NA +-SUG:NA +-DESC: Fix the compilation problem caused by the missing code segment of crtbeginS.o + +* Fri Jun 16 2023 dingguangya - 1.0-5 +-Type:Fix +-ID:NA +-SUG:NA +-DESC: Fix cross-compilation tool chain to openEuler-22.03-LTS-SP1 + * Mon Dec 19 2022 dingguangya - 1.0-4 -Type:Fix -ID:NA diff --git a/gcc_arm32le/gcc_arm_linux_release.sh b/gcc_arm32le/gcc_arm_linux_release.sh index c4741275b76a983faa678496cf6d9c0907015e69..a53841510861ab5c7d43e5bfb200a9897e831896 100755 --- a/gcc_arm32le/gcc_arm_linux_release.sh +++ b/gcc_arm32le/gcc_arm_linux_release.sh @@ -110,10 +110,8 @@ for file in $(find "$PREFIX" -name "*") ; do if [[ $get_arch =~ "x86_64" ]] then res1=$(echo $result | grep "ARM" | cat) - if [[ "$res1" != "" ]] + if [[ "$res1" == "" ]] then - $PREFIX/bin/$TARGET-strip $file - else strip $file fi else diff --git a/gcc_arm64le/gcc_aarch64_linux_release.sh b/gcc_arm64le/gcc_aarch64_linux_release.sh index 59561c933a736be95bc1981dcd17ffb890c19e5c..6f2af06c68d02b2ff4e754563d03c6c27ac7ffbe 100755 --- a/gcc_arm64le/gcc_aarch64_linux_release.sh +++ b/gcc_arm64le/gcc_aarch64_linux_release.sh @@ -112,10 +112,8 @@ for file in $(find "$PREFIX" -name "*") ; do if [[ $get_arch =~ "x86_64" ]] then res1=$(echo $result | grep "ARM" | cat) - if [[ "$res1" != "" ]] + if [[ "$res1" == "" ]] then - $PREFIX/bin/$TARGET-strip $file - else strip $file fi else