This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][ARM] Fix/revert fallout from machine_mode change
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Richard dot Sandiford at arm dot com
- Date: Wed, 29 Oct 2014 16:31:23 +0000
- Subject: [PATCH][ARM] Fix/revert fallout from machine_mode change
- Authentication-results: sourceware.org; auth=none
Hi all,
This fixes an arm build failure due to removing the 'enum' keyword from
machine_mode.
Since libgcc2 is compiled with C rather than C++ we need it there for
the definition of CUMULATIVE_ARGS.
Another place where machine_mode is used is machine_function which is
not needed for libgcc2 so it is gated on !defined(USED_FOR_TARGET)
This allows me to build arm-none-eabi.
Ok for trunk?
2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.h (MACHMODE): Add 'enum' to machine_mode.
(struct machine_function): Gate definition on
!defined(USED_FOR_TARGET).
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 02d0a93..fef7e41 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -36,7 +36,7 @@
#define MACHMODE int
#else
#include "insn-modes.h"
-#define MACHMODE machine_mode
+#define MACHMODE enum machine_mode
#endif
#include "config/vxworks-dummy.h"
@@ -1510,7 +1510,7 @@ typedef struct GTY(()) arm_stack_offsets
}
arm_stack_offsets;
-#ifndef GENERATOR_FILE
+#if !defined(GENERATOR_FILE) && !defined(USED_FOR_TARGET)
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
typedef struct GTY(()) machine_function