blob: 9ba574a5c6bc75ce22bd427659fcace10faa0df0 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 8df3e7007a22c9d6be5d5ae4b9b169c5c8431917 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 27 May 2015 17:06:06 -0700
4Subject: [PATCH 38/46] fix g++ sysroot
5
6Portions of
7
8http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html
9
10are not upstreamed yet. So lets keep missing pieces.
11
12Upstream-Status: Pending
13
14Without this, compiling something simple like #include <limits> on target
15with c++ test.cpp fails unable to find the header. strace shows it looking in
16usr/include/xxxx rather than /usr/include/xxxx
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 gcc/configure | 4 +++-
21 gcc/configure.ac | 4 +++-
22 2 files changed, 6 insertions(+), 2 deletions(-)
23
24diff --git a/gcc/configure b/gcc/configure
25index 9b60aad..6df594c 100755
26--- a/gcc/configure
27+++ b/gcc/configure
28@@ -3375,7 +3375,9 @@ gcc_gxx_include_dir_add_sysroot=0
29 if test "${with_sysroot+set}" = set; then
30 gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
31 if test "${gcc_gxx_without_sysroot}"; then
32- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
33+ if test x${with_sysroot} != x/; then
34+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
35+ fi
36 gcc_gxx_include_dir_add_sysroot=1
37 fi
38 fi
39diff --git a/gcc/configure.ac b/gcc/configure.ac
40index e1e54f2..3bb2173 100644
41--- a/gcc/configure.ac
42+++ b/gcc/configure.ac
43@@ -152,7 +152,9 @@ gcc_gxx_include_dir_add_sysroot=0
44 if test "${with_sysroot+set}" = set; then
45 gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
46 if test "${gcc_gxx_without_sysroot}"; then
47- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
48+ if test x${with_sysroot} != x/; then
49+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
50+ fi
51 gcc_gxx_include_dir_add_sysroot=1
52 fi
53 fi
54--
552.6.3
56