freebsd.sys: enable dtrace and ctf
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
mkDerivation,
|
||||
compatIfNeeded,
|
||||
libdwarf,
|
||||
libelf,
|
||||
zlib,
|
||||
libspl,
|
||||
}:
|
||||
@@ -29,6 +30,7 @@ mkDerivation {
|
||||
libdwarf
|
||||
zlib
|
||||
libspl
|
||||
libelf
|
||||
];
|
||||
|
||||
meta.license = lib.licenses.cddl;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
m4,
|
||||
compatIfNeeded,
|
||||
zlib,
|
||||
libelf,
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
@@ -15,6 +16,6 @@ mkDerivation {
|
||||
"sys/sys/elf_common.h"
|
||||
];
|
||||
extraNativeBuildInputs = [ m4 ];
|
||||
buildInputs = compatIfNeeded ++ [ zlib ];
|
||||
buildInputs = compatIfNeeded ++ [ zlib libelf ];
|
||||
MK_TESTS = "no";
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
bintrans,
|
||||
xargs-j,
|
||||
kldxref,
|
||||
ctfconvert,
|
||||
ctfmerge,
|
||||
}:
|
||||
let
|
||||
baseConfigFile =
|
||||
@@ -53,26 +55,19 @@ let
|
||||
for f in sys/conf/*.mk; do
|
||||
substituteInPlace "$f" --replace-quiet 'KERN_DEBUGDIR}''${' 'KERN_DEBUGDIR_'
|
||||
done
|
||||
|
||||
sed -i sys/${hostArchBsd}/conf/${baseConfig} \
|
||||
-e 's/WITH_CTF=1/WITH_CTF=0/' \
|
||||
-e '/KDTRACE/d'
|
||||
''
|
||||
+ lib.optionalString (baseConfigFile != null) ''
|
||||
cat ${baseConfigFile} >>sys/${hostArchBsd}/conf/${baseConfig}
|
||||
'';
|
||||
''
|
||||
+ lib.optionalString (baseConfigFile != null) ''
|
||||
cat ${baseConfigFile} >>sys/${hostArchBsd}/conf/${baseConfig}
|
||||
'';
|
||||
};
|
||||
|
||||
# Kernel modules need this for kern.opts.mk
|
||||
env = {
|
||||
MK_CTF = "no";
|
||||
}
|
||||
// (lib.flip lib.mapAttrs' extraFlags (
|
||||
env = lib.flip lib.mapAttrs' extraFlags (
|
||||
name: value: {
|
||||
name = "MK_${lib.toUpper name}";
|
||||
value = lib.boolToYesNo value;
|
||||
}
|
||||
));
|
||||
);
|
||||
in
|
||||
mkDerivation rec {
|
||||
pname = "sys";
|
||||
@@ -96,6 +91,8 @@ mkDerivation rec {
|
||||
bintrans
|
||||
xargs-j
|
||||
kldxref
|
||||
ctfconvert
|
||||
ctfmerge
|
||||
];
|
||||
|
||||
# --dynamic-linker /red/herring is used when building the kernel.
|
||||
|
||||
Reference in New Issue
Block a user