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]

Re: GCC from CVS and alpha-dec-osf5.0


On Fri, Dec 15, 2000 at 12:21:45PM -0600, Albert Chin-A-Young wrote:
> On Fri, Dec 15, 2000 at 11:16:12AM -0600, Albert Chin-A-Young wrote:
> > While building the latest CVS on alpha-dec-osf5.0:
> > 
> > cc  -DIN_GCC    -g    -DHAVE_CONFIG_H    -I. -I. -I../../gcc
> > -I../../gcc/. -I../../gcc/config -I../../gcc/../include  \
> > -DTARGET_MACHINE=\"alpha-dec-osf5.0\" -DUSE_COLLECT2 \
> > -c ../../gcc/collect2.c
> > cc: Warning: ../../gcc/collect2.c, line 2685: In this declaration,
> > parameter 2 has a different type than specified in an earlier
> > declaration of this function. (mismatparam)
> > extern int ldtbread PARAMS ((LDFILE *, long, GCC_SYMENT *));
> > -----------^
> > cc: Error: ../../gcc/collect2.c, line 2685: In this declaration, the
> > type of "ldtbread" is not compatible with the type of a previous
> > declaration of "ldtbread" at line number 222 in file
> > /usr/include/ldfcn.h. (notcompat)
> > extern int ldtbread PARAMS ((LDFILE *, long, GCC_SYMENT *));
> > -----------^
> > 
> > From ldtbread(3):
> >   int ldtbread (ldptr, symindex, symbol)
> >   LDFILE *ldptr ;
> >   long symindex ;
> >   pSYMR *symbol ;
> > [Ditto for IRIX 6.2, 6.5, Tru64 UNIX 4.0D]
> > 
> > From /usr/include/dlfcn.h:
> >   extern  int     ldtbread __((LDFILE *, int, pSYMR));
> > 
> > From /usr/include/sym.h:
> >   typedef struct {
> >     coff_long     value;          /* value of symbol */
> >     coff_int      iss;            /* index into String Space of name */
> >     coff_uint     st : 6;         /* symbol type */
> >     coff_uint     sc : 5;         /* storage class - text, data, etc */
> >     coff_uint     reserved : 1;   /* reserved */
> >     coff_uint     index : 20;     /* index into sym/aux table */
> >   } SYMR, *pSYMR;
> > 
> > From gcc/collect2.c:
> >   #   define GCC_SYMENT           SYMR
> >   extern int ldtbread PARAMS ((LDFILE *, long, GCC_SYMENT *));
> > 
> > What is the solution? Should we also have a pGCC_SYMENT defined as
> > pSYMR?
> 
> Oops. The second argument in gcc/collect2.c is long while
> /usr/include/dlfcn.h on Tru64 UNIX 4.0D and 5.0 is int. On IRIX 6.2
> and 6.5, it is long. Ugh!

Just got off the phone with Compaq. They will fix the inconsistency
between their man page and /usr/include/dlfcn.h but they say to go
ahead with int as the second argument to ldtbread. This will conflict
with IRIX and possibly SCO (quick google search of their ldtbread man
page). So, I guess we need an autoconf test for this or we could
remove the custom prototype for ldtbread (dunno if this will break
other systems).

-- 
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]