freeebsd: Fix cross compilation (#456250)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
fetchpatch,
|
||||||
mkDerivation,
|
mkDerivation,
|
||||||
libcMinimal,
|
libcMinimal,
|
||||||
include,
|
include,
|
||||||
@@ -32,6 +33,19 @@ mkDerivation {
|
|||||||
libgcc
|
libgcc
|
||||||
];
|
];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# https://github.com/freebsd/freebsd-src/pull/1882
|
||||||
|
(fetchpatch {
|
||||||
|
name = "freebsd-libthr-use-nonstring-attribute.patch";
|
||||||
|
url = "https://github.com/freebsd/freebsd-src/pull/1882/commits/650800993deb513dc31e99ef5cdecd50ee70bb04.diff";
|
||||||
|
hash = "sha256-WKN7dfGAs1+XADT4aLUkkKmQQ4n7gsyFUTCeo6mcuMY=";
|
||||||
|
includes = [ "lib/libthr/thread/thr_printf.c" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
# Presumably newer Clang has gotten more strict.
|
||||||
|
CWARNEXTRA = "-Wno-cast-function-type-mismatch";
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -B${csu}/lib"
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -B${csu}/lib"
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
mkDerivation,
|
mkDerivation,
|
||||||
|
fetchpatch,
|
||||||
include,
|
include,
|
||||||
rpcgen,
|
rpcgen,
|
||||||
flex,
|
flex,
|
||||||
@@ -30,6 +31,16 @@ mkDerivation {
|
|||||||
]
|
]
|
||||||
++ extraSrc;
|
++ extraSrc;
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# https://github.com/freebsd/freebsd-src/pull/1882
|
||||||
|
(fetchpatch {
|
||||||
|
name = "freebsd-rtld-use-nonstring-attribute.patch";
|
||||||
|
url = "https://github.com/freebsd/freebsd-src/pull/1882/commits/650800993deb513dc31e99ef5cdecd50ee70bb04.diff";
|
||||||
|
hash = "sha256-V9jDE/5Fu6hLIzlG1e6AqLnGwlzW2OjonyUgvSVtm58=";
|
||||||
|
includes = [ "libexec/rtld-elf/rtld.c" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"out"
|
"out"
|
||||||
"man"
|
"man"
|
||||||
|
|||||||
Reference in New Issue
Block a user