Take advantage of the new secp256k1 option to avoid visibility attributes on API functions.
While most users of a shared libsecp always want API functions exported so that they can actually be linked against, we always build it statically. When that static lib is linked into a (static or shared) libbitcoinkernel, by default its symbols end up exported there as well.
As libsecp is an implementation detail of the kernel (and any future Core lib), its symbols should never be exported.
This was the intended use for the above PR, looks like we just forgot to follow-up and actually hook it up.
This is most easily tested by building with -DBUILD_KERNEL_LIB=ON -DBUILD_SHARED_LIBS=ON (with or without -DREDUCE_EXPORTS=ON) and inspecting via:
0nm -CD lib/libbitcoinkernel.so | grep secp
Before this change, secp’s symbols will show up there. After, they should be absent.
This should finally solve secp symbol visibility once and for all :)