ghc*Binary: use $OBJCOPY when invoking objcopy (touchup musl fix)

This commit is contained in:
Will Dietz 2019-03-18 01:55:01 -05:00
parent 9a10434f4d
commit 93e3eecdb3
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ stdenv.mkDerivation rec {
# [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
# Use objcopy magic to make the change:
stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
find ./ghc-${version}/rts -name "libHSrts*.a" -exec objcopy --redefine-sym __strdup=strdup {} \;
find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
'';
configurePlatforms = [ ];

View File

@ -107,7 +107,7 @@ stdenv.mkDerivation rec {
# [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
# Use objcopy magic to make the change:
stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
find ./ghc-${version}/rts -name "libHSrts*.a" -exec objcopy --redefine-sym __strdup=strdup {} \;
find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
'';
configurePlatforms = [ ];