This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Fix "make check" in ld for gcc 3.1
- From: "H . J . Lu" <hjl at lucon dot org>
- To: "Martin v. Loewis" <martin at v dot loewis dot de>
- Cc: Jack Howarth <howarth at bromo dot msbb dot uc dot edu>,binutils at sources dot redhat dot com
- Date: Sun, 2 Jun 2002 21:48:42 -0700
- Subject: PATCH: Fix "make check" in ld for gcc 3.1
- References: <200206022240.SAA97175@bromo.msbb.uc.edu> <m3r8jp7zjl.fsf@mira.informatik.hu-berlin.de>
On Mon, Jun 03, 2002 at 06:32:14AM +0200, Martin v. Loewis wrote:
> Jack Howarth <howarth@bromo.msbb.uc.edu> writes:
>
> > Running /home/howarth/debian-binutils/binutils-2.12.90.0.9/build-tree/binutils-2.12.90.0.9/ld/testsuite/ld-srec/srec.exp ...
> > FAIL: S-records with constructors
>
> Pardon my ignorance, but why is this breakage even a problem?
> I.e. what program on GNU/Linux will ever use this srec format?
>
I will check in this patch for gcc 3.1 when -fuse-cxa-atexit is used
as an obvious fix.
H.J.
---
2002-06-02 H.J. Lu <hjl@gnu.org>
* ld-srec/sr3.cc (__dso_handle): Added for gcc 3.1 with
-fuse-cxa-atexit.
(__cxa_atexit): Likewise.
--- ld-srec/sr3.cc.atexit Fri Jan 28 09:10:53 2000
+++ ld-srec/sr3.cc Sun Jun 2 21:39:22 2002
@@ -116,3 +116,12 @@ Foo::~Foo ()
{
foos--;
}
+
+void *__dso_handle;
+
+extern "C"
+int
+__cxa_atexit (void (*func) (void *), void *arg, void *d)
+{
+ return 0;
+}