This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.3.2 collect2 on AIX with .so libraries


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]