dpdk: support static/shared build mode switch
The default is false because upstream default is false (for performance).
This commit is contained in:
parent
66002a0e07
commit
f1a2023961
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, kernel, fetchurl, pkgconfig, numactl }:
|
{ stdenv, lib, kernel, fetchurl, pkgconfig, numactl, shared ? false }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -25,9 +25,14 @@ in stdenv.mkDerivation rec {
|
|||||||
NIX_CFLAGS_COMPILE = [ "-msse3" ];
|
NIX_CFLAGS_COMPILE = [ "-msse3" ];
|
||||||
hardeningDisable = [ "pic" ];
|
hardeningDisable = [ "pic" ];
|
||||||
|
|
||||||
postPatch = lib.optionalString (!mod) ''
|
postPatch = ''
|
||||||
# Do not build kernel modules.
|
|
||||||
cat >>config/defconfig_$RTE_TARGET <<EOF
|
cat >>config/defconfig_$RTE_TARGET <<EOF
|
||||||
|
# Build static or shared libraries.
|
||||||
|
CONFIG_RTE_BUILD_SHARED_LIB=${if shared then "y" else "n"}
|
||||||
|
EOF
|
||||||
|
'' + lib.optionalString (!mod) ''
|
||||||
|
cat >>config/defconfig_$RTE_TARGET <<EOF
|
||||||
|
# Do not build kernel modules.
|
||||||
CONFIG_RTE_EAL_IGB_UIO=n
|
CONFIG_RTE_EAL_IGB_UIO=n
|
||||||
CONFIG_RTE_KNI_KMOD=n
|
CONFIG_RTE_KNI_KMOD=n
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user