WAGO-750-860.patch 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. commit b801b9275cb93f2cea1dce231f01780bed9834ca
  2. Author: FlorianPalm <f.palm@plt.rwth-aachen.de>
  3. Date: Wed Dec 10 10:21:44 2014 +0100
  4. changes for WAGO 750-860
  5. diff --git a/CMakeLists.txt b/CMakeLists.txt
  6. index 87489b3..76c4aa0 100644
  7. --- a/CMakeLists.txt
  8. +++ b/CMakeLists.txt
  9. @@ -41,18 +41,16 @@ set(lib_sources src/ua_types.c
  10. # compiler flags
  11. if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
  12. -add_definitions(-std=c99 -pedantic -pipe -Wall -Wextra -Werror -Wformat
  13. - -Wno-unused-parameter -Wno-unused-function -Wno-unused-label -Wpointer-arith -Wreturn-type -Wsign-compare -Wmultichar
  14. - -Winit-self -Wuninitialized -Wno-deprecated -Wformat-security -ffunction-sections -fdata-sections)
  15. +add_definitions(-std=c99 -fomit-frame-pointer -pipe -msoft-float -fno-builtin -DEMBED -fno-strict-aliasing)
  16. if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
  17. add_definitions(-Wformat-nonliteral)
  18. - set (CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -Wl,--gc-sections")
  19. - set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections")
  20. + set (CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -Wl,-elf2flt -msoft-float")
  21. + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-elf2flt -msoft-float")
  22. else()
  23. add_definitions(-Wno-gnu-statement-expression)
  24. endif()
  25. if(NOT WIN32)
  26. - add_definitions(-fstack-protector -fPIC -fvisibility=hidden)
  27. + # add_definitions(-fPIC)
  28. endif()
  29. endif()
  30. @@ -115,10 +113,10 @@ else()
  31. endif()
  32. add_library(open62541-objects OBJECT ${lib_sources}) # static version that exports all symbols
  33. -add_library(open62541 SHARED $<TARGET_OBJECTS:open62541-objects>)
  34. -target_compile_definitions(open62541 INTERFACE
  35. - $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:UA_DYNAMIC_LINKING> # the UA_EXPORT macro is different when building the lib or using the lib
  36. -)
  37. +add_library(open62541 $<TARGET_OBJECTS:open62541-objects>)
  38. +#target_compile_definitions(open62541 INTERFACE
  39. +# $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:UA_DYNAMIC_LINKING> # the UA_EXPORT macro is different when building the lib or using the lib
  40. +#)
  41. ## logging
  42. set(UA_LOGLEVEL 400 CACHE STRING "Level at which logs shall be reported")
  43. @@ -137,7 +135,7 @@ endif()
  44. configure_file("src/ua_config.h.in" "${PROJECT_BINARY_DIR}/src_generated/ua_config.h")
  45. # download queue.h if required
  46. -if(WIN32)
  47. +#if(WIN32)
  48. if(NOT EXISTS "${PROJECT_BINARY_DIR}/src_generated/queue.h")
  49. file(DOWNLOAD "http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/~checkout~/src/sys/sys/queue.h" "${PROJECT_BINARY_DIR}/src_generated/queue.h" STATUS result)
  50. list(GET result 0 download_ok)
  51. @@ -146,7 +144,7 @@ if(WIN32)
  52. message(FATAL_ERROR "queue.h could not be downloaded")
  53. endif()
  54. endif()
  55. -endif(WIN32)
  56. +#endif(WIN32)
  57. # generate code from xml definitions
  58. file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/src_generated")