mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
Remove obsolete useDietLibC stdenv adapter
This commit is contained in:
parent
937e1280c0
commit
5cc92eb0d8
@ -11,20 +11,10 @@ stdenv.mkDerivation {
|
||||
sha256 = "8dd3de546aeb1ae42fb05409aeb724a145fe9aa1dbe1115441c2297c9d48cf31";
|
||||
};
|
||||
|
||||
configureFlags =
|
||||
if stdenv ? isDietLibC
|
||||
then ""
|
||||
else "--enable-dynamic-e2fsck --enable-elf-shlibs";
|
||||
configureFlags ="--enable-dynamic-e2fsck --enable-elf-shlibs";
|
||||
buildInputs = [gettext];
|
||||
preInstall = "installFlagsArray=('LN=ln -s')";
|
||||
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 !!!!
|
||||
|
@ -23,10 +23,6 @@ stdenv.mkDerivation {
|
||||
|
||||
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 = {
|
||||
homepage = http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/;
|
||||
description = "Tools for loading and managing Linux kernel modules";
|
||||
|
@ -29,36 +29,6 @@ rec {
|
||||
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
|
||||
# statically linked binaries.
|
||||
useKlibc = stdenv: klibc: stdenv //
|
||||
|
@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
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'";
|
||||
|
||||
|
@ -43,7 +43,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
dontDisableStatic = linkStatic;
|
||||
|
||||
CFLAGS = if stdenv ? isDietLibC then "-DHAVE_INET_NTOA_R_2_ARGS=1" else "";
|
||||
LDFLAGS = if linkStatic then "-static" else "";
|
||||
CXX = "g++";
|
||||
CXXCPP = "g++ -E";
|
||||
|
@ -47,7 +47,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
dontDisableStatic = linkStatic;
|
||||
|
||||
CFLAGS = if stdenv ? isDietLibC then "-DHAVE_INET_NTOA_R_2_ARGS=1" else "";
|
||||
LDFLAGS = if linkStatic then "-static" else "";
|
||||
CXX = "g++";
|
||||
CXXCPP = "g++ -E";
|
||||
|
Loading…
Reference in New Issue
Block a user