|
45 | 45 |
|
46 | 46 | "${GITHUB_WORKSPACE}/${REPOSITORY}/install_requirements.sh" --example |
47 | 47 |
|
48 | | -# Print GCC version (just the number) |
49 | 48 | echo "GCC version: $(gcc -dumpfullversion)" |
50 | 49 |
|
51 | | -# Version / directories |
52 | 50 | GLIBC_VERSION=2.29 |
53 | | -PREFIX=/tmp/glibc-$GLIBC_VERSION |
| 51 | +PREFIX=/tmp/glibc-install-$GLIBC_VERSION |
54 | 52 | BUILD_DIR=/tmp/glibc-build |
55 | 53 | TARBALL=/tmp/glibc-$GLIBC_VERSION.tar.xz |
56 | 54 | SRC_DIR=/tmp/glibc-$GLIBC_VERSION |
57 | 55 |
|
58 | | -# Clean old dirs/files if they exist |
59 | 56 | rm -rf "$PREFIX" "$BUILD_DIR" "$SRC_DIR" "$TARBALL" |
60 | 57 | mkdir -p "$BUILD_DIR" |
61 | 58 |
|
62 | | -# Download source tarball into /tmp |
63 | 59 | MIRROR=https://ftpmirror.gnu.org/gnu/libc |
64 | 60 | curl -L "$MIRROR/glibc-$GLIBC_VERSION.tar.xz" -o "$TARBALL" |
65 | 61 |
|
66 | | -# Extract into /tmp |
67 | 62 | tar -C /tmp -xf "$TARBALL" |
68 | 63 |
|
69 | | -# Configure with relaxed flags |
70 | 64 | cd "$BUILD_DIR" |
71 | | -CFLAGS="-O2 -fPIC -fcommon -Wno-error=array-parameter -Wno-error=stringop-overflow -Wno-error" \ |
72 | | - ../glibc-$GLIBC_VERSION/configure --prefix="$PREFIX" |
73 | 65 |
|
74 | | -# Build & install |
75 | | -make -j"$(nproc)" CFLAGS="$CFLAGS" |
| 66 | +../glibc-$GLIBC_VERSION/configure \ |
| 67 | + --prefix="$PREFIX" \ |
| 68 | + --without-selinux \ |
| 69 | + CFLAGS="-O2 -fPIC -fcommon \ |
| 70 | + -Wno-error=array-parameter \ |
| 71 | + -Wno-error=array-bounds \ |
| 72 | + -Wno-error=maybe-uninitialized \ |
| 73 | + -Wno-error=zero-length-bounds \ |
| 74 | + -Wno-error=stringop-overflow \ |
| 75 | + -Wno-error=deprecated-declarations \ |
| 76 | + -Wno-error" |
| 77 | + |
| 78 | +make -j"$(nproc)" |
76 | 79 | make install |
77 | 80 |
|
78 | | -# Quick check |
79 | 81 | "$PREFIX/lib/ld-2.29.so" --version || true |
80 | 82 | "$PREFIX/lib/libc.so.6" --version || true |
0 commit comments