make use of meabi_flags be ELF specific
authorNick Clifton <nickc@redhat.com>
Tue, 30 Mar 2004 08:53:05 +0000 (08:53 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 30 Mar 2004 08:53:05 +0000 (08:53 +0000)
gas/ChangeLog
gas/config/tc-arm.c

index a015f031eabd109b58ef14dd33f4a5ade62155e4..e4b55322c1e34b160004113375e06fa72fa7f1cc 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-30  Nick Clifton  <nickc@redhat.com>
+
+       * config/tc-arm.c (meabi_flags): Make its use conditional upon
+       OBJ_ELF being defined.
+
 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
 
        * config/obj-aout.c (obj_aout_type): Remove #ifdef BFD_ASSEMBLER code.
index bcf57692d13b96c2ab03954f4e923a54be3b380c..a7ebc51ccd2b0cff4208c7818a7610e3dc0ed616 100644 (file)
@@ -191,7 +191,9 @@ static int march_cpu_opt = -1;
 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.  */
@@ -2552,7 +2554,9 @@ static int arm_parse_cpu PARAMS ((char *));
 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));
@@ -11687,13 +11691,17 @@ md_begin ()
 
   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;
@@ -11701,9 +11709,8 @@ md_begin ()
        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:
@@ -11716,13 +11723,14 @@ md_begin ()
              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:
@@ -11732,7 +11740,8 @@ md_begin ()
       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
@@ -11752,8 +11761,8 @@ md_begin ()
            bfd_set_section_contents (stdoutput, sec, NULL, 0, 0);
          }
       }
-  }
 #endif
+  }
 
   /* Record the CPU type as well.  */
   switch (cpu_variant & ARM_CPU_MASK)
@@ -13470,6 +13479,7 @@ struct arm_eabi_option_table
   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[] =
 {
@@ -13477,6 +13487,7 @@ static struct arm_eabi_option_table arm_eabis[] =
   {"3",                EF_ARM_EABI_VER3},
   {NULL, 0}
 };
+#endif
 
 struct arm_long_option_table
 {
@@ -13641,6 +13652,7 @@ arm_parse_float_abi (str)
   return 0;
 }
 
+#ifdef OBJ_ELF
 static int
 arm_parse_eabi (str)
      char * str;
@@ -13656,6 +13668,7 @@ arm_parse_eabi (str)
   as_bad (_("unknown EABI `%s'\n"), str);
   return 0;
 }
+#endif
 
 struct arm_long_option_table arm_long_opts[] =
 {
@@ -13667,8 +13680,10 @@ 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}
 };
 
This page took 0.040419 seconds and 4 git commands to generate.