tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
libbfd: fix for cross (based on same from @bgamari)
Will Dietz
8 years ago
2d772d52
e6da426a
+16
-3
1 changed file
expand all
collapse all
unified
split
pkgs
development
libraries
libbfd
default.nix
+16
-3
pkgs/development/libraries/libbfd/default.nix
···
1
1
{ stdenv
2
2
-
, fetchurl, autoreconfHook264, bison, binutils-raw
2
2
+
, fetchurl, fetchpatch, autoreconfHook264, buildPackages, bison, binutils-raw
3
3
, libiberty, zlib
4
4
}:
5
5
···
11
11
12
12
patches = binutils-raw.bintools.patches ++ [
13
13
../../tools/misc/binutils/build-components-separately.patch
14
14
+
(fetchpatch {
15
15
+
url = "https://raw.githubusercontent.com/mxe/mxe/e1d4c144ee1994f70f86cf7fd8168fe69bd629c6/src/bfd-1-disable-subdir-doc.patch";
16
16
+
sha256 = "0pzb3i74d1r7lhjan376h59a7kirw15j7swwm8pz3zy9lkdqkj6q";
17
17
+
})
14
18
];
15
19
16
20
# We just want to build libbfd
17
17
-
postPatch = ''
21
21
+
preConfigure = ''
18
22
cd bfd
19
23
'';
20
24
25
25
+
depsBuildBuilds = [ buildPackages.stdenv.cc ];
21
26
nativeBuildInputs = [ autoreconfHook264 bison ];
22
27
buildInputs = [ libiberty zlib ];
23
28
24
24
-
configurePlatforms = [ "build" "host" ];
29
29
+
configurePlatforms = [ "build" "host" "target" ];
25
30
configureFlags = [
26
31
"--enable-targets=all" "--enable-64-bit-bfd"
27
32
"--enable-install-libbfd"
28
33
"--enable-shared"
29
34
"--with-system-zlib"
35
35
+
"CC_FOR_BUILD=$(CC)"
30
36
];
37
37
+
38
38
+
postInstall = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) ''
39
39
+
# the build system likes to move things into atypical locations
40
40
+
mkdir -p $dev
41
41
+
mv $out/${stdenv.hostPlatform.config}/${stdenv.targetPlatform.config}/include $dev/include
42
42
+
mv $out/${stdenv.hostPlatform.config}/${stdenv.targetPlatform.config}/lib $out/lib
43
43
+
'';
31
44
32
45
enableParallelBuilding = true;
33
46