This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFA]: SH Conditionalize __fpscr_values


On Sat, Dec 21, 2002 at 08:06:48AM +0900, kaz Kojima wrote:
> Hi,
> 
> The attached is for not to include __fpscr_values in libgcc.a if needed.
> In sh-linux, we used to do so and define __fpscr_values at crt1.o to
> avoid that each shared library has its copy.
> I need approval for the change of lib1funcs.asm. Ok for mainline?

We picked up this patch some time ago here, and noticed a problem with
it.  An application which doesn't use FP on its own, compiled with an
earlier version of GCC, will not include a definition for
__fpscr_values.  It'll assume that libc.so.6 provides it, which it no
longer does.  I had to add it as a run-time weak symbol to glibc in
order to maintain compatibility.

Just something to think about.

> 
> Regards,
> 	kaz
> --
> 2002-12-20  Kaz kojima  <kkojima@gcc.gnu.org>
> 
> 	* config/sh/lib1funcs.asm (__fpscr_values): Conditionalize with
> 	NO_FPSCR_VALUES.
> 	* config/sh/t-linux (TARGET_LIBGCC2_CFLAGS): Add -DNO_FPSCR_VALUES.
> 
> --- ORIG/gcc/gcc/config/sh/lib1funcs.asm	Tue Dec 17 07:07:39 2002
> +++ LOCAL/gcc/gcc/config/sh/lib1funcs.asm	Sat Dec 21 07:44:56 2002
> @@ -1968,11 +1968,13 @@
>  	.long GLOBAL(fpscr_values)
>  
>  	ENDFUNC(GLOBAL(set_fpscr))
> +#ifndef NO_FPSCR_VALUES
>  #ifdef __ELF__
>          .comm   GLOBAL(fpscr_values),8,4
>  #else
>          .comm   GLOBAL(fpscr_values),8
>  #endif /* ELF */
> +#endif /* NO_FPSCR_VALUES */
>  #endif /* SH3E / SH4 */
>  #endif /* L_set_fpscr */
>  #ifdef L_ic_invalidate
> diff -urN ORIG/gcc/gcc/config/sh/t-linux LOCAL/gcc/gcc/config/sh/t-linux
> --- ORIG/gcc/gcc/config/sh/t-linux	Tue Dec 17 07:12:53 2002
> +++ LOCAL/gcc/gcc/config/sh/t-linux	Sat Dec 21 07:44:56 2002
> @@ -1,4 +1,4 @@
> -TARGET_LIBGCC2_CFLAGS = -fpic
> +TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
>  LIB1ASMFUNCS_CACHE = _ic_invalidate
>  
>  LIB2FUNCS_EXTRA=
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]