1 From fe42d6f7b739e8d42811bf46bcccfafa728847a2 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Mathias=20De=20Mar=C3=A9?= <mathias.de_mare@nokia.com>
3 Date: Mon, 19 Sep 2016 10:38:13 +0200
4 Subject: [PATCH] Convert argument to '--sysroot' option to relative path
6 Previously, only the argument to '--sysroot=' was converted.
7 This changeset adds support for '--sysroot'.
9 Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
10 Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
12 ccache.c | 15 +++++++++++++++
13 1 file changed, 15 insertions(+)
15 diff --git a/ccache.c b/ccache.c
16 index 8ffadcc..76139b9 100644
19 @@ -2407,6 +2407,21 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
23 + // Alternate form of specifying sysroot without =
24 + if (str_eq(argv[i], "--sysroot")) {
26 + cc_log("Missing argument to %s", argv[i]);
27 + stats_update(STATS_ARGS);
31 + args_add(stripped_args, argv[i]);
32 + char *relpath = make_relative_path(x_strdup(argv[i+1]));
33 + args_add(stripped_args, relpath);
38 if (str_startswith(argv[i], "-Wp,")) {
39 if (str_eq(argv[i], "-Wp,-P")
40 || strstr(argv[i], ",-P,")