libelf: Modernize and fix for cross
This commit is contained in:
parent
c54c3cb5ce
commit
2e337fe969
11
pkgs/development/libraries/libelf/cross-ar.patch
Normal file
11
pkgs/development/libraries/libelf/cross-ar.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/lib/Makefile.in
|
||||||
|
+++ b/lib/Makefile.in
|
||||||
|
@@ -27,7 +27,7 @@ installdirs = $(libdir) $(includedir) $(includedir)/libelf
|
||||||
|
|
||||||
|
CC = @CC@
|
||||||
|
LD = @LD@
|
||||||
|
-AR = ar
|
||||||
|
+AR ?= ar
|
||||||
|
MV = mv -f
|
||||||
|
RM = rm -f
|
||||||
|
LN_S = @LN_S@
|
@ -1,4 +1,7 @@
|
|||||||
{ fetchurl, stdenv, gettext, glibc }:
|
{ stdenv, fetchurl
|
||||||
|
, gettext, glibc
|
||||||
|
, buildPlatform, hostPlatform
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libelf-0.8.13";
|
name = "libelf-0.8.13";
|
||||||
@ -8,20 +11,20 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr";
|
sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO(@Ericson2314) Make unconditional next hash break
|
||||||
|
patches = if hostPlatform == buildPlatform then null else [
|
||||||
|
./cross-ar.patch
|
||||||
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
# FIXME needs gcc 4.9 in bootstrap tools
|
# FIXME needs gcc 4.9 in bootstrap tools
|
||||||
hardeningDisable = [ "stackprotector" ];
|
hardeningDisable = [ "stackprotector" ];
|
||||||
|
|
||||||
# For cross-compiling, native glibc is needed for the "gencat" program.
|
|
||||||
crossAttrs = {
|
|
||||||
nativeBuildInputs = [ gettext glibc ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Libelf's custom NLS macros fail to determine the catalog file extension on
|
# Libelf's custom NLS macros fail to determine the catalog file extension on
|
||||||
# Darwin, so disable NLS for now.
|
# Darwin, so disable NLS for now.
|
||||||
# FIXME: Eventually make Gettext a build input on all platforms.
|
# FIXME: Eventually make Gettext a build input on all platforms.
|
||||||
configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-nls";
|
configureFlags = stdenv.lib.optional hostPlatform.isDarwin "--disable-nls";
|
||||||
|
|
||||||
nativeBuildInputs = [ gettext ];
|
nativeBuildInputs = [ gettext ];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user