git.iko.soy/typeable/nixpkgs
on master help sign in
libelf: Modernize and fix for cross
commit2e337fe969a55f66dcd41715b73f9c68acc38867 authorJohn Ericson <Ericson2314@Yahoo.com> dateSat 3 Jun 2017, 19:36 (9 years ago) parentc54c3cb
2 files changed+21−7
pkgs/development/libraries/libelf/cross-ar.patch+11 pkgs/development/libraries/libelf/default.nix+10−7
pkgs/development/libraries/libelf/cross-ar.patchnew file+11
@@ -0,0 +1,11 @@
1+--- a/lib/Makefile.in
2++++ b/lib/Makefile.in
3+@@ -27,7 +27,7 @@ installdirs = $(libdir) $(includedir) $(includedir)/libelf
4+
5+ CC = @CC@
6+ LD = @LD@
7+-AR = ar
8++AR ?= ar
9+ MV = mv -f
10+ RM = rm -f
11+ LN_S = @LN_S@
pkgs/development/libraries/libelf/default.nix+10−7
@@ -1,4 +1,7 @@
1−{ fetchurl, stdenv, gettext, glibc }:
1+{ stdenv, fetchurl
2+, gettext, glibc
3+, buildPlatform, hostPlatform
4+}:
25
36stdenv.mkDerivation rec {
47 name = "libelf-0.8.13";
@@ -8,20 +11,20 @@ stdenv.mkDerivation rec {
811 sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr";
912 };
1013
14+ # TODO(@Ericson2314) Make unconditional next hash break
15+ patches = if hostPlatform == buildPlatform then null else [
16+ ./cross-ar.patch
17+ ];
18+
1119 doCheck = true;
1220
1321 # FIXME needs gcc 4.9 in bootstrap tools
1422 hardeningDisable = [ "stackprotector" ];
1523
16− # For cross-compiling, native glibc is needed for the "gencat" program.
17− crossAttrs = {
18− nativeBuildInputs = [ gettext glibc ];
19− };
20−
2124 # Libelf's custom NLS macros fail to determine the catalog file extension on
2225 # Darwin, so disable NLS for now.
2326 # FIXME: Eventually make Gettext a build input on all platforms.
24− configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-nls";
27+ configureFlags = stdenv.lib.optional hostPlatform.isDarwin "--disable-nls";
2528
2629 nativeBuildInputs = [ gettext ];
2730