]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/16952 (GCC for powerpc cross target with -mrelocatable reports error)
authorAlan Modra <amodra@bigpond.net.au>
Thu, 2 Dec 2004 02:28:31 +0000 (02:28 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Thu, 2 Dec 2004 02:28:31 +0000 (12:58 +1030)
PR target/16952
* config/rs6000/rs6000.c (rs6000_assemble_integer): Replace
#ifdef RELOCATABLE_NEEDS_FIXUP with if.
* config/rs6000/linux.h (RELOCATABLE_NEEDS_FIXUP): Define in terms
of target_flags_explicit.
* config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Ditto for biarch
case.  Define as 0 for non-biarch.

From-SVN: r91606

gcc/ChangeLog
gcc/config/rs6000/linux.h
gcc/config/rs6000/linux64.h
gcc/config/rs6000/rs6000.c

index 2b3961eff440200c88e3614120d0f827408c42d3..a00324723f7483e91c8173ed095bcebbfb5d2c94 100644 (file)
@@ -1,3 +1,13 @@
+2004-12-02  Alan Modra  <amodra@bigpond.net.au>
+
+       PR target/16952
+       * config/rs6000/rs6000.c (rs6000_assemble_integer): Replace
+       #ifdef RELOCATABLE_NEEDS_FIXUP with if.
+       * config/rs6000/linux.h (RELOCATABLE_NEEDS_FIXUP): Define in terms
+       of target_flags_explicit.
+       * config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Ditto for biarch
+       case.  Define as 0 for non-biarch.
+
 2004-12-01  Richard Henderson  <rth@redhat.com>
 
         * expr.c (optimize_bitfield_assignment_op): Split out from ...
index 750ba369d9006f9123a505ed0c04a3b0c96b5946..8d98c22f1a68441bed34bcef3f53fdc0da4fbeff 100644 (file)
 #undef TARGET_64BIT
 #define TARGET_64BIT 0
  
-/* We don't need to generate entries in .fixup.  */
+/* We don't need to generate entries in .fixup, except when
+   -mrelocatable or -mrelocatable-lib is given.  */
 #undef RELOCATABLE_NEEDS_FIXUP
+#define RELOCATABLE_NEEDS_FIXUP \
+  (target_flags & target_flags_explicit & MASK_RELOCATABLE)
 
 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
index 68f54b69a36169b65134b6416a3abf456a9dd49a..53bd4afb7bdb5748b59ca3c8c7106cbc7ad9cbd3 100644 (file)
 #undef PROCESSOR_DEFAULT64
 #define PROCESSOR_DEFAULT64 PROCESSOR_PPC630
 
-#undef TARGET_RELOCATABLE
-#define        TARGET_RELOCATABLE (!TARGET_64BIT && (target_flags & MASK_RELOCATABLE))
+/* We don't need to generate entries in .fixup, except when
+   -mrelocatable or -mrelocatable-lib is given.  */
+#undef RELOCATABLE_NEEDS_FIXUP
+#define RELOCATABLE_NEEDS_FIXUP \
+  (target_flags & target_flags_explicit & MASK_RELOCATABLE)
 
 #undef RS6000_ABI_NAME
 #define        RS6000_ABI_NAME (TARGET_64BIT ? "aixdesc" : "sysv")
 #define        TARGET_EABI             0
 #undef TARGET_PROTOTYPE
 #define        TARGET_PROTOTYPE        0
+#undef RELOCATABLE_NEEDS_FIXUP
+#define RELOCATABLE_NEEDS_FIXUP 0
 
 #endif
 
 #define PROFILE_HOOK(LABEL) \
   do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0)
 
-/* We don't need to generate entries in .fixup.  */
-#undef RELOCATABLE_NEEDS_FIXUP
-
 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given.  */
 #undef  ADJUST_FIELD_ALIGN
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
index b3e8fdc1e62dc01e684bcb849ac0d2a7b99bf3cd..50e45eed4cfbb05a155b6b88d1aae627f4dcca83 100644 (file)
@@ -9742,6 +9742,10 @@ print_operand_address (FILE *file, rtx x)
     abort ();
 }
 \f
+#ifndef RELOCATABLE_NEEDS_FIXUP
+#define RELOCATABLE_NEEDS_FIXUP 0
+#endif
+
 /* Target hook for assembling integer objects.  The PowerPC version has
    to handle fixup entries for relocatable code if RELOCATABLE_NEEDS_FIXUP
    is defined.  It also needs to handle DI-mode objects on 64-bit
@@ -9750,9 +9754,8 @@ print_operand_address (FILE *file, rtx x)
 static bool
 rs6000_assemble_integer (rtx x, unsigned int size, int aligned_p)
 {
-#ifdef RELOCATABLE_NEEDS_FIXUP
   /* Special handling for SI values.  */
-  if (size == 4 && aligned_p)
+  if (RELOCATABLE_NEEDS_FIXUP && size == 4 && aligned_p)
     {
       extern int in_toc_section (void);
       static int recurse = 0;
@@ -9799,7 +9802,6 @@ rs6000_assemble_integer (rtx x, unsigned int size, int aligned_p)
          return true;
        }
     }
-#endif /* RELOCATABLE_NEEDS_FIXUP */
   return default_assemble_integer (x, size, aligned_p);
 }