| From 0fbf81d10e0f2aabb80105fabe4ffdf87e28e664 Mon Sep 17 00:00:00 2001 |
| From: Anton Antonov <Anton.Antonov@arm.com> |
| Date: Wed, 31 Aug 2022 17:06:07 +0100 |
| Subject: [PATCH 2/4] Allow setting sysroot for libgcc lookup |
| |
| Explicitly pass the new variable LIBGCC_LOCATE_CFLAGS variable when searching |
| for the compiler libraries. |
| |
| Upstream-Status: Pending |
| Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> |
| --- |
| tools/cmake/compiler/GCC.cmake | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/tools/cmake/compiler/GCC.cmake b/tools/cmake/compiler/GCC.cmake |
| index 5a8fa59..d591c44 100644 |
| --- a/tools/cmake/compiler/GCC.cmake |
| +++ b/tools/cmake/compiler/GCC.cmake |
| @@ -268,7 +268,7 @@ function(gcc_get_lib_location) |
| cmake_parse_arguments(MY "${options}" "${oneValueArgs}" |
| "${multiValueArgs}" ${ARGN} ) |
| execute_process( |
| - COMMAND ${CMAKE_C_COMPILER} "--print-file-name=${MY_LIBRARY_NAME}" |
| + COMMAND ${CMAKE_C_COMPILER} ${LIBGCC_LOCATE_CFLAGS} --print-file-name=${MY_LIBRARY_NAME} |
| OUTPUT_VARIABLE _RES |
| RESULT_VARIABLE _GCC_ERROR_CODE |
| OUTPUT_STRIP_TRAILING_WHITESPACE |
| -- |
| 2.25.1 |
| |