This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++-v3 won't build on IRIX 5.2
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: libstdc++-v3 won't build on IRIX 5.2
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 11 Feb 2001 16:40:55 -0200
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <Pine.SOL.3.91.1010206195640.23535A-100000@cse.cygnus.com>
On Feb 7, 2001, Benjamin Kosnik <bkoz@redhat.com> wrote:
>> Should I leave config/irix/bits as-is, or move it to
>> config/irix/irix6.5/bits?
> make
> config/irix/irix6.5
> config/irix/pre-irix6.5
Ok, here's the patch. Tested (an earlier version of this patch,
before moving irix/bits to irix/irix6.5/bits) on IRIX 5.2 (up to the
point in which GCC crashes while building libstdc++-v3, for unrelated
reasons) and 6.3. Unfortunately, I don't have access to IRIX 6.5 to
make sure I haven't broken anything. I have omitted from the patch
the moving and copying of files, having only included the differences.
Ok to install?
Index: libstdc++-v3/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* config/os/irix/bits: Renamed too...
* config/os/irix/irix6.5/bits: this.
* config/os/irix/pre-irix6.5/bits: New, copied from irix6.5/bits.
* config/os/irix/pre-irix6.5/bits/ctype_base.h: Use _U, _L, _N,
_X, _S, _P, _C and _B instead of IRIX-6.5 _IS* macros.
* config/os/irix/pre-irix6.5/bits/ctype_noninline.h
(ctype<char>::ctype): Initialize _M_table with __ctype.
* configure.target: Adjust.
Index: libstdc++-v3/configure.target
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/configure.target,v
retrieving revision 1.14
diff -u -p -r1.14 configure.target
--- libstdc++-v3/configure.target 2001/02/08 19:53:19 1.14
+++ libstdc++-v3/configure.target 2001/02/11 18:36:36
@@ -93,8 +93,12 @@ case "${target_os}" in
linux* | gnu*)
os_include_dir="config/os/gnu-linux"
;;
+ irix[1-6] | irix[1-5].* | irix6.[0-4])
+ # This is known to work on at least IRIX 5.2 and 6.3.
+ os_include_dir="config/os/irix/pre-irix6.5"
+ ;;
irix*)
- os_include_dir="config/os/irix"
+ os_include_dir="config/os/irix/irix6.5"
;;
netbsd*)
os_include_dir="config/os/bsd/netbsd"
Common subdirectories: libstdc++-v3/config/os/irix/irix6.5/bits/CVS and libstdc++-v3/config/os/irix/pre-irix6.5/bits/CVS
diff -u libstdc++-v3/config/os/irix/irix6.5/bits/ctype_base.h libstdc++-v3/config/os/irix/pre-irix6.5/bits/ctype_base.h
--- libstdc++-v3/config/os/irix/irix6.5/bits/ctype_base.h Sun Feb 11 16:25:01 2001
+++ libstdc++-v3/config/os/irix/pre-irix6.5/bits/ctype_base.h Sun Feb 11 16:31:05 2001
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,20 +36,20 @@
struct ctype_base
{
// Non-standard typedefs.
- typedef int* __to_type;
+ typedef unsigned int* __to_type;
// NB: Offsets into ctype<char>::_M_table force a particular size
// on the mask type. Because of this, we don't use an enum.
- typedef unsigned int mask;
- static const mask upper = _ISupper;
- static const mask lower = _ISlower;
- static const mask alpha = _ISalpha;
- static const mask digit = _ISdigit;
- static const mask xdigit = _ISxdigit;
- static const mask space = _ISspace;
- static const mask print = _ISprint;
- static const mask graph = _ISgraph;
- static const mask cntrl = _IScntrl;
- static const mask punct = _ISpunct;
- static const mask alnum = _ISalnum;
+ typedef unsigned char mask;
+ static const mask upper = _U;
+ static const mask lower = _L;
+ static const mask alpha = _U | _L;
+ static const mask digit = _N;
+ static const mask xdigit = _X;
+ static const mask space = _S;
+ static const mask print = _U | _L | _N | _P | _B;
+ static const mask graph = _U | _L | _N | _P;
+ static const mask cntrl = _C;
+ static const mask punct = _P;
+ static const mask alnum = _U | _L | _N;
};
diff -u libstdc++-v3/config/os/irix/irix6.5/bits/ctype_noninline.h libstdc++-v3/config/os/irix/pre-irix6.5/bits/ctype_noninline.h
--- libstdc++-v3/config/os/irix/irix6.5/bits/ctype_noninline.h Sun Feb 11 16:25:01 2001
+++ libstdc++-v3/config/os/irix/pre-irix6.5/bits/ctype_noninline.h Tue Feb 6 23:30:16 2001
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+// Copyright (C) 1997-1999, 2001 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,8 +36,7 @@
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL), _M_ctable(NULL),
- _M_table(!__table ?
- (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
+ _M_table(!__table ? __ctype : __table)
{ }
char
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me