[Devel] [PATCH user-cr] User can override SUBARCH for cross-compilation

Oren Laadan orenl at cs.columbia.edu
Mon Mar 1 07:50:06 PST 2010


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))
 
 # compile with debug ?
 DEBUG = -DCHECKPOINT_DEBUG
-- 
1.6.3.3

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list