Patchwork Commit: V850: Only compile callt support functions when CALLT is enabled

login
register
mail settings
Submitter Nick Clifton
Date Jan. 4, 2013, 10:18 a.m.
Message ID <87zk0pz1y8.fsf@redhat.com>
Download mbox | patch
Permalink /patch/209435/
State New
Headers show

Comments

Nick Clifton - Jan. 4, 2013, 10:18 a.m.
Hi Guys,

  I am checking in the patch below to fix a small problem with libgcc
  for the V850.  The CALLT support functions were being compiled even if
  the particular multilib concerned did not support the CALLT insn.
  Normally this would not matter, but the linker will now report an
  unknown relocation error for these functions due to the way that they
  are implemented.

  Tested with no regressions on a v850-elf toolchain.

Cheers
  Nick

libgcc/ChangeLog
2013-01-04  Nick Clifton  <nickc@redhat.com>

	* config/v850/lib1funcs.S: Only provide CALLT support functions if
	the CALLT instruction is supported.

Patch

Index: libgcc/config/v850/lib1funcs.S
===================================================================
--- libgcc/config/v850/lib1funcs.S	(revision 194883)
+++ libgcc/config/v850/lib1funcs.S	(working copy)
@@ -1764,6 +1764,7 @@ 
 	.size	__restore_all_interrupt,.-__restore_all_interrupt
 #endif /* L_save_all_interrupt */
 	
+#if defined __V850_CALLT__
 #if defined(__v850e__) || defined(__v850e1__) || defined(__v850e2__) || defined(__v850e2v3__)
 #ifdef	L_callt_save_r2_r29
 	/* Put these functions into the call table area.  */
@@ -2146,6 +2147,7 @@ 
 #endif
 
 #endif /* __v850e__ */
+#endif /* __V850_CALLT__ */
 
 /*  libgcc2 routines for NEC V850.  */
 /*  Double Integer Arithmetical Operation.  */