WAGO-750-860.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From 97515341454f26fcd14e50d5980f5f0361307814 Mon Sep 17 00:00:00 2001
  2. From: FlorianPalm <f.palm@plt.rwth-aachen.de>
  3. Date: Mon, 12 Jan 2015 18:45:01 +0100
  4. Subject: [PATCH] fixes to the patch
  5. ---
  6. CMakeLists.txt | 19 ++++++++-----------
  7. src/ua_util.h | 2 +-
  8. 2 files changed, 9 insertions(+), 12 deletions(-)
  9. diff --git a/CMakeLists.txt b/CMakeLists.txt
  10. index c785182..9e66da0 100644
  11. --- a/CMakeLists.txt
  12. +++ b/CMakeLists.txt
  13. @@ -47,19 +47,16 @@ set(lib_sources src/ua_types.c
  14. # compiler flags
  15. if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
  16. -add_definitions(-std=c99 -pipe -Wall -Wextra -Werror -Wformat
  17. - -Wno-unused-parameter -Wno-unused-function -Wno-unused-label -Wpointer-arith -Wreturn-type -Wsign-compare -Wmultichar
  18. - -Wshadow -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes # -Wconversion
  19. - -Winit-self -Wuninitialized -Wno-deprecated -Wformat-security -ffunction-sections -fdata-sections)
  20. +add_definitions(-std=c99 -fomit-frame-pointer -pipe -msoft-float -fno-builtin -DEMBED -fno-strict-aliasing)
  21. if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
  22. add_definitions(-Wformat-nonliteral)
  23. - set (CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -Wl,--gc-sections")
  24. - set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections")
  25. + set (CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -Wl,-elf2flt -msoft-float")
  26. + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-elf2flt -msoft-float")
  27. else()
  28. add_definitions(-Wno-gnu-statement-expression)
  29. endif()
  30. if(NOT WIN32)
  31. - add_definitions(-fstack-protector -fPIC -fvisibility=hidden)
  32. + # add_definitions(-fPIC)
  33. endif()
  34. endif()
  35. @@ -90,11 +90,7 @@ else()
  36. endif()
  37. add_library(open62541-objects OBJECT ${lib_sources})
  38. -add_library(open62541 SHARED $<TARGET_OBJECTS:open62541-objects>)
  39. -add_library(open62541-static STATIC $<TARGET_OBJECTS:open62541-objects>)
  40. -SET_TARGET_PROPERTIES(open62541-static PROPERTIES OUTPUT_NAME open62541 CLEAN_DIRECT_OUTPUT 1) # static version that exports all symbols
  41. -target_compile_definitions(open62541-objects PRIVATE UA_DYNAMIC_LINKING)
  42. -target_compile_definitions(open62541-static PRIVATE UA_DYNAMIC_LINKING)
  43. +add_library(open62541 $<TARGET_OBJECTS:open62541-objects>)
  44. ## logging
  45. set(UA_LOGLEVEL 300 CACHE STRING "Level at which logs shall be reported")