[Devel] Re: [PATCH user-cr] User can override SUBARCH for cross-compilation
Oren Laadan
orenl at cs.columbia.edu
Mon Mar 1 11:05:45 PST 2010
Nathan Lynch wrote:
> Hey Oren,
>
> On Mon, 2010-03-01 at 10:50 -0500, Oren Laadan wrote:
>> Detecting the architecture via uname is fine as long as the user is
>> able to override it (make SUBARCH=foo).
>>
>> Signed-of-by: Oren Laadan <orenl at cs.columbia.edu>
>> ---
>> Makefile | 10 +++++++++-
>> 1 files changed, 9 insertions(+), 1 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 60ddccd..64b5f73 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1,3 +1,11 @@
>> +# *DOCUMENTATION*
>> +#
>> +# List of environment variables that may be set by caller:
>> +# KERNELSRC - path of kernel sources (def: ../linux)
>> +# SUBARCH - sub-architecture (def: extract with 'uname')
>> +# PREFIX - prefix path for installation (def: /usr/local)
>> +#
>> +
>> KERNELSRC ?= ../linux
>>
>> CKPT_INCLUDE = -I./include
>> @@ -6,7 +14,7 @@ CKPT_HEADERS = include/linux/checkpoint.h \
>> include/asm/checkpoint_hdr.h
>>
>> # detect architecture (for eclone)
>> -SUBARCH = $(patsubst i%86,x86_32,$(shell uname -m))
>> +SUBARCH ?= $(patsubst i%86,x86_32,$(shell uname -m))
>
> I didn't mean to imply that the user-cr Makefile didn't already honor
> the user's SUBARCH setting on the command line. That is, "make
> SUBARCH=ppc" works fine already, since command line assignment of
> variables overrides assignment within the Makefile.
>
Using "?=" allows a user to set SUBARCH as an environment variable
(and not have to repeatedly type it). Sinmple "=" does not pick up
a default value from the environment.
I'll fix the commit message to be more accurate.
Oren
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list