diff --git a/External/SPEC/SpecCPU2006.cmake b/External/SPEC/SpecCPU2006.cmake --- a/External/SPEC/SpecCPU2006.cmake +++ b/External/SPEC/SpecCPU2006.cmake @@ -22,6 +22,16 @@ list(APPEND CPPFLAGS -DSPEC_CPU_MACOSX) elseif(TARGET_OS STREQUAL "Linux") list(APPEND CPPFLAGS -DSPEC_CPU_LINUX) + elseif(TARGET_OS STREQUAL "FreeBSD") + list(APPEND CPPFLAGS -DSPEC_CPU_BSD) + # As support for SPEC_CPU_BSD is incomplete in SPEC2006, we also have to + # pass -DSPEC_CPU_MACOSX to avoid the use of gcvt() in 400.perlbench as + # this function is not available on FreeBSD. Additionally, this define + # ensures that all required functions are compiled in 483.xalancbmk and + # that complex.h is included in 462.libquantum. + list(APPEND CPPFLAGS -DSPEC_CPU_MACOSX) + else() + message(WARNING "Unsupported SPEC2006 TARGET_OS: ${TARGET_OS}") endif() if(ARCH STREQUAL "x86")