[uClibc]Rules.make $(CROSS) change

Miles Bader miles at lsi.nec.co.jp
Fri Nov 8 04:28:29 UTC 2002


Is this change to `Rules.make' actually necessary?  Why was it done?

   -# by asking this compiler what arch it compiles stuff for.
   +# by asking the CC compiler what arch it compiles things for, so unless
   +# your compiler is broken, you should not need to specify TARGET_ARCH
   +#
   +# Most people will set this stuff on the command line, i.e.
   +#        make CROSS=mipsel-linux-
   +# will build uClibc for 'mipsel'.
   +
    CROSS=
   -CC = $(CROSS)gcc
   -AR = $(CROSS)ar
   -LD = $(CROSS)ld
   -NM = $(CROSS)nm
   -STRIPTOOL = $(CROSS)strip
   -#STRIPTOOL = /bin/true
   +CC:= $(CROSS)gcc
   +AR:= $(CROSS)ar
   +LD:= $(CROSS)ld
   +NM:= $(CROSS)nm
   +STRIPTOOL:= $(CROSS)strip

As I mentioned in an earlier message, it's something of a regression
that you have to specify _anything_ on the make command line, and having
to specify CROSS is especially ugly -- it's not a `nice' value (it feels
like an internal implementation artifact).

I worked around this need to specify CROSS on the v850 by adding a hack
that adds CROSS as a config variable; this makes unecessary to specify
any command-line arguments at all during normal makes (though you still
have to specify TARGET_ARCH during config makes [I think that should be
fixed as well]).  The above changes breaks this.

[In general I think it's a bad idea to use make's := operator unless
absolutely necessary]

Thanks,

-Miles
-- 
We live, as we dream -- alone....



More information about the uClibc mailing list