]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Use linker-script from gnulib.
authorSimon Josefsson <simon@josefsson.org>
Fri, 3 Apr 2009 13:00:27 +0000 (15:00 +0200)
committerSimon Josefsson <simon@josefsson.org>
Fri, 3 Apr 2009 13:00:27 +0000 (15:00 +0200)
configure.ac
gl/Makefile.am
gl/m4/gnulib-cache.m4
gl/m4/gnulib-comp.m4
gl/m4/ld-version-script.m4 [new file with mode: 0644]
m4/linker-script.m4 [deleted file]

index a53df46712439f2e0ffdcc1fe1854c40631d0704..92c86e6ec0d19a7aa95d770fe94b04365f49179a 100644 (file)
@@ -80,7 +80,6 @@ AC_DEFINE([HAVE_ERRNO_H], 1, [Hard-code for src/cfg/.])
 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
 
 sj_VALGRIND
-sj_LINKER_SCRIPT([$srcdir/lib/libgnutls.map])
 
 AC_CHECK_TYPES(uint,,, [
 # include <sys/types.h>
index ce147e038d35e8e7cb4a0b29b7e7e00ab7620df7..69d8b33f4c0c6eee23d7df824638a1f66ea3cafd 100644 (file)
@@ -9,7 +9,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 lib-msvc-compat listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
index f97083119b40c0b6c2922bede9121c9b54c45937..235b9498e646a0ef9ac5bd09ff75b127ad64d55c 100644 (file)
@@ -15,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 lib-msvc-compat listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --libtool --macro-prefix=gl --no-vc-files accept arpa_inet autobuild bind close connect error fdl-1.3 gendocs getaddrinfo getline getpass-gnu gnupload gpl-3.0 inet_ntop inet_pton lgpl-2.1 lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings minmax perror pmccabe2html progname read-file readline recv select send setsockopt shutdown socket sys_stat version-etc-fsf warnings
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -38,6 +38,7 @@ gl_MODULES([
   inet_pton
   lgpl-2.1
   lib-msvc-compat
+  lib-symbol-versions
   listen
   maintainer-makefile
   manywarnings
index bd06b134fa9e6f2a1b9fddb6e2ba0dcbd395c394..e8e36322c17315f103a23b54239187520b720533 100644 (file)
@@ -107,6 +107,7 @@ AC_SUBST([LTALLOCA])
   gl_INET_PTON
   gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
   gl_LD_OUTPUT_DEF
+  gl_LD_VERSION_SCRIPT
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([listen])
@@ -435,6 +436,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/intmax_t.m4
   m4/inttypes_h.m4
   m4/ld-output-def.m4
+  m4/ld-version-script.m4
   m4/lib-ld.m4
   m4/lib-link.m4
   m4/lib-prefix.m4
diff --git a/gl/m4/ld-version-script.m4 b/gl/m4/ld-version-script.m4
new file mode 100644 (file)
index 0000000..a97888f
--- /dev/null
@@ -0,0 +1,44 @@
+# ld-version-script.m4 serial 1
+dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson
+
+# FIXME: The test below returns a false positive for mingw
+# cross-compiles, 'local:' statements does not reduce number of
+# exported symbols in a DLL.  Use --disable-ld-version-script to work
+# around the problem.
+
+# gl_LD_VERSION_SCRIPT
+# --------------------
+# Check if LD supports linker scripts, and define automake conditional
+# HAVE_LD_VERSION_SCRIPT if so.
+AC_DEFUN([gl_LD_VERSION_SCRIPT],
+[
+  AC_ARG_ENABLE([ld-version-script],
+    AS_HELP_STRING([--enable-ld-version-script],
+      [enable linker version script (default is enabled when possible)]),
+      [have_ld_version_script=$enableval], [])
+  if test -z "$have_ld_version_script"; then
+    AC_MSG_CHECKING([if LD -Wl,--version-script works])
+    save_LDFLAGS="$LDFLAGS"
+    LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+    cat > conftest.map <<EOF
+VERS_1 {
+       global: sym;
+};
+
+VERS_2 {
+        global: sym;
+} VERS_1;
+EOF
+    AC_LINK_IFELSE(AC_LANG_PROGRAM([], []),
+                   [have_ld_version_script=yes], [have_ld_version_script=no])
+    rm -f conftest.map
+    LDFLAGS="$save_LDFLAGS"
+    AC_MSG_RESULT($have_ld_version_script)
+  fi
+  AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+])
diff --git a/m4/linker-script.m4 b/m4/linker-script.m4
deleted file mode 100644 (file)
index 7570a94..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# linker-script.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Simon Josefsson
-
-# sj_LINKER_SCRIPT(VERSION-SCRIPT)
-# -------------
-# Check if ld supports linker scripts, and define automake conditional
-# HAVE_LD_VERSION_SCRIPT if so.  VERSION-SCRIPT is a valid version script
-# file.
-AC_DEFUN([sj_LINKER_SCRIPT],
-[
-  AC_ARG_ENABLE([ld-version-script],
-    AS_HELP_STRING([--enable-ld-version-script],
-      [enable/disable linker version script (default is enabled when possible)]),
-      [have_ld_version_script=$enableval], [])
-  if test -z "$have_ld_version_script"; then
-    AC_MSG_CHECKING([if -Wl,--version-script works])
-    save_LDFLAGS="$LDFLAGS"
-    LDFLAGS="$LDFLAGS -Wl,--version-script=$1"
-    AC_LINK_IFELSE(AC_LANG_PROGRAM([], []),
-                   [have_ld_version_script=yes], [have_ld_version_script=no])
-    LDFLAGS="$save_LDFLAGS"
-    AC_MSG_RESULT($have_ld_version_script)
-  fi
-  AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
-])