This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 4457
  Allow ports a simple override of "libgcc_s.so.1" in sysdeps/generic/framestate.c Last modified: 2009-11-08 18:55
     Query page      Enter new bug
Bug#: 4457   Hardware:   Reporter: Carlos O'Donell <carlos@systemhalted.org>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: Ulrich Drepper <drepper@redhat.com>   Target Milestone:  
Flags: Requestee:
  backport ()
  examined ()
  testsuite ()
Summary:
Keywords:

Attachment Description Type Created Actions
2007-05-03-framestate.diff [PATCH] Allow override of "libgcc_s.so.1" in framestate.c patch 2007-05-03 06:32 Edit | Diff
0001-Allow-ports-to-define-the-version-of-the-libgcc_s.so.patch Another attempt patch 2009-08-23 18:53 Edit | Diff
0001-Define-libgcc_s.so-version-for-m68k-and-hppa.patch Set libgcc_s' version for m68k and hppa patch 2009-08-23 18:55 Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 4457 depends on: Show dependency tree
Show dependency graph
Bug 4457 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2007-05-03 06:31
The file sysdeps/generic/framestate.c has a hardcoded value of "libgcc.so.1".
Some architectures have bumped the so version on libgcc_s and therefore the
hardcoded value is wrong.

It would be nice if ports could write:
ports/sysdeps/$target/framestate.c:
#define LIBGCC_S_SO "libgcc_so.so.2"
#include-next <framestate.c>

There are other alternatives but this one seemed the simplest and easiest to
maintain.

Patch attached.

------- Additional Comment #1 From Carlos O'Donell 2007-05-03 06:32 -------
Created an attachment (id=1746)
[PATCH] Allow override of "libgcc_s.so.1" in framestate.c

This patch allows the override of "libgcc_s.so.1" in
sysdeps/generic/framestate.c.

Tested without regressions on hppa-linux-gnu.

------- Additional Comment #2 From Jakub Jelinek 2007-05-07 15:40 -------
framestate.c is so short that I wonder if it isn't better just to duplicate
the file in ports.

------- Additional Comment #3 From Ulrich Drepper 2007-05-07 22:12 -------
Not like this.  Provide a patch which determines the correct name, adds it to
the names in the generated gnu/lib-names.h, and then use that name in framestate.c.

------- Additional Comment #4 From Ulrich Drepper 2007-08-22 07:15 -------
No reply in 3+ months.  Closing.

------- Additional Comment #5 From mkuvyrkov@gmail.com 2009-08-23 18:53 -------
Created an attachment (id=4144)
Another attempt

Hello,

The attached patch makes another attempt to fix this issue.

It doesn't implement exactly the solution Ulrich proposed above in that it
doesn't detects the version of libgcc_s.so installed.  Instead, the patch make
GLIBC to rely on shlib-versions files to specify it.

The entry in top-level shlib-versions file specifies the version of libgcc_s to
be '1' (what most architectures have) and shlib-versions in sysdeps directories
can override that.

FWIW, making GLIBC to autodetect the version of libgcc_s installed does not
seem trivial to me.

------- Additional Comment #6 From mkuvyrkov@gmail.com 2009-08-23 18:55 -------
Created an attachment (id=4145)
Set libgcc_s' version for m68k and hppa

This patch sets libgcc_s' version to 2 for m68k and to 4 for hppa.

The combined patch was tested on m68k and powerpc.

------- Additional Comment #7 From mkuvyrkov@gmail.com 2009-08-23 18:56 -------
Would please maintainers kindly consider the patches attached above?

------- Additional Comment #8 From mkuvyrkov@gmail.com 2009-10-26 20:09 -------
Ping.

Would maintainers please kindly consider the patches in the attachment.

------- Additional Comment #9 From Carlos O'Donell 2009-11-08 18:46 -------
This is now fixed on trunk by these patches. 

This fix will be part of 2.11 given that the 2.11 branch happens from trunk.

/

2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>

[BZ #4457]
* sysdeps/generic/libgcc_s.h: New file.
* sysdeps/generic/framestate.c: Include it and use LIBGCC_S_SO.

nptl/

2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>

[BZ #4457]
* sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
LIBGCC_S_SO.
* sysdeps/pthread/unwind-forcedunwind.c: Likewise.


------- Additional Comment #10 From Carlos O'Donell 2009-11-08 18:55 -------
Per the new bugzilla procedure I've opened new issues for m68k and hppa to
provide libgcc_s.h.

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In