Commit 94bfd401 by bernhard-gatzhammer

Reproduced bug and played around. Not working yet.

EMBB-516
parent d36f1bdb
...@@ -111,6 +111,9 @@ include(CMakeCommon/SetCompilerFlags.cmake) ...@@ -111,6 +111,9 @@ include(CMakeCommon/SetCompilerFlags.cmake)
SetGNUCompilerFlags(compiler_libs compiler_flags) SetGNUCompilerFlags(compiler_libs compiler_flags)
SetVisualStudioCompilerFlags(compiler_libs compiler_flags) SetVisualStudioCompilerFlags(compiler_libs compiler_flags)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fPIC -pie")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fPIC -pie")
## Exception handling in C++ ## Exception handling in C++
# #
if (USE_EXCEPTIONS STREQUAL ON) if (USE_EXCEPTIONS STREQUAL ON)
......
...@@ -23,21 +23,21 @@ FOREACH(src_tmp ${EMBB_BASE_SOURCES}) ...@@ -23,21 +23,21 @@ FOREACH(src_tmp ${EMBB_BASE_SOURCES})
ENDFOREACH(src_tmp) ENDFOREACH(src_tmp)
ENDIF() ENDIF()
include(CheckTypeSize) #include(CheckTypeSize)
check_type_size(char EMBB_CHAR_TYPE_SIZE) #check_type_size(char EMBB_CHAR_TYPE_SIZE)
check_type_size(short EMBB_SHORT_TYPE_SIZE) #check_type_size(short EMBB_SHORT_TYPE_SIZE)
check_type_size("unsigned short" EMBB_UNSIGNED_SHORT_TYPE_SIZE) #check_type_size("unsigned short" EMBB_UNSIGNED_SHORT_TYPE_SIZE)
check_type_size(int EMBB_INT_TYPE_SIZE) #check_type_size(int EMBB_INT_TYPE_SIZE)
check_type_size("unsigned int" EMBB_UNSIGNED_INT_TYPE_SIZE) #check_type_size("unsigned int" EMBB_UNSIGNED_INT_TYPE_SIZE)
check_type_size(long EMBB_LONG_TYPE_SIZE) #check_type_size(long EMBB_LONG_TYPE_SIZE)
check_type_size("unsigned long" EMBB_UNSIGNED_LONG_TYPE_SIZE) #check_type_size("unsigned long" EMBB_UNSIGNED_LONG_TYPE_SIZE)
check_type_size("long long" EMBB_LONG_LONG_TYPE_SIZE) #check_type_size("long long" EMBB_LONG_LONG_TYPE_SIZE)
check_type_size("unsigned long long" EMBB_UNSIGNED_LONG_LONG_TYPE_SIZE) #check_type_size("unsigned long long" EMBB_UNSIGNED_LONG_LONG_TYPE_SIZE)
check_type_size(intptr_t EMBB_INTPTR_T_TYPE_SIZE) #check_type_size(intptr_t EMBB_INTPTR_T_TYPE_SIZE)
check_type_size(uintptr_t EMBB_UINTPTR_T_TYPE_SIZE) #check_type_size(uintptr_t EMBB_UINTPTR_T_TYPE_SIZE)
check_type_size(size_t EMBB_SIZE_T_TYPE_SIZE) #check_type_size(size_t EMBB_SIZE_T_TYPE_SIZE)
check_type_size(ptrdiff_t EMBB_PTRDIFF_T_TYPE_SIZE) #check_type_size(ptrdiff_t EMBB_PTRDIFF_T_TYPE_SIZE)
check_type_size(uintmax_t EMBB_UINTMAX_T_TYPE_SIZE) #check_type_size(uintmax_t EMBB_UINTMAX_T_TYPE_SIZE)
# Create header file from input file # Create header file from input file
configure_file("include/embb/base/c/internal/atomic/atomic_sizes.h.in" configure_file("include/embb/base/c/internal/atomic/atomic_sizes.h.in"
...@@ -122,3 +122,19 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/embb ...@@ -122,3 +122,19 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/embb
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/embb install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/embb
DESTINATION include FILES_MATCHING PATTERN "*.h") DESTINATION include FILES_MATCHING PATTERN "*.h")
install(TARGETS embb_base_c DESTINATION lib) install(TARGETS embb_base_c DESTINATION lib)
include(CheckTypeSize)
check_type_size(char EMBB_CHAR_TYPE_SIZE)
check_type_size(short EMBB_SHORT_TYPE_SIZE)
check_type_size("unsigned short" EMBB_UNSIGNED_SHORT_TYPE_SIZE)
check_type_size(int EMBB_INT_TYPE_SIZE)
check_type_size("unsigned int" EMBB_UNSIGNED_INT_TYPE_SIZE)
check_type_size(long EMBB_LONG_TYPE_SIZE)
check_type_size("unsigned long" EMBB_UNSIGNED_LONG_TYPE_SIZE)
check_type_size("long long" EMBB_LONG_LONG_TYPE_SIZE)
check_type_size("unsigned long long" EMBB_UNSIGNED_LONG_LONG_TYPE_SIZE)
check_type_size(intptr_t EMBB_INTPTR_T_TYPE_SIZE)
check_type_size(uintptr_t EMBB_UINTPTR_T_TYPE_SIZE)
check_type_size(size_t EMBB_SIZE_T_TYPE_SIZE)
check_type_size(ptrdiff_t EMBB_PTRDIFF_T_TYPE_SIZE)
check_type_size(uintmax_t EMBB_UINTMAX_T_TYPE_SIZE)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment