X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnucompiler.cpp;h=a6e838d1e49ea160bf6d320d647fe44ed9be7381;hb=1c66151c44b4f4fb567da5ec8b75f066cccc5421;hp=b3f56175c034790d427cec316b12f3a7b2680773;hpb=e7ce61ee5684a5152d326af8e756cbdb987ff5f8;p=builder.git diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index b3f5617..a6e838d 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -150,7 +150,7 @@ void GnuCompiler::prepare_syspath() start = newline+1; } } - catch(const runtime_error &e) + catch(const runtime_error &) { } } @@ -210,9 +210,9 @@ Task *GnuCompiler::run(const Target &target) const string tag_for_std = (tag=="OBJC" ? "CC" : tag); if(binfo.standards.count(tag_for_std)) - argv.push_back("-std="+get_item(binfo.standards, tag_for_std)); + argv.push_back("-std="+get_item(binfo.standards, tag_for_std).str()); if(tag=="OBJC" && binfo.standards.count(tag)) - argv.push_back("-fobjc-std="+get_item(binfo.standards, tag)); + argv.push_back("-fobjc-std="+get_item(binfo.standards, tag).str()); if(binfo.warning_level>=1) { @@ -278,14 +278,15 @@ Task *GnuCompiler::run(const Target &target) const argv.push_back("-Os"); else argv.push_back(format("-O%d", binfo.optimize)); + if(binfo.debug) + argv.push_back("-fno-omit-frame-pointer"); } if(binfo.threads && architecture->get_system()!="windows" && architecture->get_system()!="darwin") argv.push_back("-pthread"); if(object.is_used_in_shared_library() && architecture->get_system()!="windows") argv.push_back("-fPIC"); - const Architecture &native_arch = builder.get_native_arch(); - if(architecture->is_native() && architecture->get_bits()!=native_arch.get_bits()) + if((architecture->get_type()=="x86" || architecture->get_type()=="ppc") && !architecture->is_native()) argv.push_back(format("-m%d", architecture->get_bits())); string cpu = architecture->get_cpu();