busybox: fix static build

This commit is contained in:
Nikolay Amiantov 2016-07-19 04:37:14 +03:00
parent 60624a4625
commit 28740462e7

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, musl
{ stdenv, lib, fetchurl, glibc, musl
, enableStatic ? false
, enableMinimal ? false
, useMusl ? false
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
CONFIG_LFS y
${stdenv.lib.optionalString enableStatic ''
${lib.optionalString enableStatic ''
CONFIG_STATIC y
''}
@ -64,10 +64,12 @@ stdenv.mkDerivation rec {
EOF
make oldconfig
'' + stdenv.lib.optionalString useMusl ''
'' + lib.optionalString useMusl ''
makeFlagsArray+=("CC=gcc -isystem ${musl}/include -B${musl}/lib -L${musl}/lib")
'';
buildInputs = lib.optionals (enableStatic && !useMusl) [ glibc glibc.static ];
crossAttrs = {
extraCrossConfig = ''
CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cross.config}-"