🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50168

gcc-2.5.2 on Mips Magnum (Riscos5)

#50168
From: Timothy Murphy
Date: Wed, 10 Nov 1993 03:03
120 lines
3530 bytes
This is not meant to be a bug report,
but just a brief account of compiling gcc-2.5.2
on a Mips Magnum running Riscos5,
using "configure --target=mips-mips-riscos5bsd"

I met 2 minor problems:

(1) Permissions.
A number of the shell-scripts did not have +x permission.
Also the files cp-parse.[ch] did not have +w permission,
which was required since they were run through sed.

This was probably my fault, or perhaps an artifact
of gzcat | tar xvf - ?

(2) _tolower in collect2
collect2 reported that the function _tolower was not found.
This appears to be an bug in mips ldopen(),
eg the problem arises with the following program,
but goes away if the commented-out lines are included.

================================================

#include <stdio.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
#include <ctype.h>
/*
#undef _tolower
*/

main()
{
	LDFILE *ldptr;

               if ( ldopen("collect.o", ldptr) != NULL )

               {
                    /* check magic number */
                    /* process the file */
               }
} 

/*
int _tolower(int c)
{
	return tolower(c);
}
*/

================================================

I solved the problem by adding a file mytolower.c , as above

================= mytolower.c ==================

#include <ctype.h>
#undef _tolower

int _tolower(int c)
{
	return tolower(c);
}

================================================

The corresponding line in Makefile was changed to

================================================

	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 \
	collect2.o version.o mytolower.o $(LIBS)

================================================

(3) glib++-2.5.1
There seems to be an error in the file libio/iopopen.c

================================================

int
_IO_proc_close(fp)
     _IO_FILE *fp;
{
...
  if (status < 0)
    return status;
{ /* This line added by tim@maths.tcd.ie */
#if defined(SIG_BLOCK) && defined(SIG_SETMASK)
...
#else
#ifdef USE_SIGMASK
...
#else
  typedef void (*void_func)(int);
  void_func intsave = (void_func)signal(SIGINT, SIG_IGN);
...
#endif
} /* This line added by tim@maths.tcd.ie */
}

================================================

It seems that this file was written for compilation with g++,
but is actually compiled with gcc .

I'd be interested to know if others have met the same problems 
in compiling gcc-2.5.2 on Mips.

I should say that gcc-2.5.2 appears to run perfectly.
The include file problems that arose with earlier versions
(eg the conflicting types given to size_t)
seem to have been resolved.

-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Technical Details
Message-ID: <2bplm6$cch@hamilton.maths.tcd.ie>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!spool.mu.edu!bloom-beacon.mit.edu!eru.mt.luth.se!lunic!sunic!mcsun!ieunet!maths.tcd.ie!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,b934bd55fefdd672,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-11-09 19:14:57 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!spool.mu.edu!bloom-beacon.mit.edu!eru.mt.luth.se!lunic!sunic!mcsun!ieunet!maths.tcd.ie!not-for-mail
From: tim@maths.tcd.ie (Timothy Murphy)
Newsgroups: gnu.gcc.help
Subject: gcc-2.5.2 on Mips Magnum (Riscos5)
Summary: Brief story of compilation
Keywords: gcc GNU compiler
Message-ID: <2bplm6$cch@hamilton.maths.tcd.ie>
Date: 10 Nov 93 03:03:34 GMT
Organization: Dept. of Maths, Trinity College, Dublin, Ireland.
Lines: 120
NNTP-Posting-Host: hamilton.maths.tcd.ie