Merge pull request #62900 from thefloweringash/mysql55-clang6
mysql55: fix build under clang 6 (and newer)
This commit is contained in:
commit
288eb1485b
@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, cmake, bison, ncurses, openssl, readline, zlib, perl
|
||||
, cctools, CoreServices }:
|
||||
{ stdenv, fetchpatch, fetchurl, cmake, bison, ncurses, openssl
|
||||
, readline, zlib, perl, cctools, CoreServices }:
|
||||
|
||||
# Note: zlib is not required; MySQL can use an internal zlib.
|
||||
|
||||
@ -13,10 +13,17 @@ self = stdenv.mkDerivation rec {
|
||||
sha256 = "1mwrzwk9ap09s430fpdkyhvx5j2syd3xj2hyfzvanjphq4xqbrxi";
|
||||
};
|
||||
|
||||
patches = if stdenv.isCygwin then [
|
||||
./5.5.17-cygwin.patch
|
||||
./5.5.17-export-symbols.patch
|
||||
] else null;
|
||||
patches =
|
||||
# Minor type error that is a build failure as of clang 6.
|
||||
stdenv.lib.optional stdenv.cc.isClang (fetchpatch {
|
||||
url = "https://svn.freebsd.org/ports/head/databases/mysql55-server/files/patch-sql_sql_partition.cc?rev=469888";
|
||||
extraPrefix = "";
|
||||
sha256 = "09sya27z3ir3xy5mrv3x68hm274594y381n0i6r5s627x71jyszf";
|
||||
}) ++
|
||||
stdenv.lib.optionals stdenv.isCygwin [
|
||||
./5.5.17-cygwin.patch
|
||||
./5.5.17-export-symbols.patch
|
||||
];
|
||||
|
||||
preConfigure = stdenv.lib.optional stdenv.isDarwin ''
|
||||
ln -s /bin/ps $TMPDIR/ps
|
||||
@ -51,7 +58,10 @@ self = stdenv.mkDerivation rec {
|
||||
"-DINSTALL_SQLBENCHDIR="
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; # since gcc-7
|
||||
NIX_CFLAGS_COMPILE =
|
||||
stdenv.lib.optionals stdenv.cc.isGNU [ "-fpermissive" ] # since gcc-7
|
||||
++ stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-c++11-narrowing" ]; # since clang 6
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
||||
|
||||
prePatch = ''
|
||||
@ -78,6 +88,6 @@ self = stdenv.mkDerivation rec {
|
||||
artistic1 bsd0 bsd2 bsd3 bsdOriginal
|
||||
gpl2 lgpl2 lgpl21 mit publicDomain licenses.zlib
|
||||
];
|
||||
broken = stdenv.isAarch64 && stdenv.isDarwin;
|
||||
broken = stdenv.isAarch64;
|
||||
};
|
||||
}; in self
|
||||
|
Loading…
Reference in New Issue
Block a user