WAGO-750-860.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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,8 +113,8 @@ 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-objects PUBLIC UA_DYNAMIC_LINKING)
  35. +add_library(open62541 $<TARGET_OBJECTS:open62541-objects>)
  36. +#target_compile_definitions(open62541-objects PUBLIC UA_DYNAMIC_LINKING)
  37. ## logging
  38. set(UA_LOGLEVEL 400 CACHE STRING "Level at which logs shall be reported")
  39. @@ -137,7 +135,7 @@ endif()
  40. configure_file("src/ua_config.h.in" "${PROJECT_BINARY_DIR}/src_generated/ua_config.h")
  41. # download queue.h if required
  42. -if(WIN32)
  43. +#if(WIN32)
  44. if(NOT EXISTS "${PROJECT_BINARY_DIR}/src_generated/queue.h")
  45. 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)
  46. list(GET result 0 download_ok)
  47. @@ -146,7 +144,7 @@ if(WIN32)
  48. message(FATAL_ERROR "queue.h could not be downloaded")
  49. endif()
  50. endif()
  51. -endif(WIN32)
  52. +#endif(WIN32)
  53. # generate code from xml definitions
  54. file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/src_generated")