File tree Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change 4545
4646" ${GITHUB_WORKSPACE} /${REPOSITORY} /install_requirements.sh" --example
4747
48- #! /usr/bin/env bash
49- set -euxo pipefail
50-
51- echo " GCC version:"
52- gcc --version
48+ # Print GCC version (just the number)
49+ echo " GCC version: $( gcc -dumpfullversion) "
5350
51+ # Version / directories
5452GLIBC_VERSION=2.29
5553PREFIX=/tmp/glibc-$GLIBC_VERSION
5654BUILD_DIR=/tmp/glibc-build
55+ TARBALL=/tmp/glibc-$GLIBC_VERSION .tar.xz
56+ SRC_DIR=/tmp/glibc-$GLIBC_VERSION
5757
58- # Clean old dirs if they exist
59- rm -rf " $PREFIX " " $BUILD_DIR "
58+ # Clean old dirs/files if they exist
59+ rm -rf " $PREFIX " " $BUILD_DIR " " $SRC_DIR " " $TARBALL "
6060mkdir -p " $BUILD_DIR "
6161
62- # Download
62+ # Download source tarball into /tmp
6363MIRROR=https://ftpmirror.gnu.org/gnu/libc
64- curl -L $MIRROR /glibc-$GLIBC_VERSION .tar.xz -o glibc-$GLIBC_VERSION .tar.xz
65- # curl -sSL https://ftp.gnu.org/gnu/libc/glibc-$GLIBC_VERSION.tar.xz -o /tmp/glibc-$GLIBC_VERSION.tar.xz
66- tar -C /tmp -xf /tmp/glibc-$GLIBC_VERSION .tar.xz
64+ curl -L " $MIRROR /glibc-$GLIBC_VERSION .tar.xz" -o " $TARBALL "
6765
68- cd " $BUILD_DIR "
66+ # Extract into /tmp
67+ tar -C /tmp -xf " $TARBALL "
6968
7069# Configure with relaxed flags
70+ cd " $BUILD_DIR "
7171CFLAGS=" -O2 -fPIC -fcommon -Wno-error=array-parameter -Wno-error=stringop-overflow -Wno-error" \
72- ../glibc-$GLIBC_VERSION /configure --prefix=" $PREFIX "
72+ ../glibc-$GLIBC_VERSION /configure --prefix=" $PREFIX "
7373
74- # Build
74+ # Build & install
7575make -j" $( nproc) " CFLAGS=" $CFLAGS "
76-
77- # Install
7876make install
7977
80- # Check
78+ # Quick check
8179" $PREFIX /lib/ld-2.29.so" --version || true
8280" $PREFIX /lib/libc.so.6" --version || true
You can’t perform that action at this time.
0 commit comments