summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-10-09 19:32:55 +0300
committerunknown <monty@hundin.mysql.fi>2001-10-09 19:32:55 +0300
commitfe576bde63b7267accb56cb82141563503eb6db0 (patch)
tree3c2155c0f40e53dac7920f25fb7cf448cd718702
parentade101ca2bf132b5eb065ef74aa574c01e202074 (diff)
downloadmariadb-git-fe576bde63b7267accb56cb82141563503eb6db0.tar.gz
Don't depend on mit-pthreads include files when building libmysqld.a
BUILD/compile-pentium-pgcc: Update to 4.0 Docs/manual.texi: Added info about --with-embedded-server libmysqld/Makefile.am: Don't depend on mit-pthreads include files tools/mysqlmanager.c: Remove warnings
-rwxr-xr-xBUILD/compile-pentium-pgcc23
-rw-r--r--Docs/manual.texi10
-rw-r--r--libmysqld/Makefile.am12
-rw-r--r--tools/mysqlmanager.c4
4 files changed, 40 insertions, 9 deletions
diff --git a/BUILD/compile-pentium-pgcc b/BUILD/compile-pentium-pgcc
index ee70fd2bde0..2d806009b21 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 f9f12d00d00..8fad44c6ee0 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -7606,6 +7606,10 @@ 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
of these:
@@ -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 f0e0ad2728e..bcec7386ff1 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 4a3981a890e..071e14562a7 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);