Use gcc10-gcc and gcc10-g++ on Amazon Linux 2.
@@ -85,6 +85,13 @@ function(setup_vespa_default_build_settings_fedora_35)
set(DEFAULT_VESPA_LLVM_VERSION "12" PARENT_SCOPE)
endfunction()
+function(setup_vespa_default_build_settings_amzn_2)
+ message("-- Setting up default build settings for amzn 2")
+ set(DEFAULT_EXTRA_LINK_DIRECTORY "${VESPA_DEPS}/lib64" "/usr/lib64/llvm7.0/lib" PARENT_SCOPE)
+ set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${VESPA_DEPS}/include" "/usr/include/llvm7.0" "/usr/include/openblas" PARENT_SCOPE)
+ set(DEFAULT_VESPA_LLVM_VERSION "7" PARENT_SCOPE)
+endfunction()
+
function(setup_vespa_default_build_settings_ubuntu)
message("-- Setting up default build settings for ubuntu")
SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
@@ -194,6 +201,8 @@ function(vespa_use_default_build_settings)
setup_vespa_default_build_settings_fedora_34()
elseif(VESPA_OS_DISTRO_COMBINED STREQUAL "fedora 35")
setup_vespa_default_build_settings_fedora_35()
+ elseif(VESPA_OS_DISTRO_COMBINED STREQUAL "amzn 2")
+ setup_vespa_default_build_settings_amzn_2()
elseif(VESPA_OS_DISTRO STREQUAL "ubuntu")
setup_vespa_default_build_settings_ubuntu()
elseif(VESPA_OS_DISTRO STREQUAL "debian")
@@ -295,6 +304,9 @@ function(vespa_use_default_cxx_compiler)
if(APPLE)
set(DEFAULT_CMAKE_C_COMPILER "/usr/local/bin/gcc-10")
set(DEFAULT_CMAKE_CXX_COMPILER "/usr/local/bin/g++-10")
+ elseif(VESPA_OS_DISTRO_COMBINED STREQUAL "amzn 2")
+ set(DEFAULT_CMAKE_C_COMPILER "/usr/bin/gcc10-gcc")
+ set(DEFAULT_CMAKE_CXX_COMPILER "/usr/bin/gcc10-g++")
endif()
elseif(VESPA_COMPILER_VARIANT STREQUAL "clang")
if(APPLE)
