X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnucxxcompiler.cpp;h=87fe1642801fbd466f92474fb9e69d25f76c1fae;hb=407b96515a5246384847d1835a2d69704e941ea1;hp=af001b3b569cfcd68e06dd67b5a4f16b4a6320af;hpb=7777d548fddca66b21f26273faedfdf675b10234;p=builder.git diff --git a/source/gnucxxcompiler.cpp b/source/gnucxxcompiler.cpp index af001b3..87fe164 100644 --- a/source/gnucxxcompiler.cpp +++ b/source/gnucxxcompiler.cpp @@ -5,8 +5,8 @@ using namespace std; using namespace Msp; -GnuCxxCompiler::GnuCxxCompiler(Builder &b, const Architecture &a): - GnuCompiler(b, a, "CXX") +GnuCxxCompiler::GnuCxxCompiler(Builder &b, const Architecture &a, const FS::Path &sysroot): + GnuCompiler(b, a, "CXX", sysroot) { set_command("g++", true); input_suffixes.push_back(".cpp"); @@ -29,7 +29,8 @@ void GnuCxxCompiler::do_prepare() GnuCompiler::do_prepare(); if(!version.empty()) { - FS::Path cxx_path = FS::Path("/usr/include/c++")/version; + 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); }