[uClibc] RE: [uClibc-cvs] uClibc Rules.mak,1.137,1.138
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Tue Sep 2 08:11:54 UTC 2003
> -----Original Message-----
> From: Erik Andersen [mailto:andersen at uclibc.org]
> Sent: 01 September 2003 19:59
> To: uclibc-cvs at uclibc.org
> Subject: [uClibc-cvs] uClibc Rules.mak,1.137,1.138
>
> Update of /var/cvs/uClibc
> In directory winder:/tmp/cvs-serv12272
>
> Modified Files:
> Rules.mak
> Log Message:
> Do not overwrite CPU_CFLAGS values....
>
>
> Index: Rules.mak
> ===================================================================
> RCS file: /var/cvs/uClibc/Rules.mak,v
> retrieving revision 1.137
> retrieving revision 1.138
> diff -u -d -r1.137 -r1.138
> --- Rules.mak 20 Aug 2003 23:19:23 -0000 1.137
> +++ Rules.mak 1 Sep 2003 17:58:38 -0000 1.138
> @@ -79,7 +79,7 @@
> AWK:=$(shell if [ -x /usr/bin/nawk ]; then echo "/usr/bin/nawk"; \
> else echo "/usr/bin/awk"; fi)
>
> -HOST_ARCH:= $(shell uname -m | sed \
> +HOST_ARCH= $(shell uname -m | sed \
> -e 's/i.86/i386/' \
> -e 's/sparc.*/sparc/' \
> -e 's/arm.*/arm/g' \
> @@ -90,7 +90,7 @@
> -e 's/mips.*/mips/' \
> )
> ifeq ($(strip $(TARGET_ARCH)),)
> -TARGET_ARCH:=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
> +TARGET_ARCH=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
> -e 's/i.86/i386/' \
> -e 's/sparc.*/sparc/' \
> -e 's/arm.*/arm/g' \
Any special reason why $(HOST_ARCH) and $(TARGET_ARCH) need
to be re-evaluated on each use, and thereby causing an
execution of an external shell each time? It seems very
inefficient to me.
[snip]
> ifeq ($(strip $(TARGET_ARCH)),cris)
> - CPU_LDFLAGS-$(CONFIG_CRIS):="-mcrislinux"
> - CPU_CFLAGS-$(CONFIG_CRIS):="-mlinux"
> - PICFLAG:=-fpic
> + CPU_LDFLAGS-$(CONFIG_CRIS)+=-mcrislinux
> + CPU_CFLAGS-$(CONFIG_CRIS)+=-mlinux
> + PICFLAG+=-fpic
$(PICFLAG) should not be assigned to using += here as this
assignment is intended to replace the default value of -fPIC,
not add to it.
> endif
>
> # use '-Os' optimization if available, else use -O2, allow
> Config to override
> @@ -190,7 +190,7 @@
> XARCH_CFLAGS=$(subst ",, $(strip $(ARCH_CFLAGS)))
> CPU_CFLAGS=$(subst ",, $(strip $(CPU_CFLAGS-y)))
> # Some nice CFLAGS to work with
> -CFLAGS:=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) \
> +CFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) \
> -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)include -I.
>
> ifeq ($(DODEBUG),y)
//Peter
More information about the uClibc
mailing list