From 56513058d4d9a473904778fcdcb75b0789f58421 Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date: Tue, 13 Dec 2016 14:41:50 +0100
Subject: [PATCH] Don't join absolute paths

The intention here is to point to the /usr/include in the sysroot,
however when joining an absolute paths the result will just be the last
absolute paths

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D5256
---
 tools/ade | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ade b/tools/ade
index d8668c7..53c6204 100755
--- a/tools/ade
+++ b/tools/ade
@@ -645,7 +645,7 @@ class Project:
 
         if sysroot:
             cflags += ["--sysroot=" + sysroot.path]
-            cflags += ["-I" + os.path.join(sysroot.path, '/usr/include')]
+            cflags += ["-I" + os.path.join(sysroot.path, 'usr', 'include')]
             ldflags += ["--sysroot=" + sysroot.path]
             args += ["--host=" + TargetTriplet(sysroot.version.arch).triplet]
             args += ["--with-sysroot=" + sysroot.path]
-- 
GitLab