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?
Thanks --Chris Ferrall
P.S: Thank you, thank you, thank you for continuing to develop GNU Pascal. I had dreaded the thought of quitting Pascal because the demise of AIX Pascal was starting limit my work. It appears GPC might allow me to carry on - if I could get it installed.
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
On Sat, 3 Mar 2001, Frank Heckenbach wrote:
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
On Tue, 16 Jan 2001 Paul Tedaldi wrote:
installation of gpc-20010111 on AIX 4.3.3 had the following problems: - while linking gpc1 the TOC overflows: ld: d: 0711-781 ERROR: TOC overflow. TOC size: 67732 Maximum size: 65536 The problem can be circumvented by adding the "-Wl,'-bbigtoc'" flag to LDFLAG (assuming gcc is used to call ld, for xlc it's just "-bbigtoc") [..]
Note: `make bootstrap' doesn't seem to be mentioned in the GPC install instructions, ...
A while back it WAS in the FAQ: actually make bootstrap-lean because of this from GCC's BUILD file:
"If you are short on disk space you might consider `make bootstrap-lean' instead. This is identical to `make bootstrap' except that object files from the stage1 and stage2 of the 3-stage bootstrap of the compiler are deleted as soon as they are no longer needed."
Russ