0

I need to build GCC 3.1.1 and BINUTILS 2.13.1 because they support FreeBSD 1 executable format. Unfortunately, while building an old version of BINUTILS with the current version of GCC (10.2.0) I get a lot of errors. What flags do I need to pass to GCC to successfully build this old version?

EDIT:

The command I ran: Just configure and make.

Error log: https://pastebin.com/tDRCF9yG

In file included from ../../gcc/gcc/read-rtl.c:25:
../../gcc/gcc/read-rtl.c: In function ‘read_rtx’:
../../gcc/gcc/../include/obstack.h:426:30: error: lvalue required as increment operand
  426 |    *((void **)__o->next_free)++ = ((void *)datum);   \
      |                              ^~
yomol777
  • 463
  • 4
  • 16
  • Do you need to build GCC in version 3.1.1? If so, download the matching source code and compile it. https://github.com/gcc-mirror/gcc/tree/releases/gcc-3.1 – SpiderPig1297 Sep 30 '20 at 12:58
  • @SpiderPig1297 But it doesn't compile! For example I get this error: ../../gcc-3.1.1/gcc/../include/obstack.h:426:30: error: lvalue required as increment operand – yomol777 Sep 30 '20 at 13:04
  • Can you paste the entire output (w/ the command you run) in the original question? – SpiderPig1297 Sep 30 '20 at 13:43
  • @SpiderPig1297 Done. – yomol777 Sep 30 '20 at 16:37
  • See [link](https://www.linuxquestions.org/questions/linux-software-2/error-in-compiling-gcc-3-3-3-with-gcc-4-3-2-a-693559/) and [link](https://askubuntu.com/questions/421938/installing-gcc-3-2-how-to-resolve-error-lvalue-required-as-increment-operand). It seems like both encountered in a similiar problem. Maybe try to build a slightly different version (let's say 3.2 or 3.3) and see if it works? – SpiderPig1297 Oct 01 '20 at 05:28

0 Answers0