diff --git a/BUILD/compile-pentium-pgcc b/BUILD/compile-pentium-pgcc index ee70fd2bde04cf93830acfc665a2fd057d58175d..2d806009b21e3bde003cfbfd59903b034e4ff28b 100755 --- a/BUILD/compile-pentium-pgcc +++ b/BUILD/compile-pentium-pgcc @@ -1,10 +1,21 @@ 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 diff --git a/Docs/manual.texi b/Docs/manual.texi index f9f12d00d00dfa0bce01d8769bacd45faa13ca6f..8fad44c6ee0edc129532713336f7508e30f7ccd9 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -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 diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index f0e0ad2728eae69b6f55011a2298d3b0ed74c1b0..bcec7386ff12134bf3a50bbe9f96be571a33aa0f 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -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 diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c index 4a3981a890e3ab7e815d9be88624b5402eced9c4..071e14562a756d7bb07067f04e43a4104e9e248c 100644 --- a/tools/mysqlmanager.c +++ b/tools/mysqlmanager.c @@ -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);