I am wondering if there is a way to find out which g++
compiler/linker flags where used in creating a binary-only library.
For example there might be a 3rd party shared library (only .h/.so files are there).
So I think it would be a good idea to use the same g++ flags when compiling and linking my own application (that is using the binary-only 3rd party library).
Specifically I am asking for compiler flags like
- -fno-inline
- -pthreads
- -mtune=arch
- -O2
and also it would be of interest which linker flags have been used:
- -fpic or -fPIC
- -fexceptions
- -pthreads
and so on.