From e15d8190dfda11742a9e6416ef4fe33725456b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=99=A8=E5=8D=89?= Date: Thu, 30 Nov 2023 14:55:01 +0800 Subject: [PATCH 1/2] [gcc-cross] Fix cross-compilation tool chain to openEuler-22.03-LTS-SP3. --- download.sh | 15 ++++++++------- gcc-cross.spec | 8 +++++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/download.sh b/download.sh index 4b445e7..ace5b5a 100755 --- a/download.sh +++ b/download.sh @@ -5,6 +5,7 @@ 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-SP3" #judge the open_source @@ -33,25 +34,25 @@ function do_patch() { fi popd } -echo "Download $GCC" && git clone -b openEuler-22.03-LTS-Next 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-Next 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-Next 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-Next 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-Next 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-Next 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-Next 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 4ee0389..89bec5b 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: 5 +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,12 @@ cp %{_builddir}/output/gcc_arm32le/gcc_arm32le.tar.gz %{buildroot}/tmp %attr(755, root, root) /tmp/gcc_arm32le.tar.gz %changelog +* Thu Nov 30 2023 zhengchenhui - 1.0-6 +-Type:Fix +-ID:NA +-SUG:NA +-DESC: Fix cross-compilation tool chain to openEuler-22.03-LTS-SP3 + * Tue Apr 25 2023 dingguangya - 1.0-5 -Type:Fix -ID:NA -- Gitee From 866f9e8253f1d9943f8606252176dd18b3390d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=99=A8=E5=8D=89?= Date: Thu, 30 Nov 2023 15:13:38 +0800 Subject: [PATCH 2/2] [gcc-cross] Fix the compilation problem caused by the missing code segment of crtbeginS.o --- gcc-cross.spec | 8 +++++++- gcc_arm32le/gcc_arm_linux_release.sh | 4 +--- gcc_arm64le/gcc_aarch64_linux_release.sh | 4 +--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc-cross.spec b/gcc-cross.spec index 89bec5b..79d5f58 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: 6 +Release: 7 # 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,12 @@ cp %{_builddir}/output/gcc_arm32le/gcc_arm32le.tar.gz %{buildroot}/tmp %attr(755, root, root) /tmp/gcc_arm32le.tar.gz %changelog +* Thu Nov 30 2023 zhengchenhui - 1.0-7 +-Type:Fix +-ID:NA +-SUG:NA +-DESC: Fix the compilation problem caused by the missing code segment of crtbeginS.o + * Thu Nov 30 2023 zhengchenhui - 1.0-6 -Type:Fix -ID:NA diff --git a/gcc_arm32le/gcc_arm_linux_release.sh b/gcc_arm32le/gcc_arm_linux_release.sh index ee6be72..6399557 100755 --- a/gcc_arm32le/gcc_arm_linux_release.sh +++ b/gcc_arm32le/gcc_arm_linux_release.sh @@ -109,10 +109,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 ba32f32..b825ec6 100755 --- a/gcc_arm64le/gcc_aarch64_linux_release.sh +++ b/gcc_arm64le/gcc_aarch64_linux_release.sh @@ -111,10 +111,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 -- Gitee