diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-14 14:09:01 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-29 17:19:22 -0500 |
commit | e73d805aa9f7349cc32d5a89c20efb7a3f86eba4 (patch) | |
tree | 497ff05efa2bc3e82f6638605772b225a6b9a62a /pkgs/development | |
parent | 946c1b26fa76503110c866f5469ec71b19a509bb (diff) | |
download | nixlib-e73d805aa9f7349cc32d5a89c20efb7a3f86eba4.tar nixlib-e73d805aa9f7349cc32d5a89c20efb7a3f86eba4.tar.gz nixlib-e73d805aa9f7349cc32d5a89c20efb7a3f86eba4.tar.bz2 nixlib-e73d805aa9f7349cc32d5a89c20efb7a3f86eba4.tar.lz nixlib-e73d805aa9f7349cc32d5a89c20efb7a3f86eba4.tar.xz nixlib-e73d805aa9f7349cc32d5a89c20efb7a3f86eba4.tar.zst nixlib-e73d805aa9f7349cc32d5a89c20efb7a3f86eba4.zip |
libelf: Fix cross compilation
There is an upstream bug where it is assumed that if host != build, host doesn't support shared libraries. We override that overly conservative check. See http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html Also clean up some comments.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/libelf/default.nix | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/pkgs/development/libraries/libelf/default.nix b/pkgs/development/libraries/libelf/default.nix index bd0d23bd0cdb..bb1dbe51765e 100644 --- a/pkgs/development/libraries/libelf/default.nix +++ b/pkgs/development/libraries/libelf/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl -, gettext, glibc +{ stdenv +, fetchurl, autoreconfHook, gettext , buildPlatform, hostPlatform }: @@ -17,12 +17,20 @@ stdenv.mkDerivation rec { doCheck = true; - # Libelf's custom NLS macros fail to determine the catalog file extension on - # Darwin, so disable NLS for now. - # FIXME: Eventually make Gettext a build input on all platforms. - configureFlags = stdenv.lib.optional hostPlatform.isDarwin "--disable-nls"; - - nativeBuildInputs = [ gettext ]; + configureFlags = [] + # Configure check for dynamic lib support is broken, see + # http://lists.uclibc.org/pipermail/uclibc-cvs/2005-August/019383.html + ++ stdenv.lib.optional (hostPlatform != buildPlatform) "mr_cv_target_elf=yes" + # Libelf's custom NLS macros fail to determine the catalog file extension + # on Darwin, so disable NLS for now. + ++ stdenv.lib.optional hostPlatform.isDarwin "--disable-nls"; + + nativeBuildInputs = [ gettext ] + # Need to regenerate configure script with newer version in order to pass + # "mr_cv_target_elf=yes", but `autoreconfHook` brings in `makeWrapper` + # which doesn't work with the bootstrapTools bash, so can only do this + # for cross builds when `stdenv.shell` is a newer bash. + ++ stdenv.lib.optional (hostPlatform != buildPlatform) autoreconfHook; meta = { description = "ELF object file access library"; |