1
0
mirror of https://github.com/renbaoshuo/s2oj-gcc.git synced 2024-11-23 11:38:44 +00:00

Compare commits

..

No commits in common. "04c8c795bbd6de29754ed4e1893ce81d9000c5c0" and "b516af9e1b93f6cbad7ff5fb241e79f1bc7c829a" have entirely different histories.

2 changed files with 8 additions and 19 deletions

View File

@ -15,7 +15,7 @@ steps:
- sed -i 's@//.*archive.ubuntu.com@//mirror-cdn.xtom.com@g' /etc/apt/sources.list &&
sed -i 's@//security.ubuntu.com@//mirror-cdn.xtom.com@g' /etc/apt/sources.list
- apt update &&
apt install -y curl bzip2 git make gcc g++ libgmp-dev libmpfr-dev libmpc-dev gcc-multilib
apt install -y git make gcc g++ libgmp-dev libmpfr-dev libmpc-dev gcc-multilib
- bash build.sh
environment:
GITEA_ENDPOINT: https://git.m.ac

View File

@ -5,32 +5,21 @@ GCC_VERSION="13.2.0"
# GCC_GIT="git://gcc.gnu.org/git/gcc.git"
GCC_GIT="https://git.m.ac/mirrors/gcc.git"
GCC_SRC="${CURRENT_DIR}/../gcc"
build_cd() {
cd $@
echo "****** Now at: $(pwd)"
}
BUILD_DIR="build"
# Clone GCC
echo "===> Cloning GCC..."
git clone -b "releases/gcc-$GCC_VERSION" --depth 1 "${GCC_GIT}" "${GCC_SRC}"
# Download prerequisites
echo "===> Downloading prerequisites..."
build_cd ${GCC_SRC}
./contrib/download_prerequisites
build_cd ${CURRENT_DIR}
# Apply patches
echo "===> Applying patches..."
build_cd ${GCC_SRC}
patch -p1 < ${CURRENT_DIR}/patches/gcc-$GCC_VERSION.patch
build_cd ${CURRENT_DIR}
cd ${GCC_SRC}
patch -p1 < ../patches/gcc-$GCC_VERSION.patch
cd ${CURRENT_DIR}
# Configure GCC
echo "===> Configuring GCC..."
build_cd ${CURRENT_DIR}/build
echo " Now at: $(pwd)"
cd ${CURRENT_DIR}/${BUILD_DIR}
${GCC_SRC}/configure -v \
--enable-languages=c,c++ \
--prefix=/usr \
@ -46,7 +35,7 @@ make -j$(nproc)
# Make .deb package
echo "===> Making .deb package \"s2oj-gcc-$GCC_VERSION~1baoshuo1.deb\" ..."
make -j$(nproc) DESTDIR=${CURRENT_DIR}/deb install
build_cd ${CURRENT_DIR}/deb
cd ${CURRENT_DIR}/deb
mkdir -p DEBIAN
cat << EOF > DEBIAN/control
Package: s2oj-gcc
@ -57,7 +46,7 @@ Architecture: amd64
Maintainer: Baoshuo <i@baoshuo.ren>
Description: GCC $GCC_VERSION for S2OJ
EOF
build_cd ${CURRENT_DIR}
cd ${CURRENT_DIR}
dpkg-deb --build deb s2oj-gcc-$GCC_VERSION~1baoshuo1.deb
# Upload package to Gitea