diff --git a/src/utils/compiler.rb b/src/utils/compiler.rb index 8cc243f608..39f7d57184 100644 --- a/src/utils/compiler.rb +++ b/src/utils/compiler.rb @@ -57,6 +57,7 @@ class Compiler def default_args cflags = Shellwords.split(ENV["CFLAGS"] || "") args = [@path] + args << "-std=c++11" cflags.each do |flag| # Don't generate temporary files if flag == "" || flag == "-MMD" || flag == "-MP" || flag.start_with?("-save-temps") @@ -67,7 +68,7 @@ class Compiler next end if flag.start_with? "-std=" - flag = "-std=c++11" + next end if flag.start_with? "-D'" # Cleanup flag. Done by the shell when called from diff --git a/src/utils/settings.rb b/src/utils/settings.rb index 7795552308..bb517de362 100644 --- a/src/utils/settings.rb +++ b/src/utils/settings.rb @@ -718,7 +718,7 @@ class Generator def compile_test_file(prog) buf = StringIO.new # cstddef for offsetof() - headers = ["platform.h", "target.h", "cstddef"] + headers = ["platform.h", "cstddef"] @data["groups"].each do |group| gh = group["headers"] if gh @@ -925,7 +925,7 @@ class Generator buf << "static_assert(V == 42 && 0 == 1, \"FAIL\");\n" buf << "public:\n" buf << "Fail() {};\n" - buf << "int64_t v = V\n" + buf << "int64_t v = V;\n" buf << "};\n" ii = 0 s.each do |c|