Remove obsolete useDietLibC stdenv adapter
This commit is contained in:
parent
937e1280c0
commit
5cc92eb0d8
@ -11,20 +11,10 @@ stdenv.mkDerivation {
|
|||||||
sha256 = "8dd3de546aeb1ae42fb05409aeb724a145fe9aa1dbe1115441c2297c9d48cf31";
|
sha256 = "8dd3de546aeb1ae42fb05409aeb724a145fe9aa1dbe1115441c2297c9d48cf31";
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags =
|
configureFlags ="--enable-dynamic-e2fsck --enable-elf-shlibs";
|
||||||
if stdenv ? isDietLibC
|
|
||||||
then ""
|
|
||||||
else "--enable-dynamic-e2fsck --enable-elf-shlibs";
|
|
||||||
buildInputs = [gettext];
|
buildInputs = [gettext];
|
||||||
preInstall = "installFlagsArray=('LN=ln -s')";
|
preInstall = "installFlagsArray=('LN=ln -s')";
|
||||||
postInstall = "make install-libs";
|
postInstall = "make install-libs";
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE =
|
|
||||||
if stdenv ? isDietLibC then
|
|
||||||
"-UHAVE_SYS_PRCTL_H " +
|
|
||||||
(if stdenv.system == "x86_64-linux" then "-DHAVE_LSEEK64_PROTOTYPE=1 -Dstat64=stat" else "")
|
|
||||||
else "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#note that ext3cow requires the ext3cow kernel patch !!!!
|
#note that ext3cow requires the ext3cow kernel patch !!!!
|
||||||
|
@ -23,10 +23,6 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
postInstall = "rm $out/sbin/insmod.static"; # don't need it
|
postInstall = "rm $out/sbin/insmod.static"; # don't need it
|
||||||
|
|
||||||
# We don't want bash (and therefore glibc) in the closure of the
|
|
||||||
# output, since we want to put this in a initrd.
|
|
||||||
dontPatchShebangs = stdenv ? isDietLibC;
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/;
|
homepage = http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/;
|
||||||
description = "Tools for loading and managing Linux kernel modules";
|
description = "Tools for loading and managing Linux kernel modules";
|
||||||
|
@ -29,36 +29,6 @@ rec {
|
|||||||
overrideSetup = stdenv: setupScript: stdenv.override { inherit setupScript; };
|
overrideSetup = stdenv: setupScript: stdenv.override { inherit setupScript; };
|
||||||
|
|
||||||
|
|
||||||
# Return a modified stdenv that uses dietlibc to create small
|
|
||||||
# statically linked binaries.
|
|
||||||
useDietLibC = stdenv: stdenv //
|
|
||||||
{ mkDerivation = args: stdenv.mkDerivation (args // {
|
|
||||||
NIX_CFLAGS_LINK = "-static";
|
|
||||||
|
|
||||||
# libcompat.a contains some commonly used functions.
|
|
||||||
NIX_LDFLAGS = "-lcompat";
|
|
||||||
|
|
||||||
# These are added *after* the command-line flags, so we'll
|
|
||||||
# always optimise for size.
|
|
||||||
NIX_CFLAGS_COMPILE =
|
|
||||||
args.NIX_CFLAGS_COMPILE or ""
|
|
||||||
+ " -Os -s -D_BSD_SOURCE=1";
|
|
||||||
|
|
||||||
configureFlags =
|
|
||||||
args.configureFlags or ""
|
|
||||||
+ " --disable-shared"; # brrr...
|
|
||||||
|
|
||||||
NIX_GCC = import ../build-support/gcc-wrapper {
|
|
||||||
inherit stdenv;
|
|
||||||
libc = pkgs.dietlibc;
|
|
||||||
inherit (stdenv.gcc) gcc binutils nativeTools nativePrefix;
|
|
||||||
nativeLibc = false;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
isDietLibC = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# Return a modified stdenv that uses klibc to create small
|
# Return a modified stdenv that uses klibc to create small
|
||||||
# statically linked binaries.
|
# statically linked binaries.
|
||||||
useKlibc = stdenv: klibc: stdenv //
|
useKlibc = stdenv: klibc: stdenv //
|
||||||
|
@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
sharedLibrary =
|
sharedLibrary =
|
||||||
!stdenv.isDarwin && !(stdenv ? isDietLibC) && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic;
|
!stdenv.isDarwin && !(stdenv ? isStatic) && stdenv.system != "i686-cygwin" && !linkStatic;
|
||||||
|
|
||||||
preConfigure = "substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'";
|
preConfigure = "substituteInPlace Makefile --replace '$(PREFIX)/man' '$(PREFIX)/share/man'";
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
dontDisableStatic = linkStatic;
|
dontDisableStatic = linkStatic;
|
||||||
|
|
||||||
CFLAGS = if stdenv ? isDietLibC then "-DHAVE_INET_NTOA_R_2_ARGS=1" else "";
|
|
||||||
LDFLAGS = if linkStatic then "-static" else "";
|
LDFLAGS = if linkStatic then "-static" else "";
|
||||||
CXX = "g++";
|
CXX = "g++";
|
||||||
CXXCPP = "g++ -E";
|
CXXCPP = "g++ -E";
|
||||||
|
@ -47,7 +47,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
dontDisableStatic = linkStatic;
|
dontDisableStatic = linkStatic;
|
||||||
|
|
||||||
CFLAGS = if stdenv ? isDietLibC then "-DHAVE_INET_NTOA_R_2_ARGS=1" else "";
|
|
||||||
LDFLAGS = if linkStatic then "-static" else "";
|
LDFLAGS = if linkStatic then "-static" else "";
|
||||||
CXX = "g++";
|
CXX = "g++";
|
||||||
CXXCPP = "g++ -E";
|
CXXCPP = "g++ -E";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user