Commit ad308746 authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com

Merge work:/home/bk/mysql into mysql.sashanet.com:/reiser-data/mysql

parents 685acbc2 21cf70e9
Notes on compiling glibc for the standard MySQL binary:
- make sure you have gcc 2.95 and gmake 3.79 or newer
- wget ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.2.5.tar.gz
- wget ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-2.2.5.tar.gz
- tar zxvf glibc-2.2.5.tar.gz ; cd glibc-2.2.5 ;
tar zxvf ../glibc-linuxthreads-2.2.5.tar.gz
- in linuxthreads/internals.h change STACK_SIZE to (128*1024)
- in linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h change
PTHREAD_THREADS_MAX to 4096
- ./configure --prefix=/usr/local/mysql-glibc --enable-static-nss --disable-shared --enable-add-ons=linuxthreads
- make
- possible problems - if compiler is not properly installed, one can get
"cpp: too many input" files error - easiest way to solve - SUSE RPM for gcc
2.95
......@@ -426,6 +426,7 @@ fi
NOINST_LDFLAGS=
AC_ARG_WITH(other-libc,
[ --with-other-libc=/path/to/other/libc/dir Link against libc and other standard libraries installed in the specified non-standard location overriding default. Originally added to be able to link against glibc 2.2 without making the user upgrade the standard libc installation ],
[
......@@ -439,8 +440,27 @@ AC_ARG_WITH(other-libc,
#There seems to be a feature in gcc that treats system and libc headers
#leniently when they violatate ANSI C++ standard, but it is strict otherwise
#since gcc cannot now recognize that our headers are libc, we work around
#by telling it to be permissive
LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
#by telling it to be permissive
static_nss=
if test -f "$other_libc_lib/libnss_files.a"
then
# libc has been compiled with --enable-static-nss
# we need special flags, but we will have to add those later
STATIC_NSS_FLAGS="-Wl,--start-group -lc -lnss_files -lnss_dns -lresolv \
-Wl,--end-group"
static_nss=1
else
# this is a dirty hack. We if we detect static nss glibc in the special
# location, we do not re-direct the linker to get libraries from there
# during check. The reason is that if we did, we would have to find a
# way to append the special static nss flags to LIBS every time we do
# any check - this is definitely feasible, but not worthwhile the risk
# of breaking other things. So for our purposes it would be sufficient
# to assume that whoever is using static NSS knows what he is doing and
# has sensible libraries in the regular location
LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
fi
with_mysqld_ldflags="-all-static"
with_client_ldflags="-all-static"
NOINST_LDFLAGS="-all-static"
......@@ -2023,6 +2043,12 @@ then
linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
AC_DEFINE(THREAD_SAFE_CLIENT)
fi
if test "$static_nss" = "1"
then
CLIENT_LIBS="$CLIENT_LIBS $STATIC_NSS_FLAGS"
fi
AC_SUBST(CLIENT_LIBS)
AC_SUBST(sql_client_dirs)
AC_SUBST(linked_client_targets)
......@@ -2166,6 +2192,17 @@ then
LIBS="$MT_LD_ADD $LIBS"
fi
fi
#IMPORTANT - do not modify LIBS past this line - this hack is the only way
# I know to add the static NSS magic if we have static NSS libraries with
# glibc - Sasha
if test "$static_nss" = "1"
then
LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
LIBS="$LIBS $STATIC_NSS_FLAGS"
fi
AC_SUBST(sql_server_dirs)
AC_SUBST(thread_dirs)
AC_SUBST(server_scripts)
......
......@@ -124,6 +124,7 @@ MASTER_MYPORT=9306
SLAVE_RUNNING=0
SLAVE_MYPORT=9307
NO_SLAVE=0
USER_TEST=
EXTRA_MASTER_OPT=""
EXTRA_MYSQL_TEST_OPT=""
......@@ -174,6 +175,9 @@ while test $# -gt 0; do
EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1"
SLEEP_TIME=`$ECHO "$1" | $SED -e "s;--sleep=;;"`
;;
--user-test=*)
USER_TEST=`$ECHO "$1" | $SED -e "s;--user-test=;;"`
;;
--mysqld=*)
TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"`
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $TMP"
......@@ -905,11 +909,16 @@ then
if [ x$RECORD = x1 ]; then
$ECHO "Will not run in record mode without a specific test case."
else
for tf in $TESTDIR/*.$TESTSUFFIX
do
run_testcase $tf
done
$RM -f $TIMEFILE # Remove for full test
if [ -z "$USER_TEST" ]
then
for tf in $TESTDIR/*.$TESTSUFFIX
do
run_testcase $tf
done
$RM -f $TIMEFILE # Remove for full test
else
$USER_TEST
fi
fi
else
tname=`$BASENAME $1 .test`
......
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