Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
a098c64aac
!42 spec files are packaged in src.rpm without source code files
From: @Kylee1234 
Reviewed-by: @xiongzhou4 
Signed-off-by: @xiongzhou4
2024-04-16 02:26:14 +00:00
Qian Li
79efee88d2 [gcc-cross] fix spec files are packaged in src.rpm without source code files 2024-04-11 17:53:20 +08:00
openeuler-ci-bot
aaebf92483
!41 [gcc-cross] Fix cross-compilation tool chain
From: @lesleyzheng1103 
Reviewed-by: @xiongzhou4 
Signed-off-by: @xiongzhou4
2024-03-30 03:44:12 +00:00
郑晨卉
64d9ffd412 [gcc-cross] Fix cross-compilation tool chain. 2024-03-26 16:07:29 +08:00
openeuler-ci-bot
97f7daa4f5
!33 [gcc-cross] Fix cross-compilation tool chain
From: @dguangya 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-08-09 01:39:30 +00:00
dingguangya
5fa683861e [gcc-cross] Fix cross-compilation tool chain 2023-08-08 22:07:34 +08:00
openeuler-ci-bot
afd486f080
!26 [gcc-cross] Update cross-compilation tool chain
From: @dguangya 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-03-06 06:27:23 +00:00
dingguangya
95b3e45fd6 [gcc-cross] Update cross-compilation tool chain 2023-03-06 12:52:00 +08:00
openeuler-ci-bot
a7d728638f
!22 [sync] PR-20: [gcc-cross] Fix the hard coding problem in the software package building process
From: @openeuler-sync-bot 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2022-12-21 02:23:18 +00:00
dingguangya
0241eadfa4 [gcc-cross] Fix the hard coding problem in the software package building process
(cherry picked from commit 2697adf95cd2f8868d196082f5685093e61cd8ad)
2022-12-19 14:52:21 +08:00
14 changed files with 186 additions and 90 deletions

View File

@ -48,7 +48,7 @@ miss_tool_error bison --version
miss_tool_error flex --version miss_tool_error flex --version
miss_tool_error makeinfo --version miss_tool_error makeinfo --version
if [ "$1"x = "openeuler_gcc_arm64le"x ] || [ "$1"x = "openeuler_gcc_arm32le"x ]; then if [ "$1"x = "gcc_arm64le"x ] || [ "$1"x = "gcc_arm32le"x ]; then
cd $1 cd $1
elif [ "$1"x = "clean"x ] ; then elif [ "$1"x = "clean"x ] ; then
clean clean

View File

@ -1,19 +1,19 @@
COMPILER_INFO="gcc 10.3.1" COMPILER_INFO="gcc 12.3.1"
GCC="gcc" GCC="gcc"
GCC_DIR="gcc-10.3.0" GCC_DIR="gcc-12.3.0"
BINUTILS="binutils" BINUTILS="binutils"
BINUTILS_DIR="binutils-2.37" BINUTILS_DIR="binutils-2.41"
MPFR="mpfr" MPFR="mpfr"
MPFR_DIR="mpfr-4.1.0" MPFR_DIR="mpfr-4.2.1"
GMP="gmp" GMP="gmp"
GMP_DIR="gmp-6.2.1" GMP_DIR="gmp-6.3.0"
MPC="libmpc" MPC="libmpc"
MPC_DIR="mpc-1.2.0" MPC_DIR="mpc-1.3.1"
ISL="isl" ISL="isl"
ISL_DIR="isl-0.16.1" ISL_DIR="isl-0.24"
GLIBC="glibc" GLIBC="glibc"
GLIBC_DIR="glibc-2.34" GLIBC_DIR="glibc-2.38"
KERNEL_HEADERS="kernel_headers" KERNEL_HEADERS="kernel_headers"
KERNEL_HEADERS_64="kernel_headers_64" KERNEL_HEADERS_64="kernel_headers_64"
LINUX_KERNEL="kernel" LINUX_KERNEL="kernel"

View File

@ -3,6 +3,9 @@ set -e
readonly LIB_PATH="$PWD/../open_source" readonly LIB_PATH="$PWD/../open_source"
source $PWD/config.xml source $PWD/config.xml
build_rpmdir=`rpm --eval "%{_builddir}"`
src_rpmdir=`rpm --eval "%{_sourcedir}"`
SRC_BRANCH="master"
#judge the open_source #judge the open_source
@ -18,43 +21,38 @@ cd $LIB_PATH && delete_dir $GCC $BINUTILS $GMP $MPC $MPFR $ISL
pushd $LIB_PATH pushd $LIB_PATH
function do_patch() { function do_patch() {
pushd $1 pushd $1
cp -f * $src_rpmdir
specfile=`ls *.spec`
rpmbuild -bp $src_rpmdir/$specfile
PKG=$(echo *.tar.*)
pkg_dir=${PKG%%.tar.*}
if [ $1 = "isl" ];then if [ $1 = "isl" ];then
tar xf $1-0.14.tar.xz cp -a $build_rpmdir/$1/$pkg_dir ./
tar xf $1-0.16.1.tar.xz
patch -p1 < *.patch
else else
PKG=$(echo *.tar.*) cp -a $build_rpmdir/$pkg_dir ./
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
fi fi
popd 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 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 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 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 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 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 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 do_patch $ISL
echo "Download $LINUX_KERNEL" && git clone -b 5.10.0-60.16.0 https://gitee.com/openeuler/kernel.git --depth 1 echo "Download $LINUX_KERNEL" && git clone -b 6.4.0-1.0.1 https://gitee.com/openeuler/kernel.git --depth 1
cp -a $LINUX_KERNEL $LINUX_KERNEL_64 cp -a $LINUX_KERNEL $LINUX_KERNEL_64

View File

@ -1,16 +1,24 @@
Summary: C/C++ Cross Compiler Toolchain Summary: C/C++ Cross Compiler Toolchain
Name: gcc-cross Name: gcc-cross
Version: 1.0 Version: 1.0
Release: 2 Release: 7
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have # libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception. # GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
URL: http://gcc.gnu.org URL: http://gcc.gnu.org
Source0: build.sh
Source1: config.xml
Source2: download.sh
Source3: gcc_arm32le
Source4: gcc_arm64le
Source5: README.en.md
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: binutils BuildRequires: binutils, gettext, gmp-devel, isl-devel, libmpc-devel, mpfr-devel, python3-sphinx, sharutils
BuildRequires: gcc, gcc-c++, make, git, flex, bison, rpm-build, automake, autoconf BuildRequires: audit-libs-devel, gd-devel, libcap-devel, libpng-devel, libselinux-devel, libstdc++-static, systemtap-sdt-devel, valgrind
BuildRequires: libtool, ncurses-devel, bc, openssl-devel, texinfo, rsync, chrpath BuildRequires: jansson-devel
BuildRequires: gdb, native-turbo-tools, gcc, gcc-c++, make, git, flex, bison, rpm-build, automake, autoconf
BuildRequires: libtool, ncurses-devel, bc, zlib-devel, openssl-devel, texinfo, rsync, chrpath
#ExclusiveArch: i386 x86-64 #ExclusiveArch: i386 x86-64
%description %description
@ -28,20 +36,51 @@ if [ "$files" != 0 ]; then
ls *.tar | xargs -n1 tar xvf ls *.tar | xargs -n1 tar xvf
fi fi
bash download.sh bash download.sh
bash build.sh openeuler_gcc_arm64le & bash build.sh gcc_arm64le &
bash build.sh openeuler_gcc_arm32le bash build.sh gcc_arm32le
wait wait
%install %install
mkdir -p %{buildroot}/tmp mkdir -p %{buildroot}/tmp
cp %{_builddir}/output/openeuler_gcc_arm64le/openeuler_gcc_arm64le.tar.gz %{buildroot}/tmp cp %{_builddir}/output/gcc_arm64le/gcc_arm64le.tar.gz %{buildroot}/tmp
cp %{_builddir}/output/openeuler_gcc_arm32le/openeuler_gcc_arm32le.tar.gz %{buildroot}/tmp cp %{_builddir}/output/gcc_arm32le/gcc_arm32le.tar.gz %{buildroot}/tmp
%files %files
%attr(755, root, root) /tmp/openeuler_gcc_arm64le.tar.gz %attr(755, root, root) /tmp/gcc_arm64le.tar.gz
%attr(755, root, root) /tmp/openeuler_gcc_arm32le.tar.gz %attr(755, root, root) /tmp/gcc_arm32le.tar.gz
%changelog %changelog
* Thu Apr 11 2024 liqian <liqian@kylinos.cn> - 1.0-7
-Type:Fix
-ID:NA
-SUG:NA
-DESC: Fix Only the spec file is packaged in src.rpm without the source code file,
so it cannot be directly decompressed and compiled using src.rpm
* Mon Mar 11 2024 zhengchenhui <zhengchenhui1@huawei.com> - 1.0-6
-Type:Fix
-ID:NA
-SUG:NA
-DESC: Fix cross-compilation tool chain
* Mon Aug 07 2023 dingguangya <dingguangya1@huawei.com> - 1.0-5
-Type:Fix
-ID:NA
-SUG:NA
-DESC: Fix cross-compilation tool chain
* Mon Mar 06 2023 dingguangya <dingguangya1@huawei.com> - 1.0-4
-Type:Fix
-ID:NA
-SUG:NA
-DESC: Update cross-compilation tool chain
* Mon Nov 28 2022 dingguangya <dingguangya1@huawei.com> - 1.0-3
-Type:Fix
-ID:NA
-SUG:NA
-DESC: Fix the hard coding problem in the software package building process
* Thu Nov 17 2022 dingguangya <dingguangya1@huawei.com> - 1.0-2 * Thu Nov 17 2022 dingguangya <dingguangya1@huawei.com> - 1.0-2
-Type:Fix -Type:Fix
-ID:NA -ID:NA

23
gcc_arm32le/build.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
set -x
readonly LOG_PATH="$PWD/../logs"
if [[ -z "$COMPILER_INFO" ]];then
source $PWD/../config.xml
fi
[ -e "$LOG_PATH/gcc_arm32le_patch.log" ] && rm $LOG_PATH/gcc_arm32le_patch.log
[ -e "$LOG_PATH/gcc_arm32le_build.log" ] && rm $LOG_PATH/gcc_arm32le_build.log
mkdir -p $LOG_PATH
source pre_construction.sh 2>&1 | tee $LOG_PATH/gcc_arm32le_patch.log
echo "------------------------------------------"
echo "Now building the "gcc_arm32le" toolchain ..."
echo "The entire build process takes about 45 minutes (build time is related to machine preformance), you can view the detailed build log in the ${LOG_PATH} file"
source gcc_update_sourcecode.sh
source gcc_arm_linux_release.sh 2>&1 | tee $LOG_PATH/gcc_arm32le_build.log
echo "Build gcc_arm32le toolchain completed!"

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
set -e set -e
set -x
# Target root directory,should be adapted according to your environment # Target root directory,should be adapted according to your environment
readonly ROOT_TAR_DIR="$PWD/arm32le_build_dir" readonly ROOT_TAR_DIR="$PWD/arm32le_build_dir"
readonly ROOT_TAR_SRC="$PWD/../../open_source" readonly ROOT_TAR_SRC="$PWD/../../open_source"
readonly INSTALL="openeuler_gcc_arm32le" readonly INSTALL="gcc_arm32le"
readonly PREFIX="$PWD/arm32le_build_dir/$INSTALL" readonly PREFIX="$PWD/arm32le_build_dir/$INSTALL"
readonly OUTPUT="$PWD/../../output/$INSTALL" readonly OUTPUT="$PWD/../../output/$INSTALL"
@ -15,7 +16,7 @@ readonly SECURE_CXXFLAGS="-O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2
readonly SECURE_CFLAGS_FOR_TARGET="-O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -Wno-stringop-overflow -march=armv7-a -mfloat-abi=soft -mfpu=vfp" readonly SECURE_CFLAGS_FOR_TARGET="-O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -Wno-stringop-overflow -march=armv7-a -mfloat-abi=soft -mfpu=vfp"
readonly SECURE_CXXFLAGS_FOR_TARGET="-O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -Wno-stringop-overflow -march=armv7-a -mfloat-abi=soft -mfpu=vfp" readonly SECURE_CXXFLAGS_FOR_TARGET="-O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack -Wtrampolines -Wno-stringop-overflow -march=armv7-a -mfloat-abi=soft -mfpu=vfp"
readonly TARGET="arm-openeuler-linux-gnueabi" readonly TARGET="arm-linux-gnueabi"
readonly HOST="$(gcc -dumpmachine)" readonly HOST="$(gcc -dumpmachine)"
readonly BUILD="$(gcc -dumpmachine)" readonly BUILD="$(gcc -dumpmachine)"
@ -77,7 +78,8 @@ cp csu/crt1.o csu/crti.o csu/crtn.o $SYSROOT/usr/lib/
$PREFIX/bin/$TARGET-gcc $CFLAGS_FOR_TARGET -o "$SYSROOT/usr/lib/libc.so" -nostdlib -nostartfiles -shared -x c /dev/null && popd $PREFIX/bin/$TARGET-gcc $CFLAGS_FOR_TARGET -o "$SYSROOT/usr/lib/libc.so" -nostdlib -nostartfiles -shared -x c /dev/null && popd
echo "Building GCC second..." && pushd $ROOT_TAR_DIR/obj/build-gcc-second echo "Building GCC second..." && pushd $ROOT_TAR_DIR/obj/build-gcc-second
cp $ROOT_TAR_DIR/obj/glibc-headers/bits/stdio_lim.h $SYSROOT/usr/include/bits # Fix this issue https://gitee.com/src-openeuler/gcc-cross/issues/I7KWH4. The reason is that gcc_arm32le/sysroot/usr/include/bits/stdio_lim.h is generated after glibc is upgraded.
#cp $ROOT_TAR_DIR/obj/glibc-headers/bits/stdio_lim.h $SYSROOT/usr/include/bits
LDFLAGS="${SECURE_LDFLAGS}" CFLAGS="${SECURE_CFLAGS}" CXXFLAGS="${SECURE_CXXFLAGS}" CFLAGS_FOR_TARGET="${SECURE_CFLAGS_FOR_TARGET}" CXXFLAGS_FOR_TARGET="${SECURE_CXXFLAGS_FOR_TARGET}" $ROOT_TAR_SRC/$GCC/$GCC_DIR/configure --build=$BUILD --host=$HOST --target=$TARGET --prefix=$PREFIX --disable-multilib --disable-libmudflap --enable-shared --with-arch=$ARCH --enable-__cxa_atexit --with-gnu-as --with-gnu-ld --disable-nls --disable-libssp --disable-libgomp --enable-lto --disable-libquadmath --enable-poison-system-directories --enable-symvers=gnu --enable-languages=c --with-pkgversion="${COMPILER_INFO}" --with-sysroot=$SYSROOT --with-build-sysroot=$SYSROOT --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$PREFIX --with-isl=$PREFIX --with-build-time-tools=$PREFIX/$TARGET/bin --libdir=$PREFIX/lib --disable-bootstrap --disable-libatomic --disable-libcilkrts --disable-libstdcxx-dual-abi --with-system-zlib LDFLAGS="${SECURE_LDFLAGS}" CFLAGS="${SECURE_CFLAGS}" CXXFLAGS="${SECURE_CXXFLAGS}" CFLAGS_FOR_TARGET="${SECURE_CFLAGS_FOR_TARGET}" CXXFLAGS_FOR_TARGET="${SECURE_CXXFLAGS_FOR_TARGET}" $ROOT_TAR_SRC/$GCC/$GCC_DIR/configure --build=$BUILD --host=$HOST --target=$TARGET --prefix=$PREFIX --disable-multilib --disable-libmudflap --enable-shared --with-arch=$ARCH --enable-__cxa_atexit --with-gnu-as --with-gnu-ld --disable-nls --disable-libssp --disable-libgomp --enable-lto --disable-libquadmath --enable-poison-system-directories --enable-symvers=gnu --enable-languages=c --with-pkgversion="${COMPILER_INFO}" --with-sysroot=$SYSROOT --with-build-sysroot=$SYSROOT --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$PREFIX --with-isl=$PREFIX --with-build-time-tools=$PREFIX/$TARGET/bin --libdir=$PREFIX/lib --disable-bootstrap --disable-libatomic --disable-libcilkrts --disable-libstdcxx-dual-abi --with-system-zlib
make -j 32 CPPFLAGS_FOR_TARGET=--sysroot=$SYSROOT build_tooldir=$PREFIX/$TARGET && make install-gcc install-target-libgcc prefix=$PREFIX exec_prefix=$PREFIX libdir=$PREFIX/lib && popd make -j 32 CPPFLAGS_FOR_TARGET=--sysroot=$SYSROOT build_tooldir=$PREFIX/$TARGET && make install-gcc install-target-libgcc prefix=$PREFIX exec_prefix=$PREFIX libdir=$PREFIX/lib && popd
@ -94,6 +96,34 @@ for file in $(find "$PREFIX" -name "lib*so*.0") ; do
chrpath --delete $file chrpath --delete $file
done done
for file in $(find "$PREFIX/sysroot/usr/lib/gconv" -name "*so") ; do
chrpath --delete $file
done
for file in $(find "$PREFIX" -name "*") ; do
if [ -f "$file" ]
then
result=$(file $file)
res=$(echo $result | grep "ELF" | cat)
if [[ "$res" != "" ]]
then
get_arch=`arch`
if [[ $get_arch =~ "x86_64" ]]
then
res1=$(echo $result | grep "ARM" | cat)
if [[ "$res1" != "" ]]
then
$PREFIX/bin/$TARGET-strip $file
else
strip $file
fi
else
strip $file
fi
fi
fi
done
pushd $PREFIX/.. && chmod 750 $INSTALL -R pushd $PREFIX/.. && chmod 750 $INSTALL -R
tar --format=gnu -czf $OUTPUT/$INSTALL.tar.gz $INSTALL && popd tar --format=gnu -czf $OUTPUT/$INSTALL.tar.gz $INSTALL && popd

View File

@ -4,7 +4,7 @@ set -e
set -x set -x
readonly ROOT_BUILD_SRC="$PWD/../../open_source" readonly ROOT_BUILD_SRC="$PWD/../../open_source"
readonly OUTPUT_INSTALL="$PWD/../../output/openeuler_gcc_arm32le" readonly OUTPUT_INSTALL="$PWD/../../output/gcc_arm32le"
if [[ -z "$COMPILER_INFO" ]];then if [[ -z "$COMPILER_INFO" ]];then
source $PWD/../config.xml source $PWD/../config.xml

21
gcc_arm64le/build.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
set -e
set -x
readonly LOG_PATH="$PWD/../logs"
source $PWD/../config.xml
[ -e "$LOG_PATH/gcc_arm64le_patch.log" ] && rm $LOG_PATH/gcc_arm64le_patch.log
[ -e "$LOG_PATH/gcc_arm64le_build.log" ] && rm $LOG_PATH/gcc_arm64le_build.log
mkdir -p $LOG_PATH
source pre_construction.sh 2>&1 | tee $LOG_PATH/gcc_arm64le_patch.log
echo "------------------------------------------"
echo "Now building the "gcc_arm64le" toolchain ..."
echo "The entire build process takes about 45 minutes (build time is related to machine preformance), you can view the detailed build log in the ${LOG_PATH} file"
source gcc_update_sourcecode.sh
source gcc_aarch64_linux_release.sh 2>&1 | tee $LOG_PATH/gcc_arm64le_build.log
echo "Build gcc_arm64le toolchain completed!"

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
set -e set -e
set -x
# Target root directory,should be adapted according to your environment # Target root directory,should be adapted according to your environment
readonly ROOT_TAR_DIR="$PWD/arm64le_build_dir" readonly ROOT_TAR_DIR="$PWD/arm64le_build_dir"
readonly ROOT_TAR_SRC="$PWD/../../open_source" readonly ROOT_TAR_SRC="$PWD/../../open_source"
readonly INSTALL="openeuler_gcc_arm64le" readonly INSTALL="gcc_arm64le"
readonly PREFIX="$PWD/arm64le_build_dir/$INSTALL" readonly PREFIX="$PWD/arm64le_build_dir/$INSTALL"
readonly OUTPUT="$PWD/../../output/$INSTALL" readonly OUTPUT="$PWD/../../output/$INSTALL"
@ -22,7 +23,7 @@ readonly SYSROOT="$PREFIX/sysroot"
#OTHER CONFIG #OTHER CONFIG
readonly ARCH="armv8-a" readonly ARCH="armv8-a"
readonly TARGET="aarch64-openeuler-linux-gnu" readonly TARGET="aarch64-linux-gnueabi"
source $PWD/../config.xml source $PWD/../config.xml
@ -96,6 +97,34 @@ for file in $(find "$PREFIX" -name "lib*so*.0") ; do
chrpath --delete $file chrpath --delete $file
done done
for file in $(find "$PREFIX/sysroot/usr/lib64/gconv" -name "*so") ; do
chrpath --delete $file
done
for file in $(find "$PREFIX" -name "*") ; do
if [ -f "$file" ]
then
result=$(file $file)
res=$(echo $result | grep "ELF" | cat)
if [[ "$res" != "" ]]
then
get_arch=`arch`
if [[ $get_arch =~ "x86_64" ]]
then
res1=$(echo $result | grep "ARM" | cat)
if [[ "$res1" != "" ]]
then
$PREFIX/bin/$TARGET-strip $file
else
strip $file
fi
else
strip $file
fi
fi
fi
done
pushd $PREFIX/.. && chmod 750 $INSTALL -R pushd $PREFIX/.. && chmod 750 $INSTALL -R
tar --format=gnu -czf $OUTPUT/$INSTALL.tar.gz $INSTALL && popd tar --format=gnu -czf $OUTPUT/$INSTALL.tar.gz $INSTALL && popd

View File

@ -4,7 +4,7 @@ set -e
set -x set -x
readonly ROOT_BUILD_SRC="$PWD/../../open_source" readonly ROOT_BUILD_SRC="$PWD/../../open_source"
readonly OUTPUT_INSTALL="$PWD/../../output/openeuler_gcc_arm64le" readonly OUTPUT_INSTALL="$PWD/../../output/gcc_arm64le"
source $PWD/../config.xml source $PWD/../config.xml

View File

@ -1,23 +0,0 @@
#!/bin/bash
set -e
set -x
readonly LOG_PATH="$PWD/../logs"
if [[ -z "$COMPILER_INFO" ]];then
source $PWD/../config.xml
fi
[ -e "$LOG_PATH/openeuler_gcc_arm32le_patch.log" ] && rm $LOG_PATH/openeuler_gcc_arm32le_patch.log
[ -e "$LOG_PATH/openeuler_gcc_arm32le_build.log" ] && rm $LOG_PATH/openeuler_gcc_arm32le_build.log
mkdir -p $LOG_PATH
source pre_construction.sh &>> $LOG_PATH/openeuler_gcc_arm32le_patch.log
echo "------------------------------------------"
echo "Now building the "openeuler_gcc_arm32le" toolchain ..."
echo "The entire build process takes about 45 minutes (build time is related to machine preformance), you can view the detailed build log in the ${LOG_PATH} file"
source openeuler_gcc_update_sourcecode.sh
source openeuler_gcc_arm_linux_release.sh &>> $LOG_PATH/openeuler_gcc_arm32le_build.log
echo "Build openeuler_gcc_arm32le toolchain completed!"

View File

@ -1,21 +0,0 @@
#!/bin/bash
set -e
set -x
readonly LOG_PATH="$PWD/../logs"
source $PWD/../config.xml
[ -e "$LOG_PATH/openeuler_gcc_arm64le_patch.log" ] && rm $LOG_PATH/openeuler_gcc_arm64le_patch.log
[ -e "$LOG_PATH/openeuler_gcc_arm64le_build.log" ] && rm $LOG_PATH/openeuler_gcc_arm64le_build.log
mkdir -p $LOG_PATH
source pre_construction.sh &>> $LOG_PATH/openeuler_gcc_arm64le_patch.log
echo "------------------------------------------"
echo "Now building the "openeuler_gcc_arm64le" toolchain ..."
echo "The entire build process takes about 45 minutes (build time is related to machine preformance), you can view the detailed build log in the ${LOG_PATH} file"
source openeuler_gcc_update_sourcecode.sh
source openeuler_gcc_aarch64_linux_release.sh &>> $LOG_PATH/openeuler_gcc_arm64le_build.log
echo "Build openeuler_gcc_arm64le toolchain completed!"