This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 3.3.2 collect2 on AIX with .so libraries
- From: Albert Chin <gcc at mlists dot thewrittenword dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 28 Nov 2004 12:57:58 -0600
- Subject: Re: 3.3.2 collect2 on AIX with .so libraries
- References: <20041025140809.GA16753@mail1.thewrittenword.com> <200410251419.i9PEJtD25252@makai.watson.ibm.com> <20041025144202.GB16753@mail1.thewrittenword.com> <200410251445.i9PEjvD33002@makai.watson.ibm.com>
- Reply-to: gcc at gcc dot gnu dot org
On Mon, Oct 25, 2004 at 10:45:56AM -0400, David Edelsohn wrote:
> >>>>> Albert Chin writes:
>
> Albert> On Mon, Oct 25, 2004 at 10:19:55AM -0400, David Edelsohn wrote:
> >> GCC collect2 searches for library file extension ".a" first, then
> >> looks for library file extension ".so".
>
> Albert> How do I get it to prefer ".so"?
>
> Change collect2.c libext array.
>
> One could change it for all situations or depend on -brtl.
I have a working patch for GCC 3.3.x but need a little help for 3.4.x.
gcc/collect2.c for 3.4.x has:
/* Parse command line early for instances of -debug. This allows
the debug flag to be set before functions like find_a_file()
are called. */
{
int i;
for (i = 1; argv[i] != NULL; i ++)
{
if (! strcmp (argv[i], "-debug"))
debug = 1;
COLLECT_PARSE_FLAG (argv[i]);
}
vflag = debug;
}
So, I need to hook into COLLECT_PARSE_FLAG to change libexts for
-brtl. Do I define COLLECT_PARSE_FLAG() in gcc/config/rs6000/aix.h or
do I need a separate copy for gcc/config/rs6000/aix[43|51|52].h?
Looking at config.gcc, any change I make to rs6000/aix.h affects
powerpc-*-beos*, rs6000-ibm-aix*, and powerpc-ibm-aix*. I'm unsure if
my impending change to COLLECT_PARSE_FLAG will bork powerpc-*-beos* as
its linker might not honor -brtl. Although, if this target doesn't
honor -brtl, I suppose it'll never be used so I might be safe after
all.
--
albert chin (china@thewrittenword.com)