`CCDLFLAGS` is missing `-fPIC`. Instead `-fPIC` is set only in `CFLAGS` and because of this C++ code is compiled without it (breaking partial static linking).
CCDLFLAGSis missing-fPIC.Instead
-fPICis set only inCFLAGSand because of this C++ code is compiled without it (breaking partial static linking).