From 1ada80642d06d8ef5144933178191eba262a1372 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Sep 2016 14:54:27 +0200 Subject: Handle /usr/local brain-death --- build2/cc/compile.cxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'build2/cc/compile.cxx') diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index fce5d21..a89555c 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -340,6 +340,12 @@ namespace build2 hash_options (cs, t, c_poptions); hash_options (cs, t, x_poptions); + + // Extra system header dirs (last). + // + for (const dir_path& d: sys_inc_dirs) + cs.append (d.string ()); + hash_options (cs, t, c_coptions); hash_options (cs, t, x_coptions); hash_std (cs); @@ -731,6 +737,14 @@ namespace build2 append_options (args, t, c_poptions); append_options (args, t, x_poptions); + // Extra system header dirs (last). + // + for (const dir_path& d: sys_inc_dirs) + { + args.push_back ("-I"); + args.push_back (d.string ().c_str ()); + } + // Some compile options (e.g., -std, -m) affect the preprocessor. // append_options (args, t, c_coptions); @@ -1392,6 +1406,15 @@ namespace build2 append_options (args, t, c_poptions); append_options (args, t, x_poptions); + + // Extra system header dirs (last). + // + for (const dir_path& d: sys_inc_dirs) + { + args.push_back ("-I"); + args.push_back (d.string ().c_str ()); + } + append_options (args, t, c_coptions); append_options (args, t, x_coptions); -- cgit v1.1