Skip to content

Commit 2675961

Browse files
committed
use gcc 11
1 parent dc851f1 commit 2675961

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

.ci/scripts/wheel/pre_build_script.sh

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,18 @@ fi
4545

4646
"${GITHUB_WORKSPACE}/${REPOSITORY}/install_requirements.sh" --example
4747

48-
# Install glibc-2.29
48+
# Install glibc-2.34
4949

50-
echo "GCC version: $(gcc -dumpfullversion)"
50+
# Install older GCC (works on GitHub Ubuntu runners)
51+
sudo apt-get update
52+
sudo apt-get install -y gcc-11 g++-11
53+
54+
# Force glibc build to use GCC 11
55+
export CC=gcc-11
56+
export CXX=g++-11
57+
58+
echo "GCC version (system default): $(gcc -dumpfullversion)"
59+
echo "GCC version (forced CC): $($CC -dumpfullversion)"
5160

5261
# 👇 only change this line to bump version
5362
GLIBC_VERSION=2.34
@@ -77,22 +86,11 @@ cd "$BUILD_DIR"
7786
# Unset LD_LIBRARY_PATH to satisfy glibc configure
7887
unset LD_LIBRARY_PATH
7988

80-
# Suppress GCC 13+ warnings
81-
COMMON_FLAGS="-O2 -fPIC -fcommon \
82-
-Wno-error \
83-
-Wno-error=array-parameter \
84-
-Wno-error=array-bounds \
85-
-Wno-error=maybe-uninitialized \
86-
-Wno-error=zero-length-bounds \
87-
-Wno-error=stringop-overflow \
88-
-Wno-error=deprecated-declarations \
89-
-Wno-error=use-after-free \
90-
-Wno-error=builtin-declaration-mismatch \
91-
-Wno-error=attributes \
92-
-Wno-error=implicit-function-declaration"
93-
89+
# Suppress GCC warnings (GCC 11 is more compatible, but keep flags)
90+
COMMON_FLAGS="-O2 -fPIC -fcommon -Wno-error"
9491
export CFLAGS="$COMMON_FLAGS"
9592
export CPPFLAGS="$COMMON_FLAGS"
93+
export CXXFLAGS="$COMMON_FLAGS"
9694

9795
# Configure
9896
../glibc-$GLIBC_VERSION/configure \

0 commit comments

Comments
 (0)