- const FS::Path &sysroot = build_info.sysroot;
- FS::Path cxx_path = sysroot/"usr"/"include"/"c++"/version;
- if(FS::is_dir(cxx_path))
- system_path.push_back(cxx_path);
+ string::size_type newline = output.find('\n', start);
+ if(!output.compare(start, 34, "#include <...> search starts here:"))
+ {
+ record_path = true;
+ path_found = true;
+ }
+ else if(!output.compare(start, 19, "End of search list."))
+ record_path = false;
+ else if(record_path)
+ {
+ FS::Path path = strip(output.substr(start, newline-start));
+ builder.get_logger().log("tools", format("Got %s system path: %s", tag, path));
+ system_path.push_back(path);
+ }
+ start = newline+1;