Merge pull request #2453 from pmahoney/mariadb-osx

MariaDB on OS X
This commit is contained in:
Michael Raskin 2014-08-30 23:49:53 +04:00
commit a539ec889c
2 changed files with 33 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, ncurses, openssl, bison, boost, libxml2, libaio, judy, libevent, groff }:
{ stdenv, fetchurl, cmake, ncurses, openssl, bison, boost, libxml2, libaio, judy, libevent, groff, perl, fixDarwinDylibNames }:
stdenv.mkDerivation rec {
name = "mariadb-${version}";
@ -9,12 +9,25 @@ stdenv.mkDerivation rec {
sha256 = "039wz89vs03a27anpshj5xaqknm7cqi7mrypvwingqkq26ns0mhs";
};
buildInputs = [ cmake ncurses openssl bison boost libxml2 libaio judy libevent groff ];
buildInputs = [ cmake ncurses openssl bison boost libxml2 judy libevent groff ]
++ stdenv.lib.optional (!stdenv.isDarwin) libaio
++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames ];
patches = stdenv.lib.optional stdenv.isDarwin ./my_context_asm.patch;
cmakeFlags = [ "-DWITH_READLINE=yes" "-DWITH_EMBEDDED_SERVER=yes" "-DINSTALL_SCRIPTDIR=bin" ];
enableParallelBuilding = true;
prePatch = ''
substituteInPlace cmake/libutils.cmake \
--replace /usr/bin/libtool libtool
'';
postInstall = ''
substituteInPlace $out/bin/mysql_install_db \
--replace basedir=\"\" basedir=\"$out\"
'';
passthru.mysqlVersion = "5.5";
meta = {

View File

@ -0,0 +1,18 @@
--- a/mysys/my_context.c
+++ b/mysys/my_context.c
@@ -206,15 +206,6 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
(
"movq %%rsp, (%[save])\n\t"
"movq %[stack], %%rsp\n\t"
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 && !defined(__INTEL_COMPILER)
- /*
- This emits a DWARF DW_CFA_undefined directive to make the return address
- undefined. This indicates that this is the top of the stack frame, and
- helps tools that use DWARF stack unwinding to obtain stack traces.
- (I use numeric constant to avoid a dependency on libdwarf includes).
- */
- ".cfi_escape 0x07, 16\n\t"
-#endif
"movq %%rbp, 8(%[save])\n\t"
"movq %%rbx, 16(%[save])\n\t"
"movq %%r12, 24(%[save])\n\t"