X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnucompiler.cpp;h=a6e838d1e49ea160bf6d320d647fe44ed9be7381;hb=1c66151c44b4f4fb567da5ec8b75f066cccc5421;hp=b186bb367cdb84350988f143142085c4b690a3ca;hpb=79f9a5a7faf8ac8adf720b76b9cd9fd054e80906;p=builder.git diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index b186bb3..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) { @@ -221,6 +221,8 @@ Task *GnuCompiler::run(const Target &target) const { argv.push_back("-Wextra"); argv.push_back("-Wundef"); + if(version>=0x80000) + argv.push_back("-Wno-cast-function-type"); } if(binfo.warning_level>=3) { @@ -276,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();