Do not run 'strip -x' on static libraries, use option '--strip-unneeded' for shared instead of '-x' (--discard-all).