Re: GDB cvs won't build on AIX 4.1

Elena Zannoni
2002-02-04T17:47:58Z

Andrew Cagney writes:
> > On Feb 4, 2002, Andrew Cagney <ac131313@cygnus.com> wrote:
> >
> >
> >>> Perhaps we should hard-code the link option -bbigtoc for gdb to
> >>> link properly on AIX?
> >
> >
> >> That was the problem. See gdb/294.
> >> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=294
> >
> >
> > Thanks for the pointer. Would it be pointless then to post a patch
> > that detected which version of GCC is in use, and whether the linker
> > it uses accepts -bbigtoc?
>
>
> The oposite! See Peter Schauer's comment - it would solve the problem.
>
> Andrew

Sorry for the late reply, but there is another way to solve that
problem which is to compile gdb passing the -mminimal-toc option to
gcc. This should be uniformly OK independently of the linker used.

There are also these options available, but I haven't tried them.

-mfull-toc
-mno-fp-in-toc
-mno-sum-in-toc

FWIW, using the GNU linker and reverting that patch I get this
error: ../../powerpc-ibm-aix4.3.3.0/bin/ld: invalid BFD target
`bigtoc'collect2: ld returned 1 exit status

Elena