[PATCH] D48442: [SPECCPU2017] Add addition platform options and missing flags.
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 09:46:59 PDT 2018
Meinersbur created this revision.
Meinersbur added reviewers: MatzeB, kristof.beyls.
Herald added a subscriber: mgorny.
Herald added a reviewer: javed.absar.
Add portability flags for 64-bit Windows and Linux on ARM.
Also add missing SPEC and SPEC_CPU flags without which the compilation could fail on these platforms.
https://reviews.llvm.org/D48442
Files:
External/SPEC/CINT2017rate/525.x264_r/CMakeLists.txt
External/SPEC/SpecCPU2017.cmake
Index: External/SPEC/SpecCPU2017.cmake
===================================================================
--- External/SPEC/SpecCPU2017.cmake
+++ External/SPEC/SpecCPU2017.cmake
@@ -106,7 +106,7 @@
# Mandatory flags
- add_definitions(-DSPEC -DNDEBUG)
+ add_definitions(-DSPEC -DSPEC_CPU -DNDEBUG)
if (RATE)
# rate benchmarks never use parallelism
@@ -127,7 +127,21 @@
add_definitions(-D_FILE_OFFSET_BITS=64)
add_definitions(-DSPEC_LINUX_I32) # perlbench
endif ()
+ elseif (ARCH STREQUAL "AArch64" AND TARGET_OS STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+ # Linux ARM
+ add_definitions(-DSPEC_LINUX)
+ add_definitions(-DSPEC_LINUX_AARCH64)
+ add_definitions(-DSPEC_AUTO_BYTEORDER=0x12345678) # Little endian
+ add_definitions(-DSPEC_LP64)
+ elseif (ARCH STREQUAL "x86" AND TARGET_OS STREQUAL "Windows")
+ add_definitions(-DSPEC_AUTO_BYTEORDER=0x12345678) # Big endian
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ add_definitions(-DSPEC_LLP64)
+ endif ()
else ()
+ message("ARCH: ${ARCH}")
+ message("TARGET_OS: ${TARGET_OS}")
+ message("CMAKE_SIZEOF_VOID_P: ${CMAKE_SIZEOF_VOID_P}")
message(FATAL_ERROR
"Don't know portability flags for SPEC CPU 2017 on this platform")
endif ()
@@ -228,6 +242,7 @@
llvm_add_host_executable(
${VALIDATOR}-host ${VALIDATOR} ${_validator_sources}
LDFLAGS -lm
+ CPPFLAGS -DSPEC
)
endif ()
Index: External/SPEC/CINT2017rate/525.x264_r/CMakeLists.txt
===================================================================
--- External/SPEC/CINT2017rate/525.x264_r/CMakeLists.txt
+++ External/SPEC/CINT2017rate/525.x264_r/CMakeLists.txt
@@ -180,7 +180,7 @@
endforeach ()
llvm_add_host_executable(ldecod_${SUFFIX}-host
ldecod_${SUFFIX} ${ldecod_Sources}
- CPPFLAGS -I "${SRC_DIR}/ldecod_src/inc"
+ CPPFLAGS -I "${SRC_DIR}/ldecod_src/inc" -DSPEC
LDFLAGS -lm
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48442.152329.patch
Type: text/x-patch
Size: 1978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180621/d6bf5218/attachment.bin>
More information about the llvm-commits
mailing list