summaryrefslogtreecommitdiff
path: root/packages/picolibc/1.4.7/0003-Add-picolibc-include-directory-to-cc1plus-spec.patch
blob: 885c0c7e870de104a92b03ad1b270ab7560c80cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 1f6b3ddcbba7432a5b2f1061f24297989d6ce791 Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@keithp.com>
Date: Mon, 9 Nov 2020 13:02:44 -0800
Subject: [PATCH] Add picolibc include directory to cc1plus spec

G++ doesn't use the cpp spec to add include directories, so we need to
add the picolibc include directory to the cc1plus spec element as well
as the cpp one. To make sure the libstdc++ headers can use
GCC-provided header directories, so use -idirafter instead of -isystem.

Signed-off-by: Keith Packard <keithp@keithp.com>
---
 picolibc.specs.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/picolibc.specs.in b/picolibc.specs.in
index c1f916a6f..133e65db9 100644
--- a/picolibc.specs.in
+++ b/picolibc.specs.in
@@ -10,7 +10,7 @@
 @TLSMODEL@ %(picolibc_cc1) @CC1_SPEC@
 
 *cc1plus:
-@TLSMODEL@ %(picolibc_cc1plus) @CC1_SPEC@ @CC1PLUS_SPEC@
+-idirafter @INCLUDEDIR@ @TLSMODEL@ %(picolibc_cc1plus) @CC1_SPEC@ @CC1PLUS_SPEC@
 
 *link:
 @SPECS_PRINTF@ -L@LIBDIR@/%M -L@LIBDIR@ %{!T:-Tpicolibc.ld} %(picolibc_link) --gc-sections @LINK_SPEC@
-- 
2.28.0