public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/40133]  New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
@ 2009-05-13 16:54 debian-gcc at lists dot debian dot org
  2009-05-13 17:07 ` [Bug libstdc++/40133] " debian-gcc at lists dot debian dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2009-05-13 16:54 UTC (permalink / raw)
  To: gcc-bugs

Tracking http://gcc.gnu.org/ml/gcc/2009-05/msg00035.html as a bug report.

Paolo checked in a patch in rev 147123 on the gcc-4_4-branch to do link tests
for the atomic builtins, which works ok on hppa, but fails for arm.


-- 
           Summary: exception propagation support not enabled in libstdc++
                    4.4 on {armeabi,hppa}-linux
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
GCC target triplet: arm-linux-gnueabi hppa-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
@ 2009-05-13 17:07 ` debian-gcc at lists dot debian dot org
  2009-05-13 18:42 ` paolo dot carlini at oracle dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2009-05-13 17:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from debian-gcc at lists dot debian dot org  2009-05-13 17:07 -------
the arm failure is PR40134 now.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
  2009-05-13 17:07 ` [Bug libstdc++/40133] " debian-gcc at lists dot debian dot org
  2009-05-13 18:42 ` paolo dot carlini at oracle dot com
@ 2009-05-13 18:42 ` paolo dot carlini at oracle dot com
  2009-05-17 18:42 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-05-13 18:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2009-05-13 18:42 -------
To be clear, due to PR40134, the patch mentioned has been reverted for now.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
  2009-05-13 17:07 ` [Bug libstdc++/40133] " debian-gcc at lists dot debian dot org
@ 2009-05-13 18:42 ` paolo dot carlini at oracle dot com
  2009-05-13 18:42 ` paolo dot carlini at oracle dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-05-13 18:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2009-05-13 18:42 -------
To be clear, due to PR40134, the patch mentioned has been reverted for now.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (2 preceding siblings ...)
  2009-05-13 18:42 ` paolo dot carlini at oracle dot com
@ 2009-05-17 18:42 ` pinskia at gcc dot gnu dot org
  2009-05-22 10:07 ` mikpe at it dot uu dot se
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-17 18:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2009-05-17 18:42 -------
*** Bug 40178 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu dot se


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (3 preceding siblings ...)
  2009-05-17 18:42 ` pinskia at gcc dot gnu dot org
@ 2009-05-22 10:07 ` mikpe at it dot uu dot se
  2009-05-22 10:22 ` joseph at codesourcery dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mikpe at it dot uu dot se @ 2009-05-22 10:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mikpe at it dot uu dot se  2009-05-22 10:07 -------
Created an attachment (id=17900)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17900&action=view)
put ARM EABI atomic builtins in both shared and static libgcc

I reviewed the original ARM EABI atomic builtins code submission, and there was
no indication that making this code static-libgcc only was anything but an
accident. The attached patch makes the code available in both the shared and
static libgcc. With this patch and r147123 reapplied to my gcc-4.4 tree the
libstdc++ build now finds the atomic builtins as it should:

checking for atomic builtins for bool... yes
checking for atomic builtins for short... yes
checking for atomic builtins for int... yes
checking for atomic builtins for long long... no


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (4 preceding siblings ...)
  2009-05-22 10:07 ` mikpe at it dot uu dot se
@ 2009-05-22 10:22 ` joseph at codesourcery dot com
  2009-05-22 11:16 ` mikpe at it dot uu dot se
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: joseph at codesourcery dot com @ 2009-05-22 10:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from joseph at codesourcery dot com  2009-05-22 10:22 -------
Subject: Re:  exception propagation support not enabled
 in libstdc++ 4.4 on {armeabi,hppa}-linux

On Fri, 22 May 2009, mikpe at it dot uu dot se wrote:

> Created an attachment (id=17900)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17900&action=view)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17900&action=view)
> put ARM EABI atomic builtins in both shared and static libgcc
> 
> I reviewed the original ARM EABI atomic builtins code submission, and there was
> no indication that making this code static-libgcc only was anything but an
> accident. The attached patch makes the code available in both the shared and
> static libgcc. With this patch and r147123 reapplied to my gcc-4.4 tree the
> libstdc++ build now finds the atomic builtins as it should:

This patch is obviously wrong - if you put things in shared libgcc you 
also need to assign symbol versions to them based on the version in which 
they were actually added.  I'm pretty sure making them static-only was 
deliberate (following SH which defines all the functions as hidden, which 
has the same effect as making them static-only, for example); the overhead 
of PLT calls is going to be significant for such small functions.

Since the patch doesn't stop the functions being hidden in linux-atomic.c, 
I doubt it actually works (the question is not configure finding them, but 
whether C++ shared libraries that use them link OK with -shared-libgcc).  
The only use of having these functions in shared libgcc while still hidden 
is if other functions in libgcc use them.

Now, I see that SH has libgcc/config/sh/t-linux which makes libgcc_s.so a 
linker script rather than a symlink.  It's possible this could help for 
ARM, but on the whole I think it would be better for -shared-libgcc to use 
the static libgcc as needed after the shared one.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (5 preceding siblings ...)
  2009-05-22 10:22 ` joseph at codesourcery dot com
@ 2009-05-22 11:16 ` mikpe at it dot uu dot se
  2009-05-22 13:36 ` ramana at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mikpe at it dot uu dot se @ 2009-05-22 11:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mikpe at it dot uu dot se  2009-05-22 11:16 -------
(In reply to comment #6)
> This patch is obviously wrong - if you put things in shared libgcc you 
> also need to assign symbol versions to them based on the version in which 
> they were actually added.

Yeah, I realized that shortly after posting the patch. My bad.

>  I'm pretty sure making them static-only was 
> deliberate (following SH which defines all the functions as hidden, which 
> has the same effect as making them static-only, for example); the overhead 
> of PLT calls is going to be significant for such small functions.

Perhaps that was the motivation, but it's being applied very inconsistently.
The ARM EABI backend puts lots of tiny functions, smaller than the __sync__
ones, in both the shared and static libgcc.

> ..., but on the whole I think it would be better for -shared-libgcc to use 
> the static libgcc as needed after the shared one.

Like a tweak to LINK_SPEC? I'll see if I can cook something up.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (6 preceding siblings ...)
  2009-05-22 11:16 ` mikpe at it dot uu dot se
@ 2009-05-22 13:36 ` ramana at gcc dot gnu dot org
  2009-05-22 19:19 ` mikpe at it dot uu dot se
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-05-22 13:36 UTC (permalink / raw)
  To: gcc-bugs



-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-05-22 13:36:43
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (7 preceding siblings ...)
  2009-05-22 13:36 ` ramana at gcc dot gnu dot org
@ 2009-05-22 19:19 ` mikpe at it dot uu dot se
  2009-05-22 20:30 ` paolo dot carlini at oracle dot com
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mikpe at it dot uu dot se @ 2009-05-22 19:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from mikpe at it dot uu dot se  2009-05-22 19:18 -------
Created an attachment (id=17902)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17902&action=view)
always pass -lgcc to linker

The link error reported by Matthias Klose is caused by the following:
1. g++ links shared libraries with -shared-libgcc, which apparently is
important      whenever exceptions are possible.
2. -shared-libgcc by definition excludes the static libgcc from the link
command.
3. Since the __sync__ procedures are only present in the static libgcc, it
follows that they cannot be used by -shared-libgcc objects like libstdc++.so.

One way around this is to redefine -shared-libgcc to actually link against the
static libgcc, contrary to its intention. Both mingw32 and cygwin do this, so
it's not unheard of. The attached patch updates ARM EABI to do just that.
Passes a bootstrap and light testing here.

However, I would strongly prefer to just move the __sync__ procedures to the
shared libgcc (with symbol versions of course).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (8 preceding siblings ...)
  2009-05-22 19:19 ` mikpe at it dot uu dot se
@ 2009-05-22 20:30 ` paolo dot carlini at oracle dot com
  2009-12-13 23:45 ` doko at gcc dot gnu dot org
  2009-12-14  0:20 ` debian-gcc at lists dot debian dot org
  11 siblings, 0 replies; 13+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-05-22 20:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from paolo dot carlini at oracle dot com  2009-05-22 20:30 -------
Two general comments: 1- Patches should be in any case posted to the
gcc-patches mailing list; 2- I got previous feedbacks from Joseph as meaning
that the issue is general, not restricted to the arm config; 3- Being a
compiler issue I'm not even sure it should be discussed here - this PR is about
the C++ library - probably PR40134 is the proper place.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (9 preceding siblings ...)
  2009-05-22 20:30 ` paolo dot carlini at oracle dot com
@ 2009-12-13 23:45 ` doko at gcc dot gnu dot org
  2009-12-14  0:20 ` debian-gcc at lists dot debian dot org
  11 siblings, 0 replies; 13+ messages in thread
From: doko at gcc dot gnu dot org @ 2009-12-13 23:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from doko at gcc dot gnu dot org  2009-12-13 23:45 -------
Subject: Bug 40133

Author: doko
Date: Sun Dec 13 23:45:12 2009
New Revision: 155200

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155200
Log:
2009-12-11  Paolo Carlini  <paolo.carlini@oracle.com>
            Matthias Klose  <doko@ubuntu.com>

        PR libstdc++/40133
        * acinclude.m4 ([GLIBCXX_ENABLE_ATOMIC_BUILTINS]): On *-*-linux*,
        *-*-uclinux*, *-*-kfreebsd*-gnu | *-*-gnu* targets do link tests when
        possible.
        * configure: Regenerate.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/acinclude.m4
    trunk/libstdc++-v3/configure


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

* [Bug libstdc++/40133] exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux
  2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
                   ` (10 preceding siblings ...)
  2009-12-13 23:45 ` doko at gcc dot gnu dot org
@ 2009-12-14  0:20 ` debian-gcc at lists dot debian dot org
  11 siblings, 0 replies; 13+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2009-12-14  0:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from debian-gcc at lists dot debian dot org  2009-12-14 00:19 -------
fixed on the trunk


-- 

debian-gcc at lists dot debian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40133


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

end of thread, other threads:[~2009-12-14  0:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-13 16:54 [Bug libstdc++/40133] New: exception propagation support not enabled in libstdc++ 4.4 on {armeabi,hppa}-linux debian-gcc at lists dot debian dot org
2009-05-13 17:07 ` [Bug libstdc++/40133] " debian-gcc at lists dot debian dot org
2009-05-13 18:42 ` paolo dot carlini at oracle dot com
2009-05-13 18:42 ` paolo dot carlini at oracle dot com
2009-05-17 18:42 ` pinskia at gcc dot gnu dot org
2009-05-22 10:07 ` mikpe at it dot uu dot se
2009-05-22 10:22 ` joseph at codesourcery dot com
2009-05-22 11:16 ` mikpe at it dot uu dot se
2009-05-22 13:36 ` ramana at gcc dot gnu dot org
2009-05-22 19:19 ` mikpe at it dot uu dot se
2009-05-22 20:30 ` paolo dot carlini at oracle dot com
2009-12-13 23:45 ` doko at gcc dot gnu dot org
2009-12-14  0:20 ` debian-gcc at lists dot debian dot 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).