summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@yahoo.com>2017-12-29 17:30:18 -0500
committerGitHub <noreply@github.com>2017-12-29 17:30:18 -0500
commitb1dcc6c2012ef2190caf30043af457c15253abcd (patch)
treee86961af5d8e28f4fff87da964fc2f40005bcdb3 /pkgs/development
parent4d3282f71efb30538b8c8a3fda19db26e7c1f307 (diff)
parent5dea877368227d818cccab3a1380322a2ba83aa0 (diff)
downloadnixlib-b1dcc6c2012ef2190caf30043af457c15253abcd.tar
nixlib-b1dcc6c2012ef2190caf30043af457c15253abcd.tar.gz
nixlib-b1dcc6c2012ef2190caf30043af457c15253abcd.tar.bz2
nixlib-b1dcc6c2012ef2190caf30043af457c15253abcd.tar.lz
nixlib-b1dcc6c2012ef2190caf30043af457c15253abcd.tar.xz
nixlib-b1dcc6c2012ef2190caf30043af457c15253abcd.tar.zst
nixlib-b1dcc6c2012ef2190caf30043af457c15253abcd.zip
Merge pull request #33185 from obsidiansystems/cross-simple
treewide: A few misc cross changes from #26805
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/libelf/default.nix24
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";