Commit fd2982de authored by Amir Yalon's avatar Amir Yalon
Browse files

Build sphinxsearch using the old c++98 standard

Various warnings are emitted when building in Darwin environments,
apparently due to the use of Clang as opposed to GCC. We could continue
to add more `-Wno-xxx` flags as they arise, either with the existing
`stdenv.isDarwin` condition or with the more correct
`stdenv.cc.isClang`, but for an older codebase it seems more prodent to
stick with the latest standard where it builds cleanly. The newer
`-std=c++11` was also attempted, but it still failed to build.
parent 2399c295
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -31,13 +31,7 @@ stdenv.mkDerivation rec {
    expat
  ];

  CXXFLAGS = lib.concatStringsSep " " (lib.optionals stdenv.isDarwin [
    # see upstream bug: http://sphinxsearch.com/bugs/view.php?id=2578
    # workaround for "error: invalid suffix on literal
    "-Wno-reserved-user-defined-literal"
    # workaround for "error: non-constant-expression cannot be narrowed from type 'long' to 'int'"
    "-Wno-c++11-narrowing"
  ]);
  CXXFLAGS = "-std=c++98";

  meta = {
    description = "Open source full text search server";