Re: gcc include strangeness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 11, 2002 at 02:53:02PM +0100, Florian Lohoff wrote:
> On Mon, Feb 11, 2002 at 01:51:47PM +0100, Maciej W. Rozycki wrote:
> > On Sat, 9 Feb 2002, Florian Lohoff wrote:
> > 
> > > i just stumbled when i tried to compile a program (bootloader) with
> > > gcc which uses varargs. I got the error that "sgidefs.h" was missing.
> > > sgidefs.h is contained in the glibc which gets included by va-mips.h
> > > from stdarg.h - I dont think this is correct as i should be able
> > > to compile programs without glibc.

The glibc-2.2.5/FAQ says:
  1.20.   Which tools should I use for MIPS?

  {AJ} You should use the current development version of gcc 3.0 or newer from
  CVS.  gcc 2.95.x does not work correctly on mips-linux.

I'm not shure if this only applies to glibc, but the
gcc-2.95.x I tried to build could not even compile a kernel
because of:
  #ifndef __linux__
  #error Use a Linux compiler or give up.
  #endif
in linux/include/asm-mips/sgidefs.h. The gcc-3.0.3 I now use
has a totally different set of predefines than gcc-2.95.x, and
it seems to work.


> >  Hmm, in 2.95.3 in va-mips.h I see: 
> > 
> > /* Get definitions for _MIPS_SIM_ABI64 etc.  */
> > #ifdef _MIPS_SIM
> > #include <sgidefs.h>
> > #endif
> > 
> > so you shouldn't need sgidefs.h normally.  Or did something get broken for
> > 3.x?

sgidefs.h comes from the kernel includes.

gcc-3.x does not use va-mips.h or sgidefs,h, but simply
has the following in stdarg.h:
  #define va_start(v,l)   __builtin_stdarg_start((v),l)
  #define va_end          __builtin_va_end
  #define va_arg          __builtin_va_arg
etc.


Regards,
Johannes


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux