config BR2_PACKAGE_LUAJIT
        bool "luajit"
        select BR2_PACKAGE_HAS_LUAINTERPRETER
+       depends on !BR2_STATIC_LIBS # dlopen
        # Luajit is only available for some target architectures, and
        # has some complexity wrt 32/64. See luajit.mk for details.
        depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
        default "5.1"
 
 endif
+
+comment "luajit needs a toolchain w/ dynamic library"
+       depends on BR2_STATIC_LIBS
 
        depends on BR2_LINUX_KERNEL
        depends on BR2_INSTALL_LIBSTDCPP # libjson
        depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
+       depends on !BR2_STATIC_LIBS # luajit
        help
          Sysdig is open source, system-level exploration:
          capture system state and activity from a running Linux instance,
 
          http://sysdig.org
 
-comment "sysdig needs a toolchain w/ C++ and a Linux kernel to be built"
-       depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP
+comment "sysdig needs a toolchain w/ C++, dynamibc library and a Linux kernel to be built"
+       depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS
        depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS