diff options
author | unknown <sasha@mysql.sashanet.com> | 2002-02-15 14:02:48 -0700 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2002-02-15 14:02:48 -0700 |
commit | f09e89d0fd530079ad3c75ff1f9a2650af5bcef6 (patch) | |
tree | 42549a60ef8fbd65354c15cfa7793feb2f9bb106 | |
parent | fc6473fbca0730ab54ebb5068e43a662ede3ca03 (diff) | |
download | mariadb-git-f09e89d0fd530079ad3c75ff1f9a2650af5bcef6.tar.gz |
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
-rw-r--r-- | Docs/linuxthreads.txt | 15 | ||||
-rw-r--r-- | configure.in | 41 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 19 |
3 files changed, 68 insertions, 7 deletions
diff --git a/Docs/linuxthreads.txt b/Docs/linuxthreads.txt new file mode 100644 index 00000000000..0989f8d3718 --- /dev/null +++ b/Docs/linuxthreads.txt @@ -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 diff --git a/configure.in b/configure.in index f11e2354dfd..fc63e3f4082 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 09cdab9664b..d06f17d14e3 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -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` |