blob: b226bc4156d38cb38f59bf820012e9ae699a2633 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001From 0fbf81d10e0f2aabb80105fabe4ffdf87e28e664 Mon Sep 17 00:00:00 2001
2From: Anton Antonov <Anton.Antonov@arm.com>
3Date: Wed, 31 Aug 2022 17:06:07 +0100
4Subject: [PATCH 2/4] Allow setting sysroot for libgcc lookup
5
6Explicitly pass the new variable LIBGCC_LOCATE_CFLAGS variable when searching
7for the compiler libraries.
8
9Upstream-Status: Pending
10Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
11---
12 tools/cmake/compiler/GCC.cmake | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/tools/cmake/compiler/GCC.cmake b/tools/cmake/compiler/GCC.cmake
16index 5a8fa59..d591c44 100644
17--- a/tools/cmake/compiler/GCC.cmake
18+++ b/tools/cmake/compiler/GCC.cmake
19@@ -268,7 +268,7 @@ function(gcc_get_lib_location)
20 cmake_parse_arguments(MY "${options}" "${oneValueArgs}"
21 "${multiValueArgs}" ${ARGN} )
22 execute_process(
23- COMMAND ${CMAKE_C_COMPILER} "--print-file-name=${MY_LIBRARY_NAME}"
24+ COMMAND ${CMAKE_C_COMPILER} ${LIBGCC_LOCATE_CFLAGS} --print-file-name=${MY_LIBRARY_NAME}
25 OUTPUT_VARIABLE _RES
26 RESULT_VARIABLE _GCC_ERROR_CODE
27 OUTPUT_STRIP_TRAILING_WHITESPACE
28--
292.25.1
30