minimal-bootstrap: prune unused configure flags (#517368)
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user