Skip to content

[SPEC] Add compiler check for -fwrapv-pointer in xalancbmk #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions External/SPEC/CINT2006/483.xalancbmk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ add_definitions(

list(APPEND CXXFLAGS -std=gnu++98)

include(CheckCXXCompilerFlag)

# Workaround undefined behaviour in xerces-c dependency.
# This is fixed upstream but not included in SPEC CPU 2017:
# https://github.com/apache/xerces-c/commit/02e48494496dd24476490fd36c1bc97b6a37002e#diff-e2f4677367dcf43bd6d31b2bbca5b1aa89e36ec155a040fe4447b201a554cf81
add_compile_options(-fwrapv-pointer)
check_cxx_compiler_flag(-fwrapv-pointer
HAVE_CXX_FLAG_FWRAPV_POINTER)
if(HAVE_CXX_FLAG_FWRAPV_POINTER)
add_compile_options(-fwrapv-pointer)
endif()

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fdelayed-template-parsing
HAVE_CXX_FLAG_FDELAYED_TEMPLATE_PARSING)
if(HAVE_CXX_FLAG_FDELAYED_TEMPLATE_PARSING)
Expand Down
9 changes: 7 additions & 2 deletions External/SPEC/CINT2017rate/523.xalancbmk_r/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ speccpu2017_benchmark(RATE)

set(CMAKE_CXX_STANDARD 14)

include(CheckCXXCompilerFlag)

# Workaround undefined behaviour in xerces-c dependency.
# This is fixed upstream but not included in SPEC CPU 2017:
# https://github.com/apache/xerces-c/commit/02e48494496dd24476490fd36c1bc97b6a37002e#diff-e2f4677367dcf43bd6d31b2bbca5b1aa89e36ec155a040fe4447b201a554cf81
add_compile_options(-fwrapv-pointer)
check_cxx_compiler_flag(-fwrapv-pointer
HAVE_CXX_FLAG_FWRAPV_POINTER)
if(HAVE_CXX_FLAG_FWRAPV_POINTER)
add_compile_options(-fwrapv-pointer)
endif()

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fdelayed-template-parsing
HAVE_CXX_FLAG_FDELAYED_TEMPLATE_PARSING)
if(HAVE_CXX_FLAG_FDELAYED_TEMPLATE_PARSING)
Expand Down