Commit 2eb83ad4 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Don't depend on mit-pthreads include files when building libmysqld.a

parent 9131b569
Loading
Loading
Loading
Loading
+17 −6
Original line number Diff line number Diff line
AM_MAKEFLAGS="-j 2"
make -k clean
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
 
aclocal; autoheader; aclocal; automake; autoconf
aclocal && autoheader && aclocal && automake && autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
if [ -d gemini ]
then
   (cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
 
export PATH=/usr/local/pgcc/bin:$PATH
CFLAGS="-O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=gcc CXXFLAGS="-O6 -mpentiumpro -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex --enable-thread-safe-client
make -j 2
CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused  -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static  --with-client-ldflags=-all-static
 
gmake -j 4
 
mkdir -p tmp
nm --numeric-sort sql/mysqld  > tmp/mysqld.sym
objdump -d sql/mysqld > tmp/mysqld.S
strip sql/mysqld
+9 −1
Original line number Diff line number Diff line
@@ -7605,6 +7605,10 @@ compile step will still try to build @code{mysql}, but you can ignore any
warnings about @file{mysql.cc}.  (If @code{make} stops, try @code{make -k}
to tell it to continue with the rest of the build even if errors occur.)
@item
If you want to get a embedded MySQL library (@code{libmysqld.a}) you should
use the @code{--with-embedded-server} option.
@item
If you don't want your log files and database directories located under
@file{/usr/local/var}, use a @code{configure} command, something like one
@@ -7621,7 +7625,8 @@ installed under @file{/usr/local/mysql} rather than the default of
@file{/usr/local}.  The second command preserves the default installation
prefix, but overrides the default location for database directories
(normally @file{/usr/local/var}) and changes it to
@code{/usr/local/mysql/data}.
@code{/usr/local/mysql/data}.  After you have compiled MySQL, you can
change these options with option files. @xref{Option files}.
@cindex changing socket location
@cindex socket location, changing
@@ -42350,6 +42355,9 @@ library. @xref{mysql_server_init}.
@node libmysqld compiling, libmysqld restrictions, libmysqld overview, libmysqld
@subsubsection Compiling Programs with @code{libmysqld}
To get a @code{libmysqld} library you should configure MySQL with the
@code{--with-embedded-server} option.
When you link your program with @code{libmysqld}, you must also include
the system specific @code{pthread} libraries and some libraries that
@code{mysqld} uses.  You can get the full list of libraries by executing
+12 −0
Original line number Diff line number Diff line
@@ -59,6 +59,18 @@ EXTRA_DIST = lib_vio.c
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
libmysqld_a_SOURCES=

# Don't depend on things from mit-pthreads

OMIT_DEPENDENCIES =	pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\
			__math.h time.h __time.h unistd.h __unistd.h types.h \
			xtypes.h ac-types.h posix.h string.h __string.h \
			errno.h socket.h inet.h dirent.h netdb.h \
			cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \
			prio_queue.h pthread_attr.h pthread_once.h queue.h\
			sleep.h specific.h version.h pwd.h timers.h uio.h \
			cdefs.h machdep.h signal.h __signal.h util.h lex.h \
			wait.h

# automake misses these
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy

+2 −2
Original line number Diff line number Diff line
@@ -1040,7 +1040,7 @@ LOG_MSG_FUNC(log_info,LOG_INFO)
#ifndef DBUG_OFF
LOG_MSG_FUNC(log_debug,LOG_DEBUG)
#else
inline void log_debug(char* __attribute__((unused)) fmt,...) {}
inline void log_debug(const char* __attribute__((unused)) fmt,...) {}
#endif

static pthread_handler_decl(process_launcher_messages,
@@ -1065,7 +1065,7 @@ static pthread_handler_decl(process_launcher_messages,
      char* ident=buf+1;
      int ident_len=strlen(ident);
      memcpy(&pid,ident+ident_len+1,sizeof(pid));
      log_debug("process message - ident=%s,ident_len=%d,pid=%d",ident,
      log_debug("process message - ident=%s  ident_len=%d  pid=%d",ident,
		ident_len,pid);
      pthread_mutex_lock(&lock_exec_hash);
      log_debug("hash has %d records",exec_hash.records);