From: Simon Josefsson Date: Fri, 3 Apr 2009 13:00:27 +0000 (+0200) Subject: Use linker-script from gnulib. X-Git-Tag: gnutls_2_7_7~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd4a00d469912cc14c47671df0fed24586e6d26e;p=thirdparty%2Fgnutls.git Use linker-script from gnulib. --- diff --git a/configure.ac b/configure.ac index a53df46712..92c86e6ec0 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/gl/Makefile.am b/gl/Makefile.am index ce147e038d..69d8b33f4c 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -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 diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index f97083119b..235b9498e6 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -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 diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index bd06b134fa..e8e36322c1 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -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 index 0000000000..a97888f249 --- /dev/null +++ b/gl/m4/ld-version-script.m4 @@ -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 <