Path to fix MIPS build problem

Corinna Vinschen
Thu Apr 18 07:24:00 GMT 2013

On Apr 17 13:34, Steve Ellcey  wrote:
> A recent change to newlib broke the MIPS build.
> The change added some includes (sys/features.h, stddef.h, and stdint.h)
> to newlib/libc/include/sys/cdefs.h and this introduced the defines of
> int64_t and uint64_t into libgloss/mips/cfe_api.c which was already
> getting them from libgloss/mips/cfe_api.h.
> The redefine of int64_t just resulted in a warning because the two defines
> matched each other but for some reason the mips.h version of cfe_api.h defined
> uint64_t as '__int64_t' and not '__uint64_t' and that conflicted with the
> define from cdefs.h and gave an error.
> I have tested this change where I remove the definitions of int64_t and
> uint64_t from the MIPS cfe_api.h file and just let them get defined via
> the standard cdef.h file.  I built newlib and GCC for MIPS and ran the
> GCC testsuite with this newlib and did not get any regressions.  Is it OK
> for checkin?

In theory, yes.  I'm just a bit puzzled.  intptr_t and uintptr_t are
defined in stdint.h, too.  Wouldn't it make sense to remove their
definitions now in cfe_api.h as well?


Corinna Vinschen
Cygwin Maintainer
Red Hat

More information about the Newlib mailing list