minimal-bootstrap: trim configure flags and slim python
Adds --enable-checking=release and --disable-{libgomp,libquadmath,libitm,libvtv,libssp,libatomic,libstdcxx-pch,nls} to all GCCs (those runtime libs are unused by the stdenv); switches gcc-4.6{,cxx} to install-strip; adds --disable-nls to binutils and coreutils; adds --disable-test-modules --without-ensurepip --without-static-libpython to python.
Bootstrap self-size 1.45 GB -> 940 MB; gcc46-cxx -14%, glibc -10%, gcc-latest -6% wall on the heavy builds.
(make -j was tried on tcc-built derivations and broke them silently; NOTE comments left in the affected files so this isn't re-attempted.)
This commit is contained in:
@@ -40,6 +40,7 @@ let
|
||||
"--host=${hostPlatform.config}"
|
||||
"--with-sysroot=/"
|
||||
"--disable-dependency-tracking"
|
||||
"--disable-nls"
|
||||
"--enable-deterministic-archives"
|
||||
# depends on bison
|
||||
"--disable-gprofng"
|
||||
|
||||
@@ -40,6 +40,7 @@ let
|
||||
"--host=${hostPlatform.config}"
|
||||
|
||||
"--disable-dependency-tracking"
|
||||
"--disable-nls"
|
||||
|
||||
"--with-sysroot=/"
|
||||
"--enable-deterministic-archives"
|
||||
|
||||
@@ -27,6 +27,7 @@ let
|
||||
"--build=${buildPlatform.config}"
|
||||
"--host=${hostPlatform.config}"
|
||||
"--disable-dependency-tracking"
|
||||
"--disable-nls"
|
||||
# libstdbuf.so fails in static builds
|
||||
"--enable-no-install-program=stdbuf,arch,coreutils,hostname"
|
||||
# Disable PATH_MAX for better reproducibility
|
||||
|
||||
@@ -32,6 +32,7 @@ let
|
||||
"--build=${buildPlatform.config}"
|
||||
"--host=${hostPlatform.config}"
|
||||
"--disable-dependency-tracking"
|
||||
"--disable-nls"
|
||||
# libstdbuf.so fails in static builds
|
||||
"--enable-no-install-program=stdbuf"
|
||||
"--enable-single-binary=symlinks"
|
||||
|
||||
@@ -67,6 +67,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--prefix=$out
|
||||
|
||||
# Build
|
||||
# NOTE: parallel build (-j) breaks gawk autoconf'd Makefile under tcc-mes; keep serial.
|
||||
make gawk
|
||||
|
||||
# Install
|
||||
|
||||
@@ -139,12 +139,21 @@ bash.runCommand "${pname}-${version}"
|
||||
--with-native-system-header-dir=/include \
|
||||
--with-sysroot=${musl} \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-checking=release \
|
||||
--disable-bootstrap \
|
||||
--disable-dependency-tracking \
|
||||
--disable-libmpx \
|
||||
--disable-libsanitizer \
|
||||
--disable-libssp \
|
||||
--disable-libgomp \
|
||||
--disable-libquadmath \
|
||||
--disable-libitm \
|
||||
--disable-libvtv \
|
||||
--disable-libatomic \
|
||||
--disable-libstdcxx-pch \
|
||||
--disable-lto \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-plugin
|
||||
|
||||
# Build
|
||||
|
||||
@@ -142,16 +142,21 @@ bash.runCommand "${pname}-${version}"
|
||||
--with-native-system-header-dir=${musl}/include \
|
||||
--with-build-sysroot=${musl} \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-checking=release \
|
||||
--disable-bootstrap \
|
||||
--disable-dependency-tracking \
|
||||
--disable-libgomp \
|
||||
--disable-libmudflap \
|
||||
--disable-libquadmath \
|
||||
--disable-libssp \
|
||||
--disable-libstdcxx-pch \
|
||||
--disable-lto \
|
||||
--disable-multilib
|
||||
--disable-multilib \
|
||||
--disable-nls
|
||||
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
make -j $NIX_BUILD_CORES install-strip
|
||||
''
|
||||
|
||||
@@ -124,6 +124,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--host=${fakeHostPlatform} \
|
||||
--with-native-system-header-dir=${tinycc.libs}/include \
|
||||
--with-build-sysroot=${tinycc.libs}/include \
|
||||
--enable-checking=release \
|
||||
--disable-bootstrap \
|
||||
--disable-decimal-float \
|
||||
--disable-dependency-tracking \
|
||||
@@ -139,6 +140,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--disable-lto \
|
||||
--disable-lto-plugin \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-plugin \
|
||||
--disable-threads \
|
||||
--enable-languages=c \
|
||||
@@ -152,5 +154,5 @@ bash.runCommand "${pname}-${version}"
|
||||
make -j $NIX_BUILD_CORES
|
||||
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
make -j $NIX_BUILD_CORES install-strip
|
||||
''
|
||||
|
||||
@@ -133,11 +133,20 @@ bash.runCommand "${pname}-${version}"
|
||||
--host=${hostPlatform.config} \
|
||||
--with-native-system-header-dir=${glibc}/include \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-checking=release \
|
||||
--disable-bootstrap \
|
||||
--disable-dependency-tracking \
|
||||
--disable-libsanitizer \
|
||||
--disable-libssp \
|
||||
--disable-libgomp \
|
||||
--disable-libquadmath \
|
||||
--disable-libitm \
|
||||
--disable-libvtv \
|
||||
--disable-libatomic \
|
||||
--disable-libstdcxx-pch \
|
||||
--disable-lto \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-plugin \
|
||||
--with-specs="%x{-dynamic-linker=${glibc}/lib/${linkerName}} %x{-L${glibc}/lib/} -B${glibc}/lib"
|
||||
|
||||
|
||||
@@ -134,11 +134,20 @@ bash.runCommand "${pname}-${version}"
|
||||
--with-native-system-header-dir=/include \
|
||||
--with-sysroot=${musl} \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-checking=release \
|
||||
--disable-bootstrap \
|
||||
--disable-dependency-tracking \
|
||||
--disable-libsanitizer \
|
||||
--disable-libssp \
|
||||
--disable-libgomp \
|
||||
--disable-libquadmath \
|
||||
--disable-libitm \
|
||||
--disable-libvtv \
|
||||
--disable-libatomic \
|
||||
--disable-libstdcxx-pch \
|
||||
--disable-lto \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-plugin
|
||||
|
||||
# Build
|
||||
|
||||
@@ -50,6 +50,7 @@ bash.runCommand "${pname}-${version}"
|
||||
cp ${./main.mk} Makefile
|
||||
|
||||
# Build
|
||||
# NOTE: parallel build (-j) breaks custom Makefile here; keep serial.
|
||||
make CC="tcc -B ${tinycc.libs}/lib"
|
||||
|
||||
# Install
|
||||
|
||||
@@ -72,6 +72,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--disable-dependency-tracking
|
||||
|
||||
# Build
|
||||
# NOTE: parallel build (-j) under tcc-musl is unstable; keep serial.
|
||||
make AR="tcc -ar"
|
||||
|
||||
# Install
|
||||
|
||||
@@ -65,6 +65,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--prefix=$out
|
||||
|
||||
# Build
|
||||
# NOTE: parallel build (-j) under tcc-musl is unstable; keep serial.
|
||||
make AR="tcc -ar"
|
||||
|
||||
# Install
|
||||
|
||||
@@ -55,6 +55,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--prefix=$out
|
||||
|
||||
# Build
|
||||
# NOTE: parallel build (-j) breaks gnutar build under tcc-mes; keep serial.
|
||||
make AR="tcc -ar"
|
||||
|
||||
# Install
|
||||
|
||||
@@ -60,6 +60,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--disable-nls
|
||||
|
||||
# Build
|
||||
# NOTE: parallel build (-j) under tcc-musl is unstable; keep serial.
|
||||
make AR="tcc -ar"
|
||||
|
||||
# Install
|
||||
|
||||
@@ -55,6 +55,7 @@ bash.runCommand "${pname}-${version}"
|
||||
--disable-dependency-tracking
|
||||
|
||||
# Build
|
||||
# NOTE: parallel build (-j) under tinycc-bootstrappable is unstable; keep serial.
|
||||
make
|
||||
|
||||
# Install
|
||||
|
||||
@@ -88,6 +88,7 @@ bash.runCommand "${pname}-${version}"
|
||||
CC=tcc
|
||||
|
||||
# Build
|
||||
# NOTE: parallel build (-j) under tcc here is unstable and broke a previous run.
|
||||
make AR="tcc -ar" RANLIB=true CFLAGS="-DSYSCALL_NO_TLS"
|
||||
|
||||
# Install
|
||||
|
||||
@@ -88,7 +88,10 @@ bash.runCommand "${pname}-${version}"
|
||||
bash ./configure \
|
||||
--prefix=$out \
|
||||
--build=${buildPlatform.config} \
|
||||
--host=${hostPlatform.config}
|
||||
--host=${hostPlatform.config} \
|
||||
--disable-test-modules \
|
||||
--without-ensurepip \
|
||||
--without-static-libpython
|
||||
|
||||
# Build
|
||||
make -j $NIX_BUILD_CORES
|
||||
|
||||
Reference in New Issue
Block a user