libbfd: fix for cross (based on same from @bgamari)
This commit is contained in:
parent
e6da426a54
commit
2d772d52ae
@ -1,5 +1,5 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchurl, autoreconfHook264, bison, binutils-raw
|
, fetchurl, fetchpatch, autoreconfHook264, buildPackages, bison, binutils-raw
|
||||||
, libiberty, zlib
|
, libiberty, zlib
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -11,24 +11,37 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patches = binutils-raw.bintools.patches ++ [
|
patches = binutils-raw.bintools.patches ++ [
|
||||||
../../tools/misc/binutils/build-components-separately.patch
|
../../tools/misc/binutils/build-components-separately.patch
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://raw.githubusercontent.com/mxe/mxe/e1d4c144ee1994f70f86cf7fd8168fe69bd629c6/src/bfd-1-disable-subdir-doc.patch";
|
||||||
|
sha256 = "0pzb3i74d1r7lhjan376h59a7kirw15j7swwm8pz3zy9lkdqkj6q";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
# We just want to build libbfd
|
# We just want to build libbfd
|
||||||
postPatch = ''
|
preConfigure = ''
|
||||||
cd bfd
|
cd bfd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
depsBuildBuilds = [ buildPackages.stdenv.cc ];
|
||||||
nativeBuildInputs = [ autoreconfHook264 bison ];
|
nativeBuildInputs = [ autoreconfHook264 bison ];
|
||||||
buildInputs = [ libiberty zlib ];
|
buildInputs = [ libiberty zlib ];
|
||||||
|
|
||||||
configurePlatforms = [ "build" "host" ];
|
configurePlatforms = [ "build" "host" "target" ];
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-targets=all" "--enable-64-bit-bfd"
|
"--enable-targets=all" "--enable-64-bit-bfd"
|
||||||
"--enable-install-libbfd"
|
"--enable-install-libbfd"
|
||||||
"--enable-shared"
|
"--enable-shared"
|
||||||
"--with-system-zlib"
|
"--with-system-zlib"
|
||||||
|
"CC_FOR_BUILD=$(CC)"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) ''
|
||||||
|
# the build system likes to move things into atypical locations
|
||||||
|
mkdir -p $dev
|
||||||
|
mv $out/${stdenv.hostPlatform.config}/${stdenv.targetPlatform.config}/include $dev/include
|
||||||
|
mv $out/${stdenv.hostPlatform.config}/${stdenv.targetPlatform.config}/lib $out/lib
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user