From 8eb1716c9108c987004e886e37d33296032d8663 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Fri, 28 Feb 2014 16:51:12 -0800 Subject: [PATCH] Disable static linking warning for dlopen and dlmopen, and disable linking warning for sys_errlist and sys_nerr. --- dlfcn/dlmopen.c | 2 ++ dlfcn/dlopen.c | 2 ++ sysdeps/gnu/errlist-compat.awk | 7 ++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlfcn/dlmopen.c b/dlfcn/dlmopen.c index 87ba290464b..2be13195fe4 100644 --- a/dlfcn/dlmopen.c +++ b/dlfcn/dlmopen.c @@ -30,7 +30,9 @@ dlmopen (Lmid_t nsid, const char *file, int mode) { return __dlmopen (nsid, file, mode, RETURN_ADDRESS (0)); } +#if 0 // Google-local static_link_warning (dlmopen) +#endif #else diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c index 95bc62b6b5a..c62ca2305a1 100644 --- a/dlfcn/dlopen.c +++ b/dlfcn/dlopen.c @@ -29,7 +29,9 @@ dlopen (const char *file, int mode) { return __dlopen (file, mode, RETURN_ADDRESS (0)); } +#if 0 // Google-local static_link_warning (dlopen) +#endif #else diff --git a/sysdeps/gnu/errlist-compat.awk b/sysdeps/gnu/errlist-compat.awk index ba1257ffaba..a33ee503daa 100644 --- a/sysdeps/gnu/errlist-compat.awk +++ b/sysdeps/gnu/errlist-compat.awk @@ -126,8 +126,13 @@ versioned_symbol (libc, __sys_nerr_internal, _sys_nerr, %s);\n", \ lastv, lastv, lastv, lastv; print "\n\ +/* Google-local:\n\ + Disable deprecation warnings; they're emitted even if referenced\n\ + only by debug info. */\n\ +#if 0\n\ link_warning (sys_errlist, \"\ `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead\")\n\ link_warning (sys_nerr, \"\ -`sys_nerr' is deprecated; use `strerror' or `strerror_r' instead\")"; +`sys_nerr' is deprecated; use `strerror' or `strerror_r' instead\")\n\ +#endif"; } -- 2.47.2