Content-Length: 311063 | pFad | http://github.com/crazywhalecc/static-php-cli/issues/686

83 create our own gcc toolchain for compiling spc-gnu-docker · Issue #686 · crazywhalecc/static-php-cli · GitHub
Skip to content

create our own gcc toolchain for compiling spc-gnu-docker #686

@henderkes

Description

@henderkes

To allow statically linking against libgomp, libstdc++ and so on in -static-pie builds.

Luckily this was super easy to do inside the spc-gnu-docker image itself:

yum install -y wget
wget https://ftp.gwdg.de/pub/misc/gcc/releases/gcc-14.2.0/gcc-14.2.0.tar.gz
tar xzf gcc-14.2.0.tar.gz
cd gcc-14.2.0
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-14.2.0/configure   --prefix=$HOME/GCC-14   --enable-languages=c,c++,go   --enable-default-pie   --enable-default-ssp   --enable-shared   --enable-static   --enable-threads=posix   CFLAGS="-O2 -fPIC -fPIE -g0 -static-libgcc"   CXXFLAGS="-O2 -fPIC -fPIE -g0 -static-libgcc -static-libstdc++" --disable-multilib
make -j4
make install

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/crazywhalecc/static-php-cli/issues/686

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy