diff options
Diffstat (limited to 'package/libs/libjson-c/patches/010-clang.patch')
-rw-r--r-- | package/libs/libjson-c/patches/010-clang.patch | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/package/libs/libjson-c/patches/010-clang.patch b/package/libs/libjson-c/patches/010-clang.patch new file mode 100644 index 0000000000..9ef73f1a82 --- /dev/null +++ b/package/libs/libjson-c/patches/010-clang.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -265,7 +265,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_D + configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h) + message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h") + +-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") ++if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") + if ("${DISABLE_WERROR}" STREQUAL "OFF") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") |