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

[csmith-project/creduce] 6f0343: Be more aggressive about cleaning C++ compiler fla...



  Branch: refs/heads/master
  Home:   https://github.com/csmith-project/creduce
  Commit: 6f03438778ffd0d10c34596e0cc4628cdf9d7032
      https://github.com/csmith-project/creduce/commit/6f03438778ffd0d10c34596e0cc4628cdf9d7032
  Author: Eric Eide <eeide@cs.utah.edu>
  Date:   2015-09-23 (Wed, 23 Sep 2015)

  Changed paths:
    M m4/ax_llvm.m4

  Log Message:
  -----------
  Be more aggressive about cleaning C++ compiler flags.

In particular, remove all warning-related options ("-W...").  While I
was in there, I tuned it up to also remove options of the form "-w",
"-g...", and "-O...".  We already removed "-pedantic...".

This change was instigated by the LLVM 3.7.0 binary distribution for
Ubuntu 14.04, available from
http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz

That binary distribution was compiled with the clang option
"-Wcovered-switch-default", which is not implemented by g++.

g++ is the compiler that our configure scripts choose by default for
building C-Reduce.  (This is standard behavior for Autoconf-based
projects.)

This means that if someone installs the precompiled LLVM 3.7.0
distribution on Ubuntu 14, the "out of the box build experience" for
C-Reduce fails at configure time, when we try to build the test LLVM
program (with g++).

No more trying to be clever about which -W options to keep and which to
discard!  Get rid of them all!


  Commit: 593422b9c23b56faef426060999a252800517df9
      https://github.com/csmith-project/creduce/commit/593422b9c23b56faef426060999a252800517df9
  Author: Eric Eide <eeide@cs.utah.edu>
  Date:   2015-09-23 (Wed, 23 Sep 2015)

  Changed paths:
    M m4/ax_llvm.m4

  Log Message:
  -----------
  Use a better pipeline to process LLVM --cxxflags.

The 'sed' command in my previous commit is not portable.  At a minimum,
some sed's use "[[:<:]]" and "[[:>:]]" to match word boundaries, and
others use "\b".  In addition, the GNU Autoconf documentation says that
"^" is not portable.  Sigh.

So this commit replaces the 'sed' with a pipeline that uses 'grep' to do
the matching.  This is perhaps more portable, and bonus, it can be
written in a more human-readable way.  Huzzah!

The main trick is the new pipeline is to put the command-line options on
separate lines, using 'sed', so that we can use 'grep' to match the
options (lines) we want to remove.  Then the pipeline puts the
command-line options back onto a single line using 'xargs'.


  Commit: c0c6cb05fbc4117326a7ef11506a2e15f00a9bec
      https://github.com/csmith-project/creduce/commit/c0c6cb05fbc4117326a7ef11506a2e15f00a9bec
  Author: Eric Eide <eeide@cs.utah.edu>
  Date:   2015-09-23 (Wed, 23 Sep 2015)

  Changed paths:
    M clang_delta/Makefile.am

  Log Message:
  -----------
  Use a better pipeline to process LLVM --cxxflags.

Copy the new parsing pipeline from "m4/ax_llvm.m4" to here.


  Commit: ec89a4b836da6cad321e95d12527572c00de58fe
      https://github.com/csmith-project/creduce/commit/ec89a4b836da6cad321e95d12527572c00de58fe
  Author: Eric Eide <eeide@cs.utah.edu>
  Date:   2015-09-23 (Wed, 23 Sep 2015)

  Changed paths:
    M clang_delta/Makefile.in
    M configure

  Log Message:
  -----------
  Regenerate build files.

Use the new LLVM --cxxflags parsing stuff.


Compare: https://github.com/csmith-project/creduce/compare/d568cb7bfdbb...ec89a4b836da