[uClibc] RE: [uClibc-cvs] uClibc Rules.mak,1.161,1.162

Peter Kjellerstedt peter.kjellerstedt at axis.com
Wed Jan 14 12:21:31 UTC 2004


> -----Original Message-----
> From: uclibc-cvs-bounces at uclibc.org 
> [mailto:uclibc-cvs-bounces at uclibc.org] On Behalf Of Erik Andersen
> Sent: 14 January 2004 11:32
> To: uclibc-cvs at uclibc.org
> Subject: [uClibc-cvs] uClibc Rules.mak,1.161,1.162
> 
> Update of /var/cvs/uClibc
> In directory nail:/tmp/cvs-serv25668
> 
> Modified Files:
> 	Rules.mak 
> Log Message:
> Use the gcc 3.4 -funit-at-a-time optimization when available
> 
> 
> Index: Rules.mak
> ===================================================================
> RCS file: /var/cvs/uClibc/Rules.mak,v
> retrieving revision 1.161
> retrieving revision 1.162
> diff -u -d -r1.161 -r1.162
> --- Rules.mak	4 Jan 2004 05:32:21 -0000	1.161
> +++ Rules.mak	14 Jan 2004 10:31:58 -0000	1.162
> @@ -170,8 +170,10 @@
>  	PICFLAG=-fpic
>  endif
>  
> -# use '-Os' optimization if available, else use -O2, allow 
> Config to override
> +# Use '-Os' optimization if available, else use -O2, allow 
> Config to override
>  OPTIMIZATION+=$(call check_gcc,-Os,-O2)
> +# Use the gcc 3.4 -funit-at-a-time optimization when available
> +OPTIMIZATION+=$(call check_gcc,-funit-at-a-time,)
>  
>  
>  # Add a bunch of extra pedantic annoyingly strict checks

Hmm, don't all these OPTIMIZATION+=$(call check_gcc,...) 
lead to gcc unnecessarily being executed 2-4 times extra 
per compiled unit?

If it was written something like this, I think the extra 
executions of gcc would only be performed once per Makefile:

OPTIMIZATION_SIZE := $(call check_gcc,-Os,-O2)
OPTIMIZATION_UNIT := $(call check_gcc,-funit-at-a-time,)
OPTIMIZATION      += $(OPTIMIZATION_SIZE) $(OPTIMIZATION_UNIT)

//Peter



More information about the uClibc mailing list