Bug 22229 - [sparc32] missing copysignl, fabsl, fmal compat symbols
Summary: [sparc32] missing copysignl, fabsl, fmal compat symbols
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.26
: P2 normal
Target Milestone: 2.27
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-29 17:45 UTC by Joseph Myers
Modified: 2017-11-29 23:10 UTC (History)
0 users

See Also:
Host: sparc*-*-linux*
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Myers 2017-09-29 17:45:54 UTC
32-bit SPARC libm should have compat symbols for copysignl (GLIBC_2.0), fabsl (GLIBC_2.0), fmal (GLIBC_2.1), pointing to the double functions; they were present in glibc 2.8, for example, but are now missing, probably when optimized SPARC function implementations were added without appropriate compat symbol handling.
Comment 1 cvs-commit@gcc.gnu.org 2017-10-04 16:47:00 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  32d372d548122b224ec63a520a780d9227094a48 (commit)
      from  72d13ed1bdb3154adce67a74b7d6ec240a6b12a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=32d372d548122b224ec63a520a780d9227094a48

commit 32d372d548122b224ec63a520a780d9227094a48
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Oct 4 16:46:05 2017 +0000

    Restore sparc32 copysignl, fabsl, fmal compat symbols (bug 22229).
    
    32-bit SPARC libm should have compat symbols for copysignl
    (GLIBC_2.0), fabsl (GLIBC_2.0), fmal (GLIBC_2.1), pointing to the
    double functions; they were present in glibc 2.8, for example, but are
    now missing, probably when optimized SPARC function implementations
    were added without appropriate compat symbol handling.  The same
    applies to copysignl in libc.  This patch restores those compat
    symbols.
    
    Tested with build-many-glibcs.py for sparcv9-linux-gnu.
    
    	[BZ #22229]
    	* sysdeps/sparc/sparc32/fpu/s_copysign.S: Include
    	<math_ldbl_opt.h>
    	(copysignl): Define as compat symbol at version GLIBC_2_0 for libm
    	and libc.
    	* sysdeps/sparc/sparc32/fpu/s_fabs.S: Include <math_ldbl_opt.h>.
    	(fabsl): Define as compat symbol at version GLIBC_2_0 for libm.
    	* sysdeps/sparc/sparc32/fpu/s_fma.c: Include <math_ldbl_opt.h>.
    	(fmal): Define as compat symbol at version GLIBC_2_1 for libm.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S:
    	Include <math_ldbl_opt.h>
    	(copysignl): Define as compat symbol at version GLIBC_2_0 for libm
    	and libc.
    	(compat_symbol): Undefine and redefine.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: Include
    	<math_ldbl_opt.h>
    	(fabsl): Define as compat symbol at version GLIBC_2_0 for libm.
    	(compat_symbol): Undefine and redefine.
    	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c
    	[HAVE_AS_VIS3_SUPPORT]: Include <math_ldbl_opt.h>.
    	[HAVE_AS_VIS3_SUPPORT] (fmal): Define as compat symbol at version
    	GLIBC_2_1 for libm.
    	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Add
    	GLIBC_2.0 copysignl symbol.
    	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Add
    	GLIBC_2.0 copysignl and fabsl and GLIBC_2.1 fmal symbols.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   27 ++++++++++++++++++++
 sysdeps/sparc/sparc32/fpu/s_copysign.S             |    9 ++++++-
 sysdeps/sparc/sparc32/fpu/s_fabs.S                 |    4 +++
 sysdeps/sparc/sparc32/fpu/s_fma.c                  |    4 +++
 .../sparc32/sparcv9/fpu/multiarch/s_copysign.S     |    9 ++++++
 .../sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S   |    6 ++++
 .../sparc/sparc32/sparcv9/fpu/multiarch/s_fma.c    |    4 +++
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist |    1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist |    3 ++
 9 files changed, 66 insertions(+), 1 deletions(-)
Comment 2 Joseph Myers 2017-10-04 16:47:34 UTC
Fixed for 2.27.
Comment 3 cvs-commit@gcc.gnu.org 2017-11-29 23:10:06 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  cf4ebc27fe3a66637c5fc8824d9591191786b5fd (commit)
      from  0c0973788367b4ac42aace075a0598bc1c79b7dd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cf4ebc27fe3a66637c5fc8824d9591191786b5fd

commit cf4ebc27fe3a66637c5fc8824d9591191786b5fd
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Nov 29 23:09:03 2017 +0000

    Fix missing sparcv9 --disable-multi-arch fabsl compat symbol (bug 22229).
    
    The --disable-multi-arch case of sparcv9 libm is missing a fabsl
    compat symbol for when long double had the same ABI as double.  This
    patch adds the missing compat symbol to this implementation.  As my
    fix for other instances of this missing compat symbol postdates the
    last release, I'm considering this as being part of bug 22229 that was
    missing from my previous fix rather than as a separate issue, and so
    as not needing a new bug report in Bugzilla.
    
    Tested (compilation only) with build-many-glibcs.py for
    sparcv9-linux-gnu --disable-multi-arch.
    
    	[BZ #22229]
    	* sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S: Include
    	<math_ldbl_opt.h>.
    	(fabsl): Define as compat symbol at version GLIBC_2_0 for libm.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                  |    5 +++++
 sysdeps/sparc/sparc32/sparcv9/fpu/s_fabs.S |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)