Revert "build: add symbol versioning when we build with gnu ld"
authorKarolin Seeger <kseeger@samba.org>
Mon, 9 Jun 2008 06:39:12 +0000 (08:39 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 9 Jun 2008 06:50:29 +0000 (08:50 +0200)
This reverts commit cb5492978b6b157f529806afb2f5fc6202888129.

For more information, please have a look at the discussion on
samba-technical starting with [1].

[1] http://lists.samba.org/archive/samba-technical/2008-June/059511.html

Karolin
(cherry picked from commit 1e5aeb96f92fef8056ec9010e125f4d0d31dd90e)

source/Makefile.in
source/configure.in
source/exports/libsmbclient.version.syms [deleted file]
source/exports/libsmbsharemodes.version.syms [deleted file]
source/script/mksyms.awk
source/script/mksyms.sh

index 998bf43..1cf03ee 100644 (file)
@@ -1587,8 +1587,8 @@ bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIB
 
 MKSYMS_SH = $(srcdir)/script/mksyms.sh
 
-$(LIBTALLOC_SYMS): $(LIBTALLOC_HEADERS) $(builddir)/library-versions
-       @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBTALLOC_HEADERS)
+$(LIBTALLOC_SYMS): $(LIBTALLOC_HEADERS)
+       @$(MKSYMS_SH) $(AWK) $@ $(LIBTALLOC_HEADERS)
 
 $(LIBTALLOC_SHARED_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ) $(LIBTALLOC_SYMS)
        @echo Linking shared library $@
@@ -1600,8 +1600,8 @@ $(LIBTALLOC_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ0)
        @echo Linking non-shared library $@
        @-$(AR) -rc $@ $(LIBTALLOC_OBJ0)
 
-$(LIBTDB_SYMS): $(LIBTDB_HEADERS) $(builddir)/library-versions
-       @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBTDB_HEADERS)
+$(LIBTDB_SYMS): $(LIBTDB_HEADERS)
+       @$(MKSYMS_SH) $(AWK) $@ $(LIBTDB_HEADERS)
 
 $(LIBTDB_SHARED_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ) $(LIBTDB_SYMS)
        @echo Linking shared library $@
@@ -1613,8 +1613,8 @@ $(LIBTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ0)
        @echo Linking non-shared library $@
        @-$(AR) -rc $@ $(LIBTDB_OBJ0)
 
-$(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS) $(builddir)/library-versions
-       @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBWBCLIENT_HEADERS)
+$(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS)
+       @$(MKSYMS_SH) $(AWK) $@ $(LIBWBCLIENT_HEADERS)
 
 $(LIBWBCLIENT_SHARED_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS) @LIBTALLOC_SHARED@
        @echo Linking shared library $@
@@ -1636,8 +1636,8 @@ bin/libaddns.a: $(BINARY_PREREQS) $(LIBADDNS_OBJ)
        @echo Linking non-shared library $@
        @-$(AR) -rc $@ $(LIBADDNS_OBJ)
 
-$(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS) $(builddir)/library-versions
-       @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBNETAPI_HEADERS)
+$(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS)
+       @$(MKSYMS_SH) $(AWK) $@ $(LIBNETAPI_HEADERS)
 
 $(LIBNETAPI_SHARED_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking shared library $@
index 473b75f..481f3cd 100644 (file)
@@ -1504,23 +1504,6 @@ fi
 # Set defaults
 SYMSEXT="syms"
 AC_SUBST(SYMSEXT)
-use_symbol_versioning=no
-if test x"$ac_cv_gnu_ld_version_script" = x"yes"; then
-       use_symbol_versioning=yes
-fi
-AC_ARG_ENABLE(symbol-versioning,[
-       AS_HELP_STRING([--enable-symbol-versioning],
-               [Turn on symbol versioning support if available (default=auto)])
-])
-if test x"$enable_symbol_versioning" = x"no"; then
-       use_symbol_versioning=no
-fi
-
-AC_MSG_CHECKING([symbol versioning])
-if test "x$use_symbol_versioning" = x"yes"; then
-       SYMSEXT="version.syms"
-fi
-AC_MSG_RESULT($use_symbol_versioning)
 
 # Assume non-shared by default and override below
 BLDSHARED="false"
diff --git a/source/exports/libsmbclient.version.syms b/source/exports/libsmbclient.version.syms
deleted file mode 100644 (file)
index 6afdbcb..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# we use no version symbols for libsmbclient
-# to be compatible with 3.0.x
-#
-{
-       global: smbc_*;
-       local: *;
-};
diff --git a/source/exports/libsmbsharemodes.version.syms b/source/exports/libsmbsharemodes.version.syms
deleted file mode 100644 (file)
index cf3f033..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# we use no version symbols for libsmbsharemodes
-# to be compatible with 3.0.x
-#
-{
-       global: *;
-};
index dfe51db..a30bea4 100644 (file)
@@ -9,6 +9,9 @@
 BEGIN {
        inheader=0;
        current_file="";
+       print "#"
+       print "# This file is automatically generated with \"make symbols\". DO NOT EDIT "
+       print "#"
        print "{"
        print "\tglobal:"
 }
index 673c77a..51d3fbd 100755 (executable)
@@ -15,50 +15,26 @@ LANG=C; export LANG
 LC_ALL=C; export LC_ALL
 LC_COLLATE=C; export LC_COLLATE
 
-if [ $# -lt 3 ]
+if [ $# -lt 2 ]
 then
-  echo "Usage: $0 awk versionfile output_file header_files"
+  echo "Usage: $0 awk output_file header_files"
   exit 1
 fi
 
 awk="$1"
 shift
 
-versionfile="$1"
-shift
-
 symsfile="$1"
 shift
 symsfile_tmp="$symsfile.$$.tmp~"
 
-libname=`basename $symsfile | cut -d '.' -f1`
-verline=`grep $libname $versionfile`
-majver=`echo -n "$verline" | cut -d ':' -f2`
-minver=`echo -n "$verline" | cut -d ':' -f3`
-upname=`echo -n "$libname" | sed -e 's/^lib//' | tr '[a-z]' '[A-Z]'`
-symver="${upname}_${majver}.${minver}"
-
-symsext=`basename $symsfile | cut -d '.' -f2-`
-
-if test x"$symsext" = x"version.syms"; then
-       echo "creating $symsfile for $symver"
-else
-       echo "creating $symsfile"
-       symver="# no symbol versioning"
-fi
-
 proto_src="`echo $@ | tr ' ' '\n' | sort | uniq `"
 
-mkdir -p `dirname $symsfile`
+echo creating $symsfile
 
-cat > $symsfile_tmp <<_ACEOF
-#
-# This file is automatically generated with "$0". DO NOT EDIT
-#
-$symver
-_ACEOF
+mkdir -p `dirname $symsfile`
 
-${awk} -f `dirname $0`/mksyms.awk $proto_src >> $symsfile_tmp
+${awk} -f `dirname $0`/mksyms.awk $proto_src > $symsfile_tmp
 
 if cmp -s $symsfile $symsfile_tmp 2>/dev/null
 then