public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/112091] New: rs6000: redefinition of 'constexpr long double std::abs(long double)', while building libgm2
@ 2023-10-25 23:31 macro at orcam dot me.uk
  2023-10-25 23:33 ` [Bug modula2/112091] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: macro at orcam dot me.uk @ 2023-10-25 23:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112091

            Bug ID: 112091
           Summary: rs6000: redefinition of 'constexpr long double
                    std::abs(long double)', while building libgm2
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: macro at orcam dot me.uk
  Target Milestone: ---
            Target: powerpc64le-linux-gnu

As from commit 81d5ca0b9b84 ("PR 108143/modula2 LONGREAL and
powerpc64le-linux") target libgm2 fails building in a native
`powerpc64le-linux-gnu' bootstrap with system glibc 2.28:

cc1plus: warning: Using IEEE extended precision 'long double' [-Wpsabi]
In file included from
.../powerpc64le-linux-gnu/libstdc++-v3/include/cstdlib:81,
                 from
.../powerpc64le-linux-gnu/libstdc++-v3/include/stdlib.h:36,
                 from .../libgm2/libm2cor/KeyBoardLEDs.cc:43:
.../powerpc64le-linux-gnu/libstdc++-v3/include/bits/std_abs.h:137:3: error:
redefinition of 'constexpr long double std::abs(long double)'
  137 |   abs(__float128 __x)
      |   ^~~
.../powerpc64le-linux-gnu/libstdc++-v3/include/bits/std_abs.h:79:3: note:
'constexpr long double std::abs(long double)' previously defined here
   79 |   abs(long double __x)
      |   ^~~
make[5]: *** [Makefile:818: KeyBoardLEDs.lo] Error 1

This is apparently because with the `-mabi=ieeelongdouble' compilation
option used in this configuration we assume the redirection of the
`long double' data type to `__float128' and it is only supported by
glibc as from commit 051be01f6b41 ("powerpc64le: Enable support for IEEE
long double") or released version 2.32.

It is not clear to me what the correct solution to this issue would be
for glibc < 2.32, i.e. whether we ought to bail out gracefully such as
by disabling LONGREAL support, or even the frontend entirely, or whether
we could use explicit `__float128' data type rather than `long double'.
I guess in the latter case there might be ABI consequences, so it would
have to be considered carefully.  Input from someone more familiar with
the intricacies of the 64-bit POWER ABI might be desirable.

Relevant glibc mailing list discussion threads:
https://sourceware.org/pipermail/libc-alpha/2020-February/111092.html
https://sourceware.org/pipermail/libc-alpha/2020-March/112248.html
https://sourceware.org/pipermail/libc-alpha/2020-April/112579.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug modula2/112091] rs6000: redefinition of 'constexpr long double std::abs(long double)', while building libgm2
  2023-10-25 23:31 [Bug modula2/112091] New: rs6000: redefinition of 'constexpr long double std::abs(long double)', while building libgm2 macro at orcam dot me.uk
@ 2023-10-25 23:33 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-25 23:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112091

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup.

*** This bug has been marked as a duplicate of bug 111956 ***

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-25 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-25 23:31 [Bug modula2/112091] New: rs6000: redefinition of 'constexpr long double std::abs(long double)', while building libgm2 macro at orcam dot me.uk
2023-10-25 23:33 ` [Bug modula2/112091] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).