List:Internals« Previous MessageNext Message »
From:sasha Date:February 15 2002 9:02pm
Subject:bk commit into 3.23 tree
View as plain text  
Below is the list of changes that have just been commited into a local
3.23. repository of sasha. When sasha does a push, they will be
propogaged to the main repository and within 24 hours after the push into
the public repository. For information on how to access
the public repository see
http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet@stripped, 2002-02-15 14:02:48-07:00, sasha@stripped
  updates for the new build

  Docs/linuxthreads.txt
    1.1 02/02/15 14:02:48 sasha@stripped +15 -0

  Docs/linuxthreads.txt
    1.0 02/02/15 14:02:48 sasha@stripped +0 -0
    BitKeeper file /reiser-data/mysql/Docs/linuxthreads.txt

  mysql-test/mysql-test-run.sh
    1.86 02/02/15 14:02:48 sasha@stripped +14 -5
    --user-test option

  configure.in
    1.161 02/02/15 14:02:47 sasha@stripped +39 -2
    support for static nss on Linux when compiling --with-other-libc

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sasha
# Host:	mysql.sashanet.com
# Root:	/reiser-data/mysql

--- 1.160/configure.in	Wed Feb 13 12:53:22 2002
+++ 1.161/configure.in	Fri Feb 15 14:02:47 2002
@@ -426,6 +426,7 @@
 
 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 @@
 #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 @@
   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 @@
     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)

--- 1.85/mysql-test/mysql-test-run.sh	Sun Feb 10 11:28:58 2002
+++ 1.86/mysql-test/mysql-test-run.sh	Fri Feb 15 14:02:48 2002
@@ -124,6 +124,7 @@
 SLAVE_RUNNING=0
 SLAVE_MYPORT=9307
 NO_SLAVE=0
+USER_TEST=
 
 EXTRA_MASTER_OPT=""
 EXTRA_MYSQL_TEST_OPT=""
@@ -174,6 +175,9 @@
       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 @@
  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`
--- New file ---
+++ Docs/linuxthreads.txt	02/02/15 14:02:48
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

Thread
bk commit into 3.23 treesasha15 Feb