[PATCH 3/5] spe-newlib-gc-sections

Jeff Johnston jjohnstn@redhat.com
Thu Aug 17 00:10:00 GMT 2006


Patch checked in.

-- Jeff J.

jschopp wrote:
>>> Because each of the SPEs operate in their own 256K address space, 
>>> newlib is
>>> always statically linked.  Adding these flags will thus reduce the 
>>> size of
>>> applications that link against newlib.
>>
>>
>>
>>   This patch seems to have been mangled in transit!
> 
> 
> Thanks for letting me know.  Not sure what happened there, I'll be sure 
> to find out.  In the meantime here is the patch, hopefully unmangled.
> 
> 
> ------------------------------------------------------------------------
> 
> diff -ur newlib-1.14.0/libgloss/spu/Makefile.in newlib/libgloss/spu/Makefile.in
> --- newlib-1.14.0/libgloss/spu/Makefile.in	2006-07-27 22:11:14.000000000 +0900
> +++ newlib/libgloss/spu/Makefile.in	2006-07-26 17:24:38.000000000 +0900
> @@ -64,7 +64,7 @@
>  
>  OUTPUTS = libgloss.a crt0.o
>  
> -NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
> +NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` -ffunction-sections -fdata-sections
>  NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`
>  
>  INCLUDES = -I. -I$(srcdir)/..
> diff -ur newlib-1.14.0/newlib/configure.host newlib/newlib/configure.host
> --- newlib-1.14.0/newlib/configure.host	2006-07-27 22:11:14.000000000 +0900
> +++ newlib/newlib/configure.host	2006-07-26 17:35:47.000000000 +0900
> @@ -247,6 +247,7 @@
>  	;;
>    spu)
>  	machine_dir=spu
> +	newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
>  	;;
>    *)
>  	echo '***' "Newlib does not support CPU ${host_cpu}" 1>&2



More information about the Newlib mailing list