diff --git a/pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix index 4ba20f13192e..eb34c121e9da 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/binutils/default.nix @@ -54,6 +54,8 @@ let # libbfd and libopcodes into a default visibility. Drop default lib # path to force users to declare their use of these libraries. "--with-lib-path=:" + "--disable-gold" + "--disable-plugins" ]; in bash.runCommand "${pname}-${version}" diff --git a/pkgs/os-specific/linux/minimal-bootstrap/binutils/static.nix b/pkgs/os-specific/linux/minimal-bootstrap/binutils/static.nix index fd0681ca4d41..90e2eb8126ea 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/binutils/static.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/binutils/static.nix @@ -56,6 +56,8 @@ let # libbfd and libopcodes into a default visibility. Drop default lib # path to force users to declare their use of these libraries. "--with-lib-path=:" + "--disable-gold" + "--disable-plugins" ]; in bash.runCommand "${pname}-${version}" diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gcc/10.nix b/pkgs/os-specific/linux/minimal-bootstrap/gcc/10.nix index 090b939acd7f..25b06eb13f00 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gcc/10.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gcc/10.nix @@ -48,12 +48,6 @@ let url = "mirror://gnu/mpc/mpc-${mpcVersion}.tar.gz"; hash = "sha256-q2QkkvXPiCt0qgy3MM1BCoHtzb7IlRg86TDnBsHHWbg="; }; - - islVersion = "0.24"; - isl = fetchurl { - url = "https://gcc.gnu.org/pub/gcc/infrastructure/isl-${islVersion}.tar.bz2"; - hash = "sha256-/PeN2WVsEOuM+fvV9ZoLawE4YgX+GTSzsoegoYmBRcA="; - }; in bash.runCommand "${pname}-${version}" { @@ -112,13 +106,11 @@ bash.runCommand "${pname}-${version}" tar xf ${gmp} tar xf ${mpfr} tar xf ${mpc} - tar xf ${isl} cd gcc-${version} ln -s ../gmp-${gmpVersion} gmp ln -s ../mpfr-${mpfrVersion} mpfr ln -s ../mpc-${mpcVersion} mpc - ln -s ../isl-${islVersion} isl # Patch # doesn't recognise musl @@ -127,7 +119,10 @@ bash.runCommand "${pname}-${version}" # Configure export CC="gcc -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" export CXX="g++ -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" - export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" + export CFLAGS="-O1" + export CXXFLAGS="-O1" + export CFLAGS_FOR_TARGET="-O0 -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" + export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET" export C_INCLUDE_PATH="${musl}/include" export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH" export LIBRARY_PATH="${musl}/lib" @@ -154,7 +149,10 @@ bash.runCommand "${pname}-${version}" --disable-lto \ --disable-multilib \ --disable-nls \ - --disable-plugin + --disable-plugin \ + --without-isl \ + --disable-libstdcxx-filesystem-ts \ + --disable-shared # Build make -j $NIX_BUILD_CORES diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gcc/4.6.cxx.nix b/pkgs/os-specific/linux/minimal-bootstrap/gcc/4.6.cxx.nix index 0f442367f72f..3016e751e72f 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gcc/4.6.cxx.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gcc/4.6.cxx.nix @@ -130,7 +130,10 @@ bash.runCommand "${pname}-${version}" # Configure export CC="gcc -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" - export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" + export CFLAGS="-O1" + export CXXFLAGS="-O1" + export CFLAGS_FOR_TARGET="-O0 -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" + export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET" export C_INCLUDE_PATH="${musl}/include" export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH" export LIBRARY_PATH="${musl}/lib" @@ -152,7 +155,9 @@ bash.runCommand "${pname}-${version}" --disable-libstdcxx-pch \ --disable-lto \ --disable-multilib \ - --disable-nls + --disable-nls \ + --disable-libsanitizer \ + --disable-shared # Build make -j $NIX_BUILD_CORES diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gcc/4.6.nix b/pkgs/os-specific/linux/minimal-bootstrap/gcc/4.6.nix index d9c37f5a0562..7c533e2d0d5b 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gcc/4.6.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gcc/4.6.nix @@ -110,6 +110,7 @@ bash.runCommand "${pname}-${version}" # Configure export CC="tcc -B ${tinycc.libs}/lib" + export CFLAGS="-O2" export C_INCLUDE_PATH="${tinycc.libs}/include:$(pwd)/mpfr/src" export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH" diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gcc/glibc.nix b/pkgs/os-specific/linux/minimal-bootstrap/gcc/glibc.nix index 890098aa66b9..3188453cea74 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gcc/glibc.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gcc/glibc.nix @@ -52,12 +52,6 @@ let url = "mirror://gnu/mpc/mpc-${mpcVersion}.tar.gz"; hash = "sha256-q2QkkvXPiCt0qgy3MM1BCoHtzb7IlRg86TDnBsHHWbg="; }; - - islVersion = "0.24"; - isl = fetchurl { - url = "https://gcc.gnu.org/pub/gcc/infrastructure/isl-${islVersion}.tar.bz2"; - hash = "sha256-/PeN2WVsEOuM+fvV9ZoLawE4YgX+GTSzsoegoYmBRcA="; - }; in bash.runCommand "${pname}-${version}" { @@ -115,17 +109,19 @@ bash.runCommand "${pname}-${version}" tar xf ${gmp} tar xf ${mpfr} tar xf ${mpc} - tar xf ${isl} cd gcc-${version} ln -s ../gmp-${gmpVersion} gmp ln -s ../mpfr-${mpfrVersion} mpfr ln -s ../mpc-${mpcVersion} mpc - ln -s ../isl-${islVersion} isl # Configure export CC="gcc -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" export CXX="g++ -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" + export CFLAGS="-O1 -pipe" + export CXXFLAGS="-O1 -pipe" + export CFLAGS_FOR_TARGET="-O0" + export CXXFLAGS_FOR_TARGET="-O0" bash ./configure \ --prefix=$out \ @@ -148,7 +144,10 @@ bash.runCommand "${pname}-${version}" --disable-multilib \ --disable-nls \ --disable-plugin \ - --with-specs="%x{-dynamic-linker=${glibc}/lib/${linkerName}} %x{-L${glibc}/lib/} -B${glibc}/lib" + --with-specs="%x{-dynamic-linker=${glibc}/lib/${linkerName}} %x{-L${glibc}/lib/} -B${glibc}/lib" \ + --without-isl \ + --disable-libstdcxx-backtrace \ + --disable-libstdcxx-filesystem-ts # Build make -j $NIX_BUILD_CORES diff --git a/pkgs/os-specific/linux/minimal-bootstrap/gcc/latest.nix b/pkgs/os-specific/linux/minimal-bootstrap/gcc/latest.nix index e55acf5caecd..d003f164abad 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/gcc/latest.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/gcc/latest.nix @@ -45,12 +45,6 @@ let url = "mirror://gnu/mpc/mpc-${mpcVersion}.tar.gz"; hash = "sha256-q2QkkvXPiCt0qgy3MM1BCoHtzb7IlRg86TDnBsHHWbg="; }; - - islVersion = "0.24"; - isl = fetchurl { - url = "https://gcc.gnu.org/pub/gcc/infrastructure/isl-${islVersion}.tar.bz2"; - hash = "sha256-/PeN2WVsEOuM+fvV9ZoLawE4YgX+GTSzsoegoYmBRcA="; - }; in bash.runCommand "${pname}-${version}" { @@ -109,13 +103,11 @@ bash.runCommand "${pname}-${version}" tar xf ${gmp} tar xf ${mpfr} tar xf ${mpc} - tar xf ${isl} cd gcc-${version} ln -s ../gmp-${gmpVersion} gmp ln -s ../mpfr-${mpfrVersion} mpfr ln -s ../mpc-${mpcVersion} mpc - ln -s ../isl-${islVersion} isl # Patch # force musl even if host triple is gnu @@ -124,7 +116,10 @@ bash.runCommand "${pname}-${version}" # Configure export CC="gcc -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" export CXX="g++ -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" - export CFLAGS_FOR_TARGET="-Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" + export CFLAGS="-O1" + export CXXFLAGS="-O1" + export CFLAGS_FOR_TARGET="-O0 -Wl,-dynamic-linker -Wl,${musl}/lib/libc.so" + export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET" export LIBRARY_PATH="${musl}/lib" bash ./configure \ @@ -148,7 +143,9 @@ bash.runCommand "${pname}-${version}" --disable-lto \ --disable-multilib \ --disable-nls \ - --disable-plugin + --disable-plugin \ + --without-isl \ + --disable-shared # Build make -j $NIX_BUILD_CORES diff --git a/pkgs/os-specific/linux/minimal-bootstrap/glibc/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/glibc/default.nix index a9694d349f5e..f156f862ecc0 100644 --- a/pkgs/os-specific/linux/minimal-bootstrap/glibc/default.nix +++ b/pkgs/os-specific/linux/minimal-bootstrap/glibc/default.nix @@ -98,12 +98,18 @@ bash.runCommand "${pname}-${version}" cd build # libstdc++.so is built against musl and fails to link export CXX=false + export CFLAGS="-O1" bash ../configure \ --prefix=$out \ --build=${buildPlatform.config} \ --host=${hostPlatform.config} \ --with-headers=${linux-headers}/include \ - --disable-dependency-tracking + --disable-dependency-tracking \ + --disable-nscd \ + --disable-build-nscd \ + --disable-profile \ + --disable-timezone-tools \ + --disable-mathvec # Build make -j $NIX_BUILD_CORES