diff --git a/.github/actions/artifacts/build-pc-artifacts/action.yml b/.github/actions/artifacts/build-pc-artifacts/action.yml index c7acdec2d..d16ef180c 100644 --- a/.github/actions/artifacts/build-pc-artifacts/action.yml +++ b/.github/actions/artifacts/build-pc-artifacts/action.yml @@ -57,7 +57,9 @@ runs: # Install necessary build tools sudo apt-get update - sudo apt-get install -y build-essential gawk manpages-dev wget + sudo apt-get install -y build-essential gawk manpages-dev wget gcc-11 g++-11 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11 # Download and extract glibc wget http://ftp.gnu.org/gnu/libc/glibc-$GLIBC_VERSION.tar.gz @@ -71,7 +73,9 @@ runs: # Configure glibc for static linking ../glibc-$GLIBC_VERSION/configure \ --prefix=/opt/glibc-$GLIBC_VERSION \ - --disable-werror + --disable-werror \ + CFLAGS="-O2 -fno-stack-protector -U_FORTIFY_SOURCE -fno-pie" \ + CXXFLAGS="-O2 -fno-stack-protector -U_FORTIFY_SOURCE -fno-pie" # Build and install glibc make -j$(nproc) @@ -89,6 +93,7 @@ runs: export LIBRARY_PATH=/opt/glibc-$GLIBC_VERSION/lib export C_INCLUDE_PATH=/opt/glibc-$GLIBC_VERSION/include export CPLUS_INCLUDE_PATH=/opt/glibc-$GLIBC_VERSION/include + export LD_LIBRARY_PATH=/opt/glibc-$GLIBC_VERSION/lib:$LD_LIBRARY_PATH # Add Rust target rustup target add x86_64-unknown-linux-gnu