This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PATCH: Support MIPS II
- From: "H . J . Lu" <hjl at lucon dot org>
- To: bkoz at nabi dot net
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 8 May 2002 09:14:32 -0700
- Subject: Re: PATCH: Support MIPS II
- References: <20020425142828.A17871@lucon.org> <20020508070854.42549bf6.bkoz@redhat.com>
On Wed, May 08, 2002 at 07:08:54AM -0700, Benjamin Kosnik wrote:
>
> > I have been using this patch for a while.
>
> ... it was rejected the first time, and will be rejected this time too,
> as it's the exact same patch.
>
> Since it's the style a la mode, I'll also post what I posted six months
> ago.
>
> You'll need to work with Eric Christo or whoever the MIPS maintainer is
> to clean up the MIPS configure files. Instead of including one file for
> all MIPS targets, and then inside of atomicity.h switching if atomic ops
> are supported, I'd rather the mips targets that can hack atomic ops
> figure themselves out, so that configure.target has:
>
> + mips-that-can-hack-it*)
> + cpu_include_dir=config/cpu/mips
>
> else, default to generic.
>
> Any clearer the second time around?
Have you even looked at my new patch? It has
#ifndef _BITS_ATOMICITY_H
#ifdef _MIPS_ISA
#include <sgidefs.h>
#if _MIPS_ISA >= _MIPS_ISA_MIPS2
#define _BITS_ATOMICITY_H 1
asm for MIPS 2.
#endif /* _MIPS_ISA >= _MIPS_ISA_MIPS2 */
#endif /* !_MIPS_ISA */
#ifndef _BITS_ATOMICITY_H
#define _BITS_ATOMICITY_H 1
generic version
#endif
#endif
The idea is any mips targets which define _MIPS_ISA in CPP have <sgidefs.h>.
My new patch checks _MIPS_ISA before including <sgidefs.h>. One can add the
asm support to a mips target by adding <sgidefs.h> and defining _MIPS_ISA in
CPP. You can't do it at the gcc configure time since it is a runtime option
for gcc. Now, please tell me why it won't work for all mips targets?
BTW, Richard suggested adding a warning for generic version. But it causes so
many "make check" failures so that I had to remove the warning.
H.J.