On 23/03/2015 14:54, Patrick McHardy wrote:
What does work is using -Wl,--whole-archive libnftnl.a -Wl,--no-whole-archive Not sure if we want to take this path, but it seems acceptable to me.
I'm sorry, but that is not acceptable to me : it defeats the purpose of static archives, and forces nft, and every subsequent program using libnftnl, to include in its binary every possible optional feature you may want to add to libnftnl. As a low-level networking utility, nft has its place on embedded devices (which is my current case). The statically linked binary for x86_64 (with musl) is already more than 600 kB, stripped: that is huge. It's more than my whole busybox binary. And that is with XML and JSON support entirely disabled. Risking further growth in an uncontrollable way just to use a gcc-specific feature - which also prevents compiling it with clang/llvm - doesn't sound like the right solution. As a user, Pablo's patch looks like a good fix to me. -- Laurent -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html