Christopher Ferrall wrote:
I have been attempting to compile gpc on AIX. I encounter this error:
ld: 0711-781 ERROR: TOC overflow. TOC size: 67804 Maximum size: 65536 collect2: ld returned 12 exit status
Apparently this problem is known, because gcc/p/Makefile includes:
# f771 and cc1plus overflow the AIX TOC BOOT_LDFLAGS=-Wl,-bbigtoc
and "-bbigtoc" is the ld option that relaxes the TOC limit. I can't find BOOT_LDFLAGS referenced anywhere below its definition. Could this be the problem?
Maybe. How exactly do you install GPC? I'm not too familiar with the details, but AFAIUI, if you do a full `make bootstrap', first a GCC compiler will be built (using BOOT_LDFLAGS, I suppose), and this freshly built GCC will be used to build GPC.
I don't know whether using GCC will avoid the problem or the problem is with the system linker, but the name `BOOT_LDFLAGS' at least seems to suggest so. So if you haven't done `make bootstrap' already, you might want to try that...
Note: `make bootstrap' doesn't seem to be mentioned in the GPC install instructions, but it is in the GCC install instructions. So apparently the GPC install instructions are still not up-to-date (i.e., they apply to Linux, maybe Windoze, but not much more). So, for building on AIX, you better follow the GCC instructions as well...
Frank