[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[csmith-project/creduce] 96e284: Handle LLVM configurations that use "-Werror=...".



  Branch: refs/heads/master
  Home:   https://github.com/csmith-project/creduce
  Commit: 96e284096a98c67ec5af8d70837b059825500183
      https://github.com/csmith-project/creduce/commit/96e284096a98c67ec5af8d70837b059825500183
  Author: Eric Eide <eeide@cs.utah.edu>
  Date:   2015-06-07 (Sun, 07 Jun 2015)

  Changed paths:
    M clang_delta/Makefile.am
    M clang_delta/Makefile.in
    M configure
    M m4/ax_llvm.m4

  Log Message:
  -----------
  Handle LLVM configurations that use "-Werror=...".

Thanks to Bernhard Rosenkraenzer for reporting the problem that is fixed
by this patch.  (Bernhard supplied a patch, too, but this commit uses a
different patch.)

Update the "autoconfig hack" to remove LLVM configuration flags like
"-Werror=fobar".  Previously, we removed the "-Werror" string, leaving
"=foobar", which is an invalid compiler option.

In "m4/ax_llvm.m4", recognize and remove LLVM configuration options that
start with "-pendatic" or "-Wpedantic".  Previously, we only removed
exactly "-pedantic".  First, this would produce a bad result if somebody
actually specified the GCC "-pedantic-errors" option, for the reason
described in the previous paragraph.  Second, we didn't recognize that
"-Wpedantic" is the same as "-pedantic".

In "clang_delta/Makefile.am", recognize and remove LLVM configuration
options that start with "-pedantic" and "-Wpedantic".  We have removed
"-pedantic" in "m4/ax_llvm.m4" for a while now.  Now we implement the
"-pedantic" removal process in "clang_delta/Makefile.am" as well, to be
consistent.  Er, I mean, to be pedantic.

I wrote the regexps for sed to be as simple as possible, for the sake of
portability.  They could be more shorter and/or more precise if I was
willing to use extended regexp syntax, but I think that the simple stuff
is good enough and likely to be less trouble, portability-wise.