From patchwork Tue Dec 26 22:44:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 25106 Received: (qmail 11220 invoked by alias); 26 Dec 2017 22:44:09 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 10610 invoked by uid 89); 26 Dec 2017 22:44:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:2506 X-HELO: mailbackend.panix.com X-Gm-Message-State: AKGB3mKgaorv7yX/YIi+cOmUWzW6KUa2Ajx+j+gCHJGua9KhldG9dxDZ CkMQURpy+FLcvmF+TyIOpgK0q2IZQE4DrH5kvWY= X-Google-Smtp-Source: ACJfBovjWyh3YAXGm4A5qdbzOMbW8tKCiO254MSPYUDKE6eno0VwXIC2HiY1uqedfAuYDfYF0CAiVbp1rbh0PrMydHU= X-Received: by 10.157.47.196 with SMTP id b4mr17684182otd.225.1514328244898; Tue, 26 Dec 2017 14:44:04 -0800 (PST) MIME-Version: 1.0 From: Zack Weinberg Date: Tue, 26 Dec 2017 14:44:04 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: ldbl_hidden_weak?? To: GNU C Library For the not-installing-libio patches I have determined that I need to add a macro ldbl_hidden_weak, but I can't figure out how to do that. This is as far as I've gotten: The problem is what to put where it says /* ??? */. It can't be libc_hidden_weak (name), that gives me iovsprintf.c:50:93: error: ‘__EI_vsprintf’ aliased to undefined symbol ‘__GI_vsprintf’ ldbl_hidden_weak (__IO_vsprintf, vsprintf) but the logic in both math_ldbl_opt.h and libc-symbols.h is so convoluted and undocumented that I can't figure out what it _should_ be. zw diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c index 63290fb365..871d8db072 100644 --- a/libio/iovsprintf.c +++ b/libio/iovsprintf.c @@ -47,4 +47,4 @@ ldbl_hidden_def (__IO_vsprintf, _IO_vsprintf) ldbl_strong_alias (__IO_vsprintf, _IO_vsprintf) ldbl_weak_alias (__IO_vsprintf, vsprintf) -libc_hidden_weak (vsprintf) +ldbl_hidden_weak (__IO_vsprintf, vsprintf) diff --git a/sysdeps/generic/math_ldbl_opt.h b/sysdeps/generic/math_ldbl_opt.h index 8a5d8ba107..a4b3806a10 100644 --- a/sysdeps/generic/math_ldbl_opt.h +++ b/sysdeps/generic/math_ldbl_opt.h @@ -9,6 +9,7 @@ #define LONG_DOUBLE_COMPAT(lib, introduced) 0 #define long_double_symbol(lib, local, symbol) #define ldbl_hidden_def(local, name) libc_hidden_def (name) +#define ldbl_hidden_weak(local, name) libc_hidden_weak (name) #define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname) #define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname) #define __ldbl_is_dbl 0 diff --git a/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h b/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h index af861c11ea..88bf5e49a9 100644 --- a/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h +++ b/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h @@ -12,6 +12,7 @@ long_double_symbol_1 (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION) #ifdef SHARED # define ldbl_hidden_def(local, name) libc_hidden_ver (local, name) +# define ldbl_hidden_weak(local, name) /* ??? */ # define ldbl_strong_alias(name, aliasname) \ strong_alias (name, __GL_##name##_##aliasname) \ long_double_symbol (libc, __GL_##name##_##aliasname, aliasname); @@ -22,6 +23,7 @@ versioned_symbol (lib, local, symbol, version) #else # define ldbl_hidden_def(local, name) libc_hidden_def (name) +# define ldbl_hidden_weak(local, name) libc_hidden_weak (name) # define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname) # define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname) # ifndef __ASSEMBLER__