Skip to content

Commit

Permalink
Patched critical bug in GCC-10 series toolchains for bullseye (Fixes #90
Browse files Browse the repository at this point in the history
)

- Implemented workflow to directly download patched GCC-10 source master branch from git when compiling bullseye toolchains.
- For more information on this bug, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101723
  • Loading branch information
abhiTronix committed Dec 12, 2021
1 parent 5f2dd15 commit 3c96a72
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 16 deletions.
11 changes: 9 additions & 2 deletions build-scripts/CI/CICTB_32b
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,15 @@ if [ ! -d "gdb-$GDB_VERSION" ]; then
rm ./*.tar.*
fi
if [ ! -d "gcc-$GCC_VERSION" ]; then
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz; fi
tar xf gcc-"$GCC_VERSION".tar.gz
# Download patched GCC 10 series for bullseye
if [ "$RPIOS_TYPE" = "bullseye" ] && [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GCC_VERSION" != "10.2.0" ]; then
echo "Downloading patched GCC-10!"
git clone https://sourceware.org/git/gcc.git --branch releases/gcc-10
mv gcc gcc-$GCC_VERSION
else
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz; fi
tar xf gcc-"$GCC_VERSION".tar.gz
fi
cd gcc-"$GCC_VERSION" || exit
mkdir -p build
sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
Expand Down
11 changes: 8 additions & 3 deletions build-scripts/CI/CICTB_64b
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,15 @@ if [ ! -d "gdb-$GDB_VERSION" ]; then
rm ./*.tar.*
fi
if [ ! -d "gcc-$GCC_VERSION" ]; then
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then
wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz
# Download patched GCC 10 series for bullseye
if [ "$RPIOS_TYPE" = "bullseye" ] && [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GCC_VERSION" != "10.2.0" ]; then
echo "Downloading patched GCC-10!"
git clone https://sourceware.org/git/gcc.git --branch releases/gcc-10
mv gcc gcc-$GCC_VERSION
else
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz; fi
tar xf gcc-"$GCC_VERSION".tar.gz
fi
tar xf gcc-"$GCC_VERSION".tar.gz
cd gcc-"$GCC_VERSION" || exit
mkdir -p build
sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
Expand Down
11 changes: 8 additions & 3 deletions build-scripts/CI/CINTB_32b
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,15 @@ if [ ! -d "gdb-$GDB_VERSION" ]; then
rm ./*.tar.*
fi
if [ ! -d "gcc-$GCC_VERSION" ]; then
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then
wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz
# Download patched GCC 10 series for bullseye
if [ "$RPIOS_TYPE" = "bullseye" ] && [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GCC_VERSION" != "10.2.0" ]; then
echo "Downloading patched GCC-10!"
git clone https://sourceware.org/git/gcc.git --branch releases/gcc-10
mv gcc gcc-$GCC_VERSION
else
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz; fi
tar xf gcc-"$GCC_VERSION".tar.gz
fi
tar xf gcc-"$GCC_VERSION".tar.gz
cd gcc-"$GCC_VERSION" || exit
mkdir -p build
sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
Expand Down
11 changes: 8 additions & 3 deletions build-scripts/CI/CINTB_64b
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,15 @@ if [ ! -d "gdb-$GDB_VERSION" ]; then
rm ./*.tar.*
fi
if [ ! -d "gcc-$GCC_VERSION" ]; then
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then
wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz
# Download patched GCC 10 series for bullseye
if [ "$RPIOS_TYPE" = "bullseye" ] && [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GCC_VERSION" != "10.2.0" ]; then
echo "Downloading patched GCC-10!"
git clone https://sourceware.org/git/gcc.git --branch releases/gcc-10
mv gcc gcc-$GCC_VERSION
else
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz; fi
tar xf gcc-"$GCC_VERSION".tar.gz
fi
tar xf gcc-"$GCC_VERSION".tar.gz
cd gcc-"$GCC_VERSION" || exit
mkdir -p build
sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
Expand Down
11 changes: 9 additions & 2 deletions build-scripts/RTBuilder_32b
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,15 @@ if [ ! -d "gdb-$GDB_VERSION" ]; then
rm ./*.tar.*
fi
if [ ! -d "gcc-$GCC_VERSION" ]; then
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz; fi
tar xf gcc-"$GCC_VERSION".tar.gz
# Download patched GCC 10 series for bullseye
if [ "$RPIOS_TYPE" = "bullseye" ] && [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GCC_VERSION" != "10.2.0" ]; then
echo "Downloading patched GCC-10!"
git clone https://sourceware.org/git/gcc.git --branch releases/gcc-10
mv gcc gcc-$GCC_VERSION
else
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz; fi
tar xf gcc-"$GCC_VERSION".tar.gz
fi
cd gcc-"$GCC_VERSION" || exit
mkdir -p build
sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
Expand Down
11 changes: 8 additions & 3 deletions build-scripts/RTBuilder_64b
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,15 @@ if [ ! -d "gdb-$GDB_VERSION" ]; then
rm ./*.tar.*
fi
if [ ! -d "gcc-$GCC_VERSION" ]; then
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then
wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz
# Download patched GCC 10 series for bullseye
if [ "$RPIOS_TYPE" = "bullseye" ] && [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GCC_VERSION" != "10.2.0" ]; then
echo "Downloading patched GCC-10!"
git clone https://sourceware.org/git/gcc.git --branch releases/gcc-10
mv gcc gcc-$GCC_VERSION
else
if [ ! -f "gcc-$GCC_VERSION.tar.gz" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VERSION"/gcc-"$GCC_VERSION".tar.gz; fi
tar xf gcc-"$GCC_VERSION".tar.gz
fi
tar xf gcc-"$GCC_VERSION".tar.gz
cd gcc-"$GCC_VERSION" || exit
mkdir -p build
sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
Expand Down

0 comments on commit 3c96a72

Please sign in to comment.