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

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

parent 9131b569
AM_MAKEFLAGS="-j 2" AM_MAKEFLAGS="-j 2"
make -k clean gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache /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 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 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
make -j 2
gmake -j 4
mkdir -p tmp
nm --numeric-sort sql/mysqld > tmp/mysqld.sym
objdump -d sql/mysqld > tmp/mysqld.S
strip sql/mysqld strip sql/mysqld
...@@ -7605,6 +7605,10 @@ compile step will still try to build @code{mysql}, but you can ignore any ...@@ -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} 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.) 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 @item
If you don't want your log files and database directories located under 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 @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 ...@@ -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 @file{/usr/local}. The second command preserves the default installation
prefix, but overrides the default location for database directories prefix, but overrides the default location for database directories
(normally @file{/usr/local/var}) and changes it to (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 changing socket location
@cindex socket location, changing @cindex socket location, changing
...@@ -42350,6 +42355,9 @@ library. @xref{mysql_server_init}. ...@@ -42350,6 +42355,9 @@ library. @xref{mysql_server_init}.
@node libmysqld compiling, libmysqld restrictions, libmysqld overview, libmysqld @node libmysqld compiling, libmysqld restrictions, libmysqld overview, libmysqld
@subsubsection Compiling Programs with @code{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 When you link your program with @code{libmysqld}, you must also include
the system specific @code{pthread} libraries and some libraries that the system specific @code{pthread} libraries and some libraries that
@code{mysqld} uses. You can get the full list of libraries by executing @code{mysqld} uses. You can get the full list of libraries by executing
...@@ -59,6 +59,18 @@ EXTRA_DIST = lib_vio.c ...@@ -59,6 +59,18 @@ EXTRA_DIST = lib_vio.c
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
libmysqld_a_SOURCES= 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 # automake misses these
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
......
...@@ -1040,7 +1040,7 @@ LOG_MSG_FUNC(log_info,LOG_INFO) ...@@ -1040,7 +1040,7 @@ LOG_MSG_FUNC(log_info,LOG_INFO)
#ifndef DBUG_OFF #ifndef DBUG_OFF
LOG_MSG_FUNC(log_debug,LOG_DEBUG) LOG_MSG_FUNC(log_debug,LOG_DEBUG)
#else #else
inline void log_debug(char* __attribute__((unused)) fmt,...) {} inline void log_debug(const char* __attribute__((unused)) fmt,...) {}
#endif #endif
static pthread_handler_decl(process_launcher_messages, static pthread_handler_decl(process_launcher_messages,
...@@ -1065,7 +1065,7 @@ static pthread_handler_decl(process_launcher_messages, ...@@ -1065,7 +1065,7 @@ static pthread_handler_decl(process_launcher_messages,
char* ident=buf+1; char* ident=buf+1;
int ident_len=strlen(ident); int ident_len=strlen(ident);
memcpy(&pid,ident+ident_len+1,sizeof(pid)); 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); ident_len,pid);
pthread_mutex_lock(&lock_exec_hash); pthread_mutex_lock(&lock_exec_hash);
log_debug("hash has %d records",exec_hash.records); log_debug("hash has %d records",exec_hash.records);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment