Skip to content

Commit c883af2

Browse files
committed
Added workflow to directy download patch Glibc 2.31 source from git (Fixes #89)
1 parent 035dfe5 commit c883af2

File tree

6 files changed

+33
-837
lines changed

6 files changed

+33
-837
lines changed

build-scripts/CI/CIBB_32b

+8-9
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,17 @@ if [ ! -d "binutils-$BINUTILS_VERSION" ]; then
183183
rm ./*.tar.*
184184
fi
185185
if [ ! -d "glibc-$GLIBC_VERSION" ]; then
186-
if [ ! -f "glibc-$GLIBC_VERSION.tar.bz2" ]; then
187-
wget -q --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.bz2
186+
# Download patched Glibc 2.31 if GCC 10 series are being built
187+
if [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
188+
echo "Downloading patched Glibc!"
189+
git clone https://sourceware.org/git/glibc.git --branch release/2.31/master
190+
mv glibc glibc-$GLIBC_VERSION
191+
else
192+
if [ ! -f "glibc-$GLIBC_VERSION.tar.bz2" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.bz2; fi
193+
tar xf glibc-$GLIBC_VERSION.tar.bz2
188194
fi
189-
tar xf glibc-$GLIBC_VERSION.tar.bz2
190195
cd glibc-$GLIBC_VERSION || exit
191196
mkdir -p build
192-
# apply critical patch if Glibc 2.31 and GCC 10 series are being built
193-
if [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
194-
echo "Applying patch!"
195-
wget -O Makefile.patch https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/patches/Makefile.patch
196-
mv Makefile.patch "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/math/Makefile
197-
fi
198197
cd "$DOWNLOADDIR" || exit
199198
rm ./*.tar.*
200199
fi

build-scripts/CI/CIBB_64b

+8-9
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,17 @@ if [ ! -d "binutils-$BINUTILS_VERSION" ]; then
164164
rm ./*.tar.*
165165
fi
166166
if [ ! -d "glibc-$GLIBC_VERSION" ]; then
167-
if [ ! -f "glibc-$GLIBC_VERSION.tar.bz2" ]; then
168-
wget -q --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.bz2
167+
# Download patched Glibc 2.31 if GCC 10 series are being built
168+
if [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
169+
echo "Downloading patched Glibc!"
170+
git clone https://sourceware.org/git/glibc.git --branch release/2.31/master
171+
mv glibc glibc-$GLIBC_VERSION
172+
else
173+
if [ ! -f "glibc-$GLIBC_VERSION.tar.bz2" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.bz2; fi
174+
tar xf glibc-$GLIBC_VERSION.tar.bz2
169175
fi
170-
tar xf glibc-$GLIBC_VERSION.tar.bz2
171176
cd glibc-$GLIBC_VERSION || exit
172177
mkdir -p build
173-
# apply critical patch if Glibc 2.31 and GCC 10 series are being built
174-
if [[ "$GCC_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
175-
echo "Applying patch!"
176-
wget -O Makefile.patch https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/patches/Makefile.patch
177-
mv Makefile.patch "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/math/Makefile
178-
fi
179178
cd "$DOWNLOADDIR" || exit
180179
rm ./*.tar.*
181180
fi

build-scripts/RTBuilder_32b

+9-8
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,17 @@ if [ ! -d "binutils-$BINUTILS_VERSION" ]; then
193193
rm ./*.tar.*
194194
fi
195195
if [ ! -d "glibc-$GLIBC_VERSION" ]; then
196-
if [ ! -f "glibc-$GLIBC_VERSION.tar.bz2" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.bz2; fi
197-
tar xf glibc-$GLIBC_VERSION.tar.bz2
198-
cd glibc-$GLIBC_VERSION || exit
199-
mkdir -p build
200-
# apply critical patch if Glibc 2.31 and GCC 10 series are being built
196+
# Download patched Glibc 2.31 if GCC 10 series are being built
201197
if [[ "$GCCBASE_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
202-
echo "Applying patch!"
203-
wget -O Makefile.patch https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/patches/Makefile.patch
204-
mv Makefile.patch "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/math/Makefile
198+
echo "Downloading patched Glibc!"
199+
git clone https://sourceware.org/git/glibc.git --branch release/2.31/master
200+
mv glibc glibc-$GLIBC_VERSION
201+
else
202+
if [ ! -f "glibc-$GLIBC_VERSION.tar.bz2" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.bz2; fi
203+
tar xf glibc-$GLIBC_VERSION.tar.bz2
205204
fi
205+
cd glibc-$GLIBC_VERSION || exit
206+
mkdir -p build
206207
cd "$DOWNLOADDIR" || exit
207208
rm ./*.tar.*
208209
fi

build-scripts/RTBuilder_64b

+8-9
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,17 @@ if [ ! -d "binutils-$BINUTILS_VERSION" ]; then
176176
rm ./*.tar.*
177177
fi
178178
if [ ! -d "glibc-$GLIBC_VERSION" ]; then
179-
if [ ! -f "glibc-$GLIBC_VERSION.tar.bz2" ]; then
180-
wget -q --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.bz2
179+
# Download patched Glibc 2.31 if GCC 10 series are being built
180+
if [[ "$GCCBASE_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
181+
echo "Downloading patched Glibc!"
182+
git clone https://sourceware.org/git/glibc.git --branch release/2.31/master
183+
mv glibc glibc-$GLIBC_VERSION
184+
else
185+
if [ ! -f "glibc-$GLIBC_VERSION.tar.bz2" ]; then wget -q --no-check-certificate https://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.bz2; fi
186+
tar xf glibc-$GLIBC_VERSION.tar.bz2
181187
fi
182-
tar xf glibc-$GLIBC_VERSION.tar.bz2
183188
cd glibc-$GLIBC_VERSION || exit
184189
mkdir -p build
185-
# apply critical patch if Glibc 2.31 and GCC 10 series are being built
186-
if [[ "$GCCBASE_VERSION" =~ ^10.* ]] && [ "$GLIBC_VERSION" = "2.31" ]; then
187-
echo "Applying patch!"
188-
wget -O Makefile.patch https://raw.githubusercontent.com/abhiTronix/raspberry-pi-cross-compilers/master/patches/Makefile.patch
189-
mv Makefile.patch "$DOWNLOADDIR"/glibc-$GLIBC_VERSION/math/Makefile
190-
fi
191190
cd "$DOWNLOADDIR" || exit
192191
rm ./*.tar.*
193192
fi

0 commit comments

Comments
 (0)