Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 1998 22:00:47 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        njs3@doc.ic.ac.uk (Niall Smart)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Problems getting GCC 2.8 working on 3.0-971225-SNAP
Message-ID:  <199802152200.PAA03843@usr01.primenet.com>
In-Reply-To: <E0y44BO-000299-00@oak71.doc.ic.ac.uk> from "Niall Smart" at Feb 15, 98 01:32:34 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I've searched the list for answers to this question but came up with
> nothing so here goes:
> 
> I'm trying to get GCC 2.8 working to play with the better support for
> C++ exceptions and templates.  However, exceptions don't work at all,
> has anyone else experienced this?

Configuring GCC 2.8.0 from the  GNU distribution rather than the
port, I have not seen a problem with exceptions.  Are you using
the port?

Make sure that you have installed and are using the new libgcc.a,
not the old one.


> I looked at the EGCS FAQ, and it said that problems with exceptions could
> be caused by using an old assembler, current uses the one from binutils
> 1.92.3 which sounds pretty ancient.  I tried building binutils 2.8.1 with
> no success:

GCC 2.8.0 from the FSF works.  The Cygnus stuff has broken handing
for exceptions.  Specifically, you have to decide at runtime instead
of compile time whether you are going to allow it to be threaded or not.

If you use the recently checked in changes to libc_r *and* you use
GCC 2.8.0 from FSF, then the per thread exception stacks work at
runtime instead of at compiler build time.

If you are using threads, and expecting exceptions to work, then you
*must* use this code combination (our work on the patches was done
for ACAPD, which relies heavily on pthreads, exceptions, and the
standard template library).  You *can* use the new libc_r code with
the released FreeBSD compiler, *but* if you do not use 2.8.0, then
exceptions and pthreads *will NOT work*.

If you are using the STL, do *NOT* use the GNU STL.  Instead use the
STL from http://www.ipmce.su/~fbp/stl/ .  There is a conflict with
libio derived code.

The code here is the SGI STL, as modified by HP, as modified by the
Moscow Center for SPARC Technology.

There are a number of problems you will have to overcome if you
plan on using pthreads; specifically, FreeBSD's pthreads are still
draft 4, and do not allow static initialization of pthreads mutexes.
I have a number of patches to fix this in stl_alloc.h, but since our
use didn't require stl_lock.h, ropeimpl.h, or stl_rope.h, it's not
fixed there (yet).  I hope that FreeBSD's pthreads are standards
compliant before this becomes an issue.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802152200.PAA03843>