This is the mail archive of the
mailing list for the newlib project.
Path to fix MIPS build problem
- From: "Steve Ellcey " <sellcey at imgtec dot com>
- To: <newlib at sourceware dot org>
- Date: Wed, 17 Apr 2013 13:34:16 -0700
- Subject: Path to fix MIPS build problem
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
2013-04-17 Steve Ellcey <email@example.com>
* mips/cfe_api.h (int64_t): Remove define.
(uint64_t): Remove define.
diff --git a/libgloss/mips/cfe_api.h b/libgloss/mips/cfe_api.h
index afe4683..520fec9 100644
@@ -51,7 +51,7 @@
* Apply customizations here for different OSes. These need to:
- * * typedef uint64_t, int64_t, intptr_t, uintptr_t.
+ * * typedef intptr_t, uintptr_t.
* * define cfe_strlen() if use of an existing function is desired.
* * define CFE_API_IMPL_NAMESPACE if API functions are to use
* names in the implementation namespace.
@@ -59,9 +59,6 @@
* CFE_API_* can be defined here as desired.
/* Begin customization. */
-#include <sys/types.h> /* for __uint64_t and __int64_t. */
-#define int64_t __int64_t
-#define uint64_t __int64_t
#include <_ansi.h> /* for _POINTER_INT. */
typedef _POINTER_INT intptr_t;
typedef unsigned _POINTER_INT uintptr_t;