Merge pull request #34207 from dtzWill/fix/busybox-misc

busybox: bump copybuf, disable utmp/wtmp when not supported (musl)
This commit is contained in:
Jörg Thalheim
2018-02-10 13:38:43 +00:00
committed by GitHub
+11 -1
View File
@@ -1,11 +1,13 @@
{ stdenv, lib, buildPackages, fetchurl, fetchpatch { stdenv, lib, buildPackages, fetchurl, fetchpatch
, enableStatic ? false , enableStatic ? false
, enableMinimal ? false , enableMinimal ? false
, useMusl ? false, musl , useMusl ? stdenv.hostPlatform.libc == "musl", musl
, extraConfig ? "" , extraConfig ? ""
, buildPlatform, hostPlatform , buildPlatform, hostPlatform
}: }:
assert stdenv.hostPlatform.libc == "musl" -> useMusl;
let let
configParser = '' configParser = ''
function parseconfig { function parseconfig {
@@ -24,6 +26,10 @@ let
} }
''; '';
libcConfig = lib.optionalString useMusl ''
CONFIG_FEATURE_UTMP n
CONFIG_FEATURE_WTMP n
'';
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@@ -67,8 +73,12 @@ stdenv.mkDerivation rec {
# Set paths for console fonts. # Set paths for console fonts.
CONFIG_DEFAULT_SETFONT_DIR "/etc/kbd" CONFIG_DEFAULT_SETFONT_DIR "/etc/kbd"
# Bump from 4KB, much faster I/O
CONFIG_FEATURE_COPYBUF_KB 64
${extraConfig} ${extraConfig}
CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}" CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}"
${libcConfig}
EOF EOF
make oldconfig make oldconfig