1
0
mirror of https://github.com/renbaoshuo/s2oj-gcc.git synced 2024-12-03 16:36:24 +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@//.*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 sed -i 's@//security.ubuntu.com@//mirror-cdn.xtom.com@g' /etc/apt/sources.list
- apt update && - 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 - bash build.sh
environment: environment:
GITEA_ENDPOINT: https://git.m.ac 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="git://gcc.gnu.org/git/gcc.git"
GCC_GIT="https://git.m.ac/mirrors/gcc.git" GCC_GIT="https://git.m.ac/mirrors/gcc.git"
GCC_SRC="${CURRENT_DIR}/../gcc" GCC_SRC="${CURRENT_DIR}/../gcc"
BUILD_DIR="build"
build_cd() {
cd $@
echo "****** Now at: $(pwd)"
}
# Clone GCC # Clone GCC
echo "===> Cloning GCC..." echo "===> Cloning GCC..."
git clone -b "releases/gcc-$GCC_VERSION" --depth 1 "${GCC_GIT}" "${GCC_SRC}" 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 # Apply patches
echo "===> Applying patches..." echo "===> Applying patches..."
build_cd ${GCC_SRC} cd ${GCC_SRC}
patch -p1 < ${CURRENT_DIR}/patches/gcc-$GCC_VERSION.patch patch -p1 < ../patches/gcc-$GCC_VERSION.patch
build_cd ${CURRENT_DIR} cd ${CURRENT_DIR}
# Configure GCC # Configure GCC
echo "===> Configuring GCC..." echo "===> Configuring GCC..."
build_cd ${CURRENT_DIR}/build cd ${CURRENT_DIR}/${BUILD_DIR}
echo " Now at: $(pwd)"
${GCC_SRC}/configure -v \ ${GCC_SRC}/configure -v \
--enable-languages=c,c++ \ --enable-languages=c,c++ \
--prefix=/usr \ --prefix=/usr \
@ -46,7 +35,7 @@ make -j$(nproc)
# Make .deb package # Make .deb package
echo "===> Making .deb package \"s2oj-gcc-$GCC_VERSION~1baoshuo1.deb\" ..." echo "===> Making .deb package \"s2oj-gcc-$GCC_VERSION~1baoshuo1.deb\" ..."
make -j$(nproc) DESTDIR=${CURRENT_DIR}/deb install make -j$(nproc) DESTDIR=${CURRENT_DIR}/deb install
build_cd ${CURRENT_DIR}/deb cd ${CURRENT_DIR}/deb
mkdir -p DEBIAN mkdir -p DEBIAN
cat << EOF > DEBIAN/control cat << EOF > DEBIAN/control
Package: s2oj-gcc Package: s2oj-gcc
@ -57,7 +46,7 @@ Architecture: amd64
Maintainer: Baoshuo <i@baoshuo.ren> Maintainer: Baoshuo <i@baoshuo.ren>
Description: GCC $GCC_VERSION for S2OJ Description: GCC $GCC_VERSION for S2OJ
EOF EOF
build_cd ${CURRENT_DIR} cd ${CURRENT_DIR}
dpkg-deb --build deb s2oj-gcc-$GCC_VERSION~1baoshuo1.deb dpkg-deb --build deb s2oj-gcc-$GCC_VERSION~1baoshuo1.deb
# Upload package to Gitea # Upload package to Gitea