mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
updates for the new build
configure.in: support for static nss on Linux when compiling --with-other-libc mysql-test/mysql-test-run.sh: --user-test option
This commit is contained in:
15
Docs/linuxthreads.txt
Normal file
15
Docs/linuxthreads.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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
|
41
configure.in
41
configure.in
@ -426,6 +426,7 @@ fi
|
|||||||
|
|
||||||
NOINST_LDFLAGS=
|
NOINST_LDFLAGS=
|
||||||
|
|
||||||
|
|
||||||
AC_ARG_WITH(other-libc,
|
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 ],
|
[ --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
|
#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
|
#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
|
#since gcc cannot now recognize that our headers are libc, we work around
|
||||||
#by telling it to be permissive
|
#by telling it to be permissive
|
||||||
LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
|
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_mysqld_ldflags="-all-static"
|
||||||
with_client_ldflags="-all-static"
|
with_client_ldflags="-all-static"
|
||||||
NOINST_LDFLAGS="-all-static"
|
NOINST_LDFLAGS="-all-static"
|
||||||
@ -2023,6 +2043,12 @@ then
|
|||||||
linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
|
linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
|
||||||
AC_DEFINE(THREAD_SAFE_CLIENT)
|
AC_DEFINE(THREAD_SAFE_CLIENT)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$static_nss" = "1"
|
||||||
|
then
|
||||||
|
CLIENT_LIBS="$CLIENT_LIBS $STATIC_NSS_FLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_SUBST(CLIENT_LIBS)
|
AC_SUBST(CLIENT_LIBS)
|
||||||
AC_SUBST(sql_client_dirs)
|
AC_SUBST(sql_client_dirs)
|
||||||
AC_SUBST(linked_client_targets)
|
AC_SUBST(linked_client_targets)
|
||||||
@ -2166,6 +2192,17 @@ then
|
|||||||
LIBS="$MT_LD_ADD $LIBS"
|
LIBS="$MT_LD_ADD $LIBS"
|
||||||
fi
|
fi
|
||||||
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(sql_server_dirs)
|
||||||
AC_SUBST(thread_dirs)
|
AC_SUBST(thread_dirs)
|
||||||
AC_SUBST(server_scripts)
|
AC_SUBST(server_scripts)
|
||||||
|
@ -124,6 +124,7 @@ MASTER_MYPORT=9306
|
|||||||
SLAVE_RUNNING=0
|
SLAVE_RUNNING=0
|
||||||
SLAVE_MYPORT=9307
|
SLAVE_MYPORT=9307
|
||||||
NO_SLAVE=0
|
NO_SLAVE=0
|
||||||
|
USER_TEST=
|
||||||
|
|
||||||
EXTRA_MASTER_OPT=""
|
EXTRA_MASTER_OPT=""
|
||||||
EXTRA_MYSQL_TEST_OPT=""
|
EXTRA_MYSQL_TEST_OPT=""
|
||||||
@ -174,6 +175,9 @@ while test $# -gt 0; do
|
|||||||
EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1"
|
EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1"
|
||||||
SLEEP_TIME=`$ECHO "$1" | $SED -e "s;--sleep=;;"`
|
SLEEP_TIME=`$ECHO "$1" | $SED -e "s;--sleep=;;"`
|
||||||
;;
|
;;
|
||||||
|
--user-test=*)
|
||||||
|
USER_TEST=`$ECHO "$1" | $SED -e "s;--user-test=;;"`
|
||||||
|
;;
|
||||||
--mysqld=*)
|
--mysqld=*)
|
||||||
TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"`
|
TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"`
|
||||||
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $TMP"
|
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $TMP"
|
||||||
@ -905,11 +909,16 @@ then
|
|||||||
if [ x$RECORD = x1 ]; then
|
if [ x$RECORD = x1 ]; then
|
||||||
$ECHO "Will not run in record mode without a specific test case."
|
$ECHO "Will not run in record mode without a specific test case."
|
||||||
else
|
else
|
||||||
for tf in $TESTDIR/*.$TESTSUFFIX
|
if [ -z "$USER_TEST" ]
|
||||||
do
|
then
|
||||||
run_testcase $tf
|
for tf in $TESTDIR/*.$TESTSUFFIX
|
||||||
done
|
do
|
||||||
$RM -f $TIMEFILE # Remove for full test
|
run_testcase $tf
|
||||||
|
done
|
||||||
|
$RM -f $TIMEFILE # Remove for full test
|
||||||
|
else
|
||||||
|
$USER_TEST
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
tname=`$BASENAME $1 .test`
|
tname=`$BASENAME $1 .test`
|
||||||
|
Reference in New Issue
Block a user