0

I'm trying to build an open source project with llvm-gcc 4.2 with -emit-llvm flag. However I get many errors due to warning flags.

Example of these errors:

cc1: error: unrecognized command line option "-Warray-bounds"
cc1: error: unrecognized command line option "-Wjump-misses-init"
cc1: error: unrecognized command line option "-Wvla"
cc1: error: unrecognized command line option "-Wignored-qualifiers"
cc1: error: unrecognized command line option "-Wlogical-op"
cc1: error: unrecognized command line option "-fexcess-precision=fast"

In clang I would use -Wno-error to ignore them, but that doesn't seem to work with llvm-gcc. Manually removing the flags does not seem reasonable considering that there are 144 Makefiles.

How would I approach this problem?

5
  • You mean you would suppress CLI syntax errors with -Wno-error? I doubt that. Commented May 10, 2014 at 21:24
  • At least clang didn't bother me with it. Commented May 10, 2014 at 21:25
  • I'm afraid you're just using command line options not recognized by the tool you are using. That has nothing to do with compilation errors or warnings. Commented May 10, 2014 at 21:29
  • So my only option would be to manually removing those options? Commented May 10, 2014 at 21:36
  • Basically yes, see my answer. Commented May 10, 2014 at 21:39

1 Answer 1

1

I was trying hard to search for recent information on llvm-gcc and failed. I concluded that it's a dead project that was part of former LLVM releases but is no longer actively developed. Therefore it doesn't support the same set of warnings as current GCC versions and you cannot expect it to work with the same command line.

The errors you're getting tell you which CLI options are not supported and you have no choice than to remove them or stop using llvm-gcc and switch to something more modern. According to the LLVM website, the project you're looking for is called dragonegg.

http://dragonegg.llvm.org/

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. I can't use a newer tool mainly because KLEE only support the usage of LLVM 2.9 which is used by llvm-gcc 4.2
No problem. It's good to include those details in the question. Klee is one interesting piece of information, another would be why you prefer llvm-gcc over clang.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.