static int march_fpu_opt = -1;
static int mfpu_opt = -1;
static int mfloat_abi_opt = -1;
+#ifdef OBJ_ELF
static int meabi_flags = EF_ARM_EABI_UNKNOWN;
+#endif
/* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful. */
static int arm_parse_arch PARAMS ((char *));
static int arm_parse_fpu PARAMS ((char *));
static int arm_parse_float_abi PARAMS ((char *));
+#ifdef OBJ_ELF
static int arm_parse_eabi PARAMS ((char *));
+#endif
#if 0 /* Suppressed - for now. */
#if defined OBJ_COFF || defined OBJ_ELF
static void arm_add_note PARAMS ((const char *, const char *, unsigned int));
cpu_variant = mcpu_cpu_opt | mfpu_opt;
-#if defined OBJ_COFF || defined OBJ_ELF
{
- unsigned int flags = meabi_flags;
+ unsigned int flags = 0;
+
+#if defined OBJ_ELF
+ flags = meabi_flags;
switch (meabi_flags)
{
case EF_ARM_EABI_UNKNOWN:
+#endif
+#if defined OBJ_COFF || defined OBJ_ELF
/* Set the flags in the private structure. */
if (uses_apcs_26) flags |= F_APCS26;
if (support_interwork) flags |= F_INTERWORK;
if (pic_code) flags |= F_PIC;
if ((cpu_variant & FPU_ANY) == FPU_NONE
|| (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only. */
- {
- flags |= F_SOFT_FLOAT;
- }
+ flags |= F_SOFT_FLOAT;
+
switch (mfloat_abi_opt)
{
case ARM_FLOAT_ABI_SOFT:
as_bad (_("hard-float conflicts with specified fpu"));
break;
}
- /* Using VFP conventions (even if soft-float). */
- if (cpu_variant & FPU_VFP_EXT_NONE) flags |= F_VFP_FLOAT;
+ /* Using VFP conventions (even if soft-float). */
+ if (cpu_variant & FPU_VFP_EXT_NONE)
+ flags |= F_VFP_FLOAT;
+#endif
#if defined OBJ_ELF
if (cpu_variant & FPU_ARCH_MAVERICK)
flags |= EF_ARM_MAVERICK_FLOAT;
-#endif
break;
case EF_ARM_EABI_VER3:
default:
abort ();
}
-
+#endif
+#if defined OBJ_COFF || defined OBJ_ELF
bfd_set_private_flags (stdoutput, flags);
/* We have run out flags in the COFF header to encode the
bfd_set_section_contents (stdoutput, sec, NULL, 0, 0);
}
}
- }
#endif
+ }
/* Record the CPU type as well. */
switch (cpu_variant & ARM_CPU_MASK)
unsigned int value;
};
+#ifdef OBJ_ELF
/* We only know hot to output GNU and ver 3 (AAELF) formats. */
static struct arm_eabi_option_table arm_eabis[] =
{
{"3", EF_ARM_EABI_VER3},
{NULL, 0}
};
+#endif
struct arm_long_option_table
{
return 0;
}
+#ifdef OBJ_ELF
static int
arm_parse_eabi (str)
char * str;
as_bad (_("unknown EABI `%s'\n"), str);
return 0;
}
+#endif
struct arm_long_option_table arm_long_opts[] =
{
arm_parse_fpu, NULL},
{"mfloat-abi=", N_("<abi>\t assemble for floating point ABI <abi>"),
arm_parse_float_abi, NULL},
+#ifdef OBJ_ELF
{"meabi=", N_("<ver>\t assemble for eabi version <ver>"),
arm_parse_eabi, NULL},
+#endif
{NULL, NULL, 0, NULL}
};