From d52e82d16502d1afa6eaee44de8b6b10e31c2cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=99=A8=E5=8D=89?= Date: Mon, 18 Dec 2023 11:53:58 +0800 Subject: [PATCH 1/2] [gcc-cross] Fix patching error for glibc. --- download.sh | 2 +- gcc-cross.spec | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/download.sh b/download.sh index 92292bd..35c0bbc 100755 --- a/download.sh +++ b/download.sh @@ -25,7 +25,7 @@ function do_patch() { else PKG=$(echo *.tar.*) tar xf *.tar.* - cat *.spec | grep "Patch" | grep "\.patch" | awk '{print $2}' > $1-patchlist + cat *.spec | grep -i "Patch[0-9]:*" | grep "\.patch" | awk '{print $2}' > $1-patchlist pushd ${PKG%%.tar.*} for i in `cat ../$1-patchlist` do diff --git a/gcc-cross.spec b/gcc-cross.spec index 378f524..44fb042 100644 --- a/gcc-cross.spec +++ b/gcc-cross.spec @@ -41,6 +41,12 @@ cp %{_builddir}/output/openeuler_gcc_arm32le/openeuler_gcc_arm32le.tar.gz %{buil %attr(755, root, root) /tmp/openeuler_gcc_arm32le.tar.gz %changelog +* Mon Dec 18 2023 zhengchenhui +- Type:Fix +- ID:NA +- SUG:NA +- DESC: Fix patching error for glibc + * Wed Mar 23 2022 dingguangya - Type:Init - ID:NA -- Gitee From ea45bfff6aaa014dd471c942e63451a8b1cfb532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=99=A8=E5=8D=89?= Date: Tue, 19 Dec 2023 11:28:04 +0800 Subject: [PATCH 2/2] [gcc-cross] Fix the error of dynamic link library not found. --- gcc-cross.spec | 6 ++++++ .../openeuler_gcc_aarch64_linux_release.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc-cross.spec b/gcc-cross.spec index 44fb042..6ee7d87 100644 --- a/gcc-cross.spec +++ b/gcc-cross.spec @@ -41,6 +41,12 @@ cp %{_builddir}/output/openeuler_gcc_arm32le/openeuler_gcc_arm32le.tar.gz %{buil %attr(755, root, root) /tmp/openeuler_gcc_arm32le.tar.gz %changelog +* Tue Dec 19 2023 zhengchenhui +- Type:Fix +- ID:NA +- SUG:NA +- DESC: Fix the error of dynamic link library not found + * Mon Dec 18 2023 zhengchenhui - Type:Fix - ID:NA diff --git a/openeuler_gcc_arm64le/openeuler_gcc_aarch64_linux_release.sh b/openeuler_gcc_arm64le/openeuler_gcc_aarch64_linux_release.sh index dafb803..a28c265 100755 --- a/openeuler_gcc_arm64le/openeuler_gcc_aarch64_linux_release.sh +++ b/openeuler_gcc_arm64le/openeuler_gcc_aarch64_linux_release.sh @@ -37,7 +37,7 @@ while [ $# != 0 ] ; do create_new_file $ROOT_TAR_DIR/obj $PREFIX $OUTPUT $ROOT_TAR_DIR/obj/build-gmp $ROOT_TAR_DIR/obj/build-mpfr $ROOT_TAR_DIR/obj/build-isl $ROOT_TAR_DIR/obj/build-mpc $ROOT_TAR_DIR/obj/build-binutils $ROOT_TAR_DIR/obj/build-gcc-first $ROOT_TAR_DIR/obj/glibc-headers-lp64 $ROOT_TAR_DIR/obj/build-gcc-second $ROOT_TAR_DIR/obj/build-eglibc-lp64 $ROOT_TAR_DIR/obj/build-gcc-final # Change GLIBC_DYNAMIC_LINKER. -sed -i "s#^\#define GLIBC_DYNAMIC_LINKER.*#\#undef STANDARD_STARTFILE_PREFIX_2\n\#define STANDARD_STARTFILE_PREFIX_2 \"/usr/lib64/\"\n\#define GLIBC_DYNAMIC_LINKER \"/lib%{mabi=lp64:64}%{mabi=ilp32:ilp32}/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1\"#g" $ROOT_TAR_SRC/$GCC/$GCC_DIR/gcc/config/aarch64/aarch64-linux.h +sed -i "s#^\#define GLIBC_DYNAMIC_LINKER.*#\#undef STANDARD_STARTFILE_PREFIX_2\n\#define STANDARD_STARTFILE_PREFIX_2 \"/usr/lib64/\"\n\#define GLIBC_DYNAMIC_LINKER \"/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1\"#g" $ROOT_TAR_SRC/$GCC/$GCC_DIR/gcc/config/aarch64/aarch64-linux.h # Change libstdc++.so option sed -i "s#^\\t\$(OPT_LDFLAGS).*#\\t\$(OPT_LDFLAGS) \$(SECTION_LDFLAGS) \$(AM_CXXFLAGS) \$(LTLDFLAGS) -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -o \$\@#g" $ROOT_TAR_SRC/$GCC/$GCC_DIR/libstdc++-v3/src/Makefile.in -- Gitee