Re: building gcc 3.0.4 on mips-dec-osf1: where are CPP definitions set?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> Am 22.03.2023 um 20:19 schrieb Dennis Grevenstein <dennis.grevenstein@xxxxxxxxx>:
> 
>> Am 21.03.2023 um 01:04 schrieb Jonathan Wakely <jwakely.gcc@xxxxxxxxx>:
>> 
>>> 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





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux