diff options
| author | Andreas Jaeger <aj@suse.de> | 2012-05-10 20:16:53 +0200 |
|---|---|---|
| committer | Andreas Jaeger <aj@suse.de> | 2012-05-10 20:19:53 +0200 |
| commit | 021db4be6f1f4189f66feee066a495d49e92b93e (patch) | |
| tree | 38d877e5dcba27bb3495cc840bc14b1a3547a076 | |
| parent | b5c086a2814b45e0b2ab678922fcc66c7351fece (diff) | |
| download | glibc-021db4be6f1f4189f66feee066a495d49e92b93e.tar.xz glibc-021db4be6f1f4189f66feee066a495d49e92b93e.zip | |
Make sunrpc code usable again
New configure option --enable-obsolete-rpc makes the deprecated RPC
headers and functions available at compile time as they were before
version 2.14. This option will be removed at some time in the future
after the TI-RPC library becomes fully sufficient for the needs of
existing applications.
58 files changed, 272 insertions, 153 deletions
@@ -1,3 +1,66 @@ +2012-05-09 Andreas Schwab <schwab@linux-m68k.org> + Andreas Jaeger <aj@suse.de> + + * configure.in (obsolete-rpc): Add new option --enable-obsolete-rpc. + * configure: Regenerated. + * config.h.in (LINK_OBSOLETE_RPC): New macro. + * config.make.in (link-obsolete-rpc): New substituted variable. + * include/libc-symbols.h (libc_hidden_nolink_sunrpc): Rename from + libc_hidden_nolink and define based on LINK_OBSOLETE_RPC. + * sunrpc/Makefile (headers) [link-obsolete-rpc]: Add rpc headers. + (shared-only-routines): Don't set it under [link-obsolete-rpc], + so that libc.a contains the symbols. + * nis/Makefile (headers) [link-obsolete-rpc]: Add rpc headers. + * sunrpc/auth_des.c: Use libc_hidden_nolink_sunrpc. + * sunrpc/auth_none.c: Likewise. + * sunrpc/auth_unix.c: Likewise. + * sunrpc/authdes_prot.c: Likewise. + * sunrpc/authuxprot.c: Likewise. + * sunrpc/clnt_gen.c: Likewise. + * sunrpc/clnt_perr.c: Likewise. + * sunrpc/clnt_raw.c: Likewise. + * sunrpc/clnt_simp.c: Likewise. + * sunrpc/clnt_tcp.c: Likewise. + * sunrpc/clnt_udp.c: Likewise. + * sunrpc/clnt_unix.c: Likewise. + * sunrpc/des_crypt.c: Likewise. + * sunrpc/des_soft.c: Likewise. + * sunrpc/get_myaddr.c: Likewise. + * sunrpc/key_call.c: Likewise. + * sunrpc/key_prot.c: Likewise. + * sunrpc/netname.c: Likewise. + * sunrpc/pm_getmaps.c: Likewise. + * sunrpc/pm_getport.c: Likewise. + * sunrpc/pmap_clnt.c: Likewise. + * sunrpc/pmap_prot.c: Likewise. + * sunrpc/pmap_prot2.c: Likewise. + * sunrpc/pmap_rmt.c: Likewise. + * sunrpc/publickey.c: Likewise. + * sunrpc/rpc_cmsg.c: Likewise. + * sunrpc/rpc_common.c: Likewise. + * sunrpc/rpc_dtable.c: Likewise. + * sunrpc/rpc_prot.c: Likewise. + * sunrpc/rpc_thread.c: Likewise. + * sunrpc/rtime.c: Likewise. + * sunrpc/svc.c: Likewise. + * sunrpc/svc_auth.c: Likewise. + * sunrpc/svc_raw.c: Likewise. + * sunrpc/svc_run.c: Likewise. + * sunrpc/svc_tcp.c: Likewise. + * sunrpc/svc_udp.c: Likewise. + * sunrpc/svc_unix.c: Likewise. + * sunrpc/svcauth_des.c: Likewise. + * sunrpc/xcrypt.c: Likewise. + * sunrpc/xdr.c: Likewise. + * sunrpc/xdr_array.c: Likewise. + * sunrpc/xdr_float.c: Likewise. + * sunrpc/xdr_intXX_t.c: Likewise. + * sunrpc/xdr_mem.c: Likewise. + * sunrpc/xdr_rec.c: Likewise. + * sunrpc/xdr_ref.c: Likewise. + * sunrpc/xdr_sizeof.c: Likewise. + * sunrpc/xdr_stdio.c: Likewise. + 2012-05-10 Roland McGrath <roland@hack.frob.com> * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Fix typo in last @@ -56,6 +56,12 @@ Version 2.16 * More generic and 64-bit performance optimizations to math functions. Implemented by Ulrich Drepper. + +* New configure option --enable-obsolete-rpc makes the deprecated RPC + headers and functions available at compile time as they were before + version 2.14. This option will be removed at some time in the future + after the TI-RPC library becomes fully sufficient for the needs of + existing applications. Version 2.15 diff --git a/config.h.in b/config.h.in index 787873b4c0..54952609ef 100644 --- a/config.h.in +++ b/config.h.in @@ -178,6 +178,9 @@ /* Define if `.ctors' and `.dtors' sections shouldn't be used. */ #undef NO_CTORS_DTORS_SECTIONS +/* Define if obsolete RPC code should be made available for user-level code + to link against. */ +#undef LINK_OBSOLETE_RPC /* */ diff --git a/config.make.in b/config.make.in index 5f6f9e281d..6c4d04ee33 100644 --- a/config.make.in +++ b/config.make.in @@ -96,6 +96,7 @@ add-on-subdirs = @add_on_subdirs@ sysdeps-add-ons = @sysdeps_add_ons@ cross-compiling = @cross_compiling@ force-install = @force_install@ +link-obsolete-rpc = @link_obsolete_rpc@ # Build tools. CC = @CC@ @@ -687,6 +687,7 @@ multi_arch base_machine add_on_subdirs add_ons +link_obsolete_rpc libc_cv_nss_crypt all_warnings force_install @@ -779,6 +780,7 @@ enable_kernel enable_all_warnings enable_multi_arch enable_nss_crypt +enable_obsolete_rpc with_cpu ' ac_precious_vars='build_alias @@ -1434,6 +1436,8 @@ Optional Features: --enable-multi-arch enable single DSO with optimizations for multiple architectures --enable-nss-crypt enable libcrypt to use nss + --enable-obsolete-rpc build and install the obsolete RPC code for + link-time usage Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3746,6 +3750,20 @@ else fi +# Check whether --enable-obsolete-rpc was given. +if test "${enable_obsolete_rpc+set}" = set; then : + enableval=$enable_obsolete_rpc; link_obsolete_rpc=$enableval +else + link_obsolete_rpc=no +fi + + + +if test "$link_obsolete_rpc" = yes; then + $as_echo "#define LINK_OBSOLETE_RPC 1" >>confdefs.h + +fi + # The way shlib-versions is used to generate soversions.mk uses a # fairly simplistic model for name recognition that can't distinguish # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os diff --git a/configure.in b/configure.in index 19a2c1a0f0..4eb9277e8c 100644 --- a/configure.in +++ b/configure.in @@ -252,6 +252,17 @@ else fi AC_SUBST(libc_cv_nss_crypt) +AC_ARG_ENABLE([obsolete-rpc], + AC_HELP_STRING([--enable-obsolete-rpc], + [build and install the obsolete RPC code for link-time usage]), + [link_obsolete_rpc=$enableval], + [link_obsolete_rpc=no]) +AC_SUBST(link_obsolete_rpc) + +if test "$link_obsolete_rpc" = yes; then + AC_DEFINE(LINK_OBSOLETE_RPC) +fi + # The way shlib-versions is used to generate soversions.mk uses a # fairly simplistic model for name recognition that can't distinguish # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 951e46a6e3..0c3274e253 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -556,7 +556,12 @@ for linking") # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libc_hidden_def(name) hidden_def (name) # define libc_hidden_weak(name) hidden_weak (name) -# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version) +# ifdef LINK_OBSOLETE_RPC + /* libc_hidden_nolink_sunrpc should only get used in sunrpc code. */ +# define libc_hidden_nolink_sunrpc(name, version) hidden_def (name) +# else +# define libc_hidden_nolink_sunrpc(name, version) hidden_nolink (name, libc, version) +# endif # define libc_hidden_ver(local, name) hidden_ver (local, name) # define libc_hidden_data_def(name) hidden_data_def (name) # define libc_hidden_data_weak(name) hidden_data_weak (name) diff --git a/nis/Makefile b/nis/Makefile index a48753f7a9..b412cee304 100644 --- a/nis/Makefile +++ b/nis/Makefile @@ -23,6 +23,12 @@ subdir := nis aux := nis_hash +include ../Makeconfig + +ifeq ($(link-obsolete-rpc),yes) +headers := $(wildcard rpcsvc/*.[hx]) +endif + # These are the databases available for the nis (and perhaps later nisplus) # service. This must be a superset of the services in nss. databases = proto service hosts network grp pwd rpc ethers \ diff --git a/sunrpc/Makefile b/sunrpc/Makefile index e61efd02b3..3b79dcdb72 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -60,6 +60,10 @@ generated-dirs := rpcsvc include ../Makeconfig +ifeq ($(link-obsolete-rpc),yes) +headers += $(headers-in-tirpc) $(headers-not-in-tirpc) +endif + ifeq ($(versioning),yes) need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \ clnt_udp get_myaddr key_call netname pm_getport \ @@ -73,9 +77,11 @@ routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \ svc_simple xdr_float xdr_rec publickey authdes_prot \ des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \ clnt_unix svc_unix create_xid $(need-export-routines) +ifneq ($(link-obsolete-rpc),yes) # We only add the RPC for compatibility to libc.so. shared-only-routines = $(routines) endif +endif # We do not build rpcinfo anymore. It is not needed for a bootstrap # and not wanted on complete systems. diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c index 96bbcfc328..0408d60826 100644 --- a/sunrpc/auth_des.c +++ b/sunrpc/auth_des.c @@ -117,7 +117,7 @@ authdes_create (const char *servername, u_int window, #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (authdes_create) #else -libc_hidden_nolink (authdes_create, GLIBC_2_1) +libc_hidden_nolink_sunrpc (authdes_create, GLIBC_2_1) #endif AUTH * @@ -211,7 +211,7 @@ failed: #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (authdes_pk_create) #else -libc_hidden_nolink (authdes_pk_create, GLIBC_2_1) +libc_hidden_nolink_sunrpc (authdes_pk_create, GLIBC_2_1) #endif /* diff --git a/sunrpc/auth_none.c b/sunrpc/auth_none.c index 5f252a9544..3af5966794 100644 --- a/sunrpc/auth_none.c +++ b/sunrpc/auth_none.c @@ -95,7 +95,7 @@ authnone_create (void) __libc_once (authnone_private_guard, authnone_create_once); return &authnone_private.no_client; } -libc_hidden_nolink (authnone_create, GLIBC_2_0) +libc_hidden |
