diff options
| author | Andreas Schwab <schwab@linux-m68k.org> | 2012-05-09 15:51:23 +0200 |
|---|---|---|
| committer | Andreas Jaeger <aj@suse.de> | 2012-05-09 22:35:39 +0200 |
| commit | ec2868627f550cb9edbfb05ce3680ecbb23d715b (patch) | |
| tree | 21fb77feec44ff887639e40ff38c2e572e9d6ade | |
| parent | b9f1922d7e7d67e8559664b266b2a6b35121d6af (diff) | |
| download | glibc-aj/revert-sunrpc.tar.xz glibc-aj/revert-sunrpc.zip | |
Make sunrpc code usable againaj/revert-sunrpc
This in effect reverts the obsoletion of the sunrpc code.
2012-05-09 Andreas Schwab <schwab@linux-m68k.org>
Andreas Jaeger <aj@suse.de>
* configure.in (obsolete-rpc): Add new option --enable-obsolete-rpc.
* config.h.in (LINK_OBSOLETE_RPC): Add.
* config.make.in (link-obsolete-rpc): Add.
* 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): Do not use with link-obsolete-rpc.
* 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.
58 files changed, 273 insertions, 154 deletions
@@ -1,3 +1,67 @@ +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): Add. + * config.make.in (link-obsolete-rpc): Add. + * 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): Do not use with link-obsolete-rpc. + * 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. + * sunrpc/Makefile (shared-only-routines): Remove, so that libc.a + contains the symbols. + 2012-05-08 Ian Wienand <ianw@vmware.com> [BZ #14080] @@ -56,7 +56,12 @@ Version 2.16 * More generic and 64-bit performance optimizations to math functions. Implemented by Ulrich Drepper. - + +* Resurrect the RPC implementation in libc so that it can be used again for + compilation of new programs. It will be removed once TI-RPC can fully + replace the glibc RPC code. To use it, configure using + --enable-obsolete-rpc. + Version 2.15 * The following bugs are resolved with this release: 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 48790f4da9..3847daf083 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) |
