From: Alexander Alekhin Date: Sat, 29 Oct 2016 13:15:24 +0000 (+0300) Subject: cmake: ARM toolchain: find ld/ar X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1434^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fddc9c583998ac4a0c4981f2bcc34cd7be0b9911;p=platform%2Fupstream%2Fopencv.git cmake: ARM toolchain: find ld/ar --- diff --git a/platforms/linux/arm.toolchain.cmake b/platforms/linux/arm.toolchain.cmake index 23c03fb..75c9194 100644 --- a/platforms/linux/arm.toolchain.cmake +++ b/platforms/linux/arm.toolchain.cmake @@ -33,6 +33,16 @@ if(NOT DEFINED CMAKE_CXX_COMPILER) else() #message(WARNING "CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} is defined") endif() +if(NOT DEFINED CMAKE_LINKER) + find_program(CMAKE_LINKER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ld${__GCC_VER_SUFFIX} ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ld) +else() + #message(WARNING "CMAKE_LINKER=${CMAKE_LINKER} is defined") +endif() +if(NOT DEFINED CMAKE_AR) + find_program(CMAKE_AR NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ar${__GCC_VER_SUFFIX} ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ar) +else() + #message(WARNING "CMAKE_AR=${CMAKE_AR} is defined") +endif() if(NOT DEFINED ARM_LINUX_SYSROOT AND DEFINED GNU_MACHINE) set(ARM_LINUX_SYSROOT /usr/${GNU_MACHINE}${FLOAT_ABI_SUFFIX})