public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dennis Grevenstein <dennis.grevenstein@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Re: building gcc 3.0.4 on mips-dec-osf1: where are CPP definitions set?
Date: Thu, 23 Mar 2023 18:16:17 +0100	[thread overview]
Message-ID: <80EE4930-7763-4CFB-8C8B-1DBDDEB04A12@gmail.com> (raw)
In-Reply-To: <F9AEBC48-DD67-43C7-B54E-90B523BC4675@gmail.com>



> Am 22.03.2023 um 20:19 schrieb Dennis Grevenstein <dennis.grevenstein@gmail.com>:
> 
>> Am 21.03.2023 um 01:04 schrieb Jonathan Wakely <jwakely.gcc@gmail.com>:
>> 
>>> I’ve got an unusual problem. I have on old DECstation (MIPS R3000
>>> based) running the infamous OSF/1. I got gcc-2.7.2.3 compiled and
>>> working and I am now trying to upgrade to 3.0.4.
>>> One problem I found is that gcc-3.0.4 no longer defines
>>> #define __LANGUAGE_C__ 1
>>> and a number of header files depend on it.
>>> It still defines
>>> #define __LANGUAGE_C 1
>>> but of course that is not the same.
>>> gcc-2.7.2.3 still defined it correctly. I assume that this is just an
>>> error in some file, but I can’t find where these defines are set.
>> 
>> I think it's a call to builtin_define in gcc/config/mips/mips.h
> 
> this is correct and I eventually got gcc-3.0.4 compiled.
> However, the resulting gcc doesn’t fully work. It can go through
> stage2 and it can build some apps like GNU sed, but will produce
> binaries that fail with a Signal 11 with some other apps.
> I think I would rather go back to gcc-2.7.2.3.

just a little FYI for any future retro-computing hobbyists:
I have built gcc-2.8.1:

../gcc-2.8.1/configure --enable-languages=c,c++,f77 --disable-nls --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-shared --prefix=/usr/local/gcc281 mips-dec-osf1

It needed a small fix in gcc-2.8.1/config/mips/mips.h, where I had
to add the missing definition of „-D__LANGUAGE_C__“.

It is also important NOT to specify the „--without-gnu-as“,
because it will make gcc produce assembler code that the
MIPS as can’t process.
This gcc apparently works fine. I could build some packages
that work correctly.

regards,
Dennis


      reply	other threads:[~2023-03-23 17:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 23:46 Dennis Grevenstein
2023-03-21  0:04 ` Jonathan Wakely
2023-03-22 19:19   ` Dennis Grevenstein
2023-03-23 17:16     ` Dennis Grevenstein [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80EE4930-7763-4CFB-8C8B-1DBDDEB04A12@gmail.com \
    --to=dennis.grevenstein@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).