mirror of
https://github.com/json-c/json-c.git
synced 2026-04-02 03:49:06 +08:00
Issue #508: -fPIC to link libjson-c.a with libs
json-c has symbol collisions with other popular C JSON libraries. To prevent random crashes in downstream applications that may use a library which depends on json-c, the solution is to statically link libjson-c.a into those libraries. `-fPIC`/`-fPIE` is required when building a `.a` so it can be linked into a `.so`.
This commit is contained in:
@@ -99,6 +99,7 @@ CMAKE_INSTALL_PREFIX | String | The install location.
|
||||
CMAKE_BUILD_TYPE | String | Defaults to "debug".
|
||||
BUILD_SHARED_LIBS | Bool | The default build generates a dynamic (dll/so) library. Set this to OFF to create a static library only.
|
||||
BUILD_STATIC_LIBS | Bool | The default build generates a static (lib/a) library. Set this to OFF to create a shared library only.
|
||||
DISABLE_STATIC_FPIC | Bool | The default builds position independent code. Set this to OFF to create a shared library only.
|
||||
DISABLE_BSYMBOLIC | Bool | Disable use of -Bsymbolic-functions.
|
||||
DISABLE_THREAD_LOCAL_STORAGE | Bool | Disable use of Thread-Local Storage (HAVE___THREAD).
|
||||
DISABLE_WERROR | Bool | Disable use of -Werror.
|
||||
|
||||
Reference in New Issue
Block a user