Andrew Geissler | 23e0279 | 2023-07-21 09:06:10 -0500 | [diff] [blame] | 1 | From 02ea8e616ac615efe3507d627dfba9820d3357f6 Mon Sep 17 00:00:00 2001 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 2 | From: Ross Burton <ross.burton@arm.com> |
| 3 | Date: Tue, 26 May 2020 14:38:02 -0500 |
| 4 | Subject: [PATCH] allow setting sysroot for libgcc lookup |
| 5 | |
| 6 | Explicitly pass the new variable LIBGCC_LOCATE_CFLAGS variable when searching |
| 7 | for the compiler libraries as there's no easy way to reliably pass --sysroot |
| 8 | otherwise. |
| 9 | |
| 10 | Upstream-Status: Pending [https://github.com/OP-TEE/optee_os/issues/4188] |
| 11 | Signed-off-by: Ross Burton <ross.burton@arm.com> |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 12 | --- |
| 13 | mk/gcc.mk | 6 +++--- |
| 14 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 15 | |
| 16 | diff --git a/mk/gcc.mk b/mk/gcc.mk |
Andrew Geissler | 23e0279 | 2023-07-21 09:06:10 -0500 | [diff] [blame] | 17 | index adc77a24f25e..81bfa78ad8d7 100644 |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 18 | --- a/mk/gcc.mk |
| 19 | +++ b/mk/gcc.mk |
| 20 | @@ -13,11 +13,11 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \ |
| 21 | -print-file-name=include 2> /dev/null) |
| 22 | |
| 23 | # Get location of libgcc from gcc |
| 24 | -libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \ |
| 25 | +libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \ |
| 26 | -print-libgcc-file-name 2> /dev/null) |
| 27 | -libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ |
| 28 | +libstdc++$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ |
| 29 | -print-file-name=libstdc++.a 2> /dev/null) |
| 30 | -libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ |
| 31 | +libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \ |
| 32 | -print-file-name=libgcc_eh.a 2> /dev/null) |
| 33 | |
| 34 | # Define these to something to discover accidental use |