[gcc-cross] The gcc-cross package supports OBS automatic build
Support the automatic build of the package on the OBS environment, and fix the original script.
This commit is contained in:
parent
56ef257bff
commit
d1efec0290
7
build.sh
7
build.sh
@ -42,8 +42,8 @@ clean()
|
||||
|
||||
echo "$(date +"%Y-%m-%d %H:%M:%S") ========begin building ========"
|
||||
source $PWD/config.xml
|
||||
miss_tool_error gcc -v
|
||||
miss_tool_error g++ -v
|
||||
miss_tool_error gcc --version
|
||||
miss_tool_error g++ --version
|
||||
miss_tool_error bison --version
|
||||
miss_tool_error flex --version
|
||||
miss_tool_error makeinfo --version
|
||||
@ -59,7 +59,6 @@ else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
./build.sh
|
||||
rm -rf $LOG_PATH/python*
|
||||
bash build.sh
|
||||
cd -
|
||||
exit 0
|
||||
|
||||
48
gcc-cross.spec
Normal file
48
gcc-cross.spec
Normal file
@ -0,0 +1,48 @@
|
||||
Summary: C/C++ Cross Compiler Toolchain
|
||||
Name: gcc-cross
|
||||
Version: 1.0
|
||||
Release: 0
|
||||
# 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
|
||||
URL: http://gcc.gnu.org
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: binutils
|
||||
BuildRequires: gcc, gcc-c++, make, git, flex, bison, rpm-build, automake, autoconf
|
||||
BuildRequires: libtool, ncurses-devel, bc, openssl-devel, texinfo, rsync, chrpath
|
||||
#ExclusiveArch: i386 x86-64
|
||||
|
||||
%description
|
||||
C/C++ Cross Compiler Toolchain
|
||||
|
||||
%prep
|
||||
mkdir -p %{_builddir}/%{name}-%{version}
|
||||
cd %{_builddir}/%{name}-%{version}
|
||||
cp -r %{_sourcedir}/* ./
|
||||
|
||||
%build
|
||||
cd %{_builddir}/%{name}-%{version}
|
||||
files=$(ls *.tar 2> /dev/null | wc -l)
|
||||
if [ "$files" != 0 ]; then
|
||||
ls *.tar | xargs -n1 tar xvf
|
||||
fi
|
||||
bash download.sh
|
||||
bash build.sh openeuler_gcc_arm64le
|
||||
bash build.sh openeuler_gcc_arm32le
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/tmp
|
||||
cp %{_builddir}/output/openeuler_gcc_arm64le/openeuler_gcc_arm64le.tar.gz %{buildroot}/tmp
|
||||
cp %{_builddir}/output/openeuler_gcc_arm32le/openeuler_gcc_arm32le.tar.gz %{buildroot}/tmp
|
||||
|
||||
%files
|
||||
%attr(755, root, root) /tmp/openeuler_gcc_arm64le.tar.gz
|
||||
%attr(755, root, root) /tmp/openeuler_gcc_arm32le.tar.gz
|
||||
|
||||
%changelog
|
||||
* Wed Mar 23 2022 dingguangya <dingguangya1@huawei.com>
|
||||
- Type:Init
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: Init gcc-cross repository
|
||||
@ -13,7 +13,7 @@ fi
|
||||
[ -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
|
||||
source pre_construction.sh &>> $LOG_PATH/openeuler_gcc_arm32le_patch.log
|
||||
|
||||
echo "------------------------------------------"
|
||||
echo "Now building the "openeuler_gcc_arm32le" toolchain ..."
|
||||
|
||||
@ -11,7 +11,7 @@ source $PWD/../config.xml
|
||||
[ -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
|
||||
source pre_construction.sh &>> $LOG_PATH/openeuler_gcc_arm64le_patch.log
|
||||
|
||||
echo "------------------------------------------"
|
||||
echo "Now building the "openeuler_gcc_arm64le" toolchain ..."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user