[CRIU] [PATCH 4/6] make: separate supported architecture checks

Dmitry Safonov dsafonov at virtuozzo.com
Mon Apr 24 11:37:17 PDT 2017


Arch-specific options will be clearer without support checks.

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 Makefile | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index f55f5941aa76..f568e50545c0 100644
--- a/Makefile
+++ b/Makefile
@@ -19,12 +19,22 @@ export CFLAGS
 HOSTCFLAGS	?= $(CFLAGS)
 export HOSTCFLAGS
 
+UNAME-M := $(shell uname -m)
+
 #
-# Architecture specific options.
+# Supported Architectures
 ifneq ($(filter-out x86 arm aarch64 ppc64,$(ARCH)),)
         $(error "The architecture $(ARCH) isn't supported")
 endif
 
+# The PowerPC 64 bits architecture could be big or little endian.
+# They are handled in the same way.
+ifeq ($(UNAME-M),ppc64)
+        error := $(error ppc64 big endian is not yet supported)
+endif
+
+#
+# Architecture specific options.
 ifeq ($(ARCH),x86)
         LDARCH		:= i386:x86-64
         VDSO		:= y
@@ -43,9 +53,6 @@ LDARCH ?= $(SRCARCH)
 
 export LDARCH VDSO
 
-UNAME-M := $(shell uname -m)
-export UNAME-M
-
 ifeq ($(ARCH),arm)
         ARMV		:= $(shell echo $(UNAME-M) | sed -nr 's/armv([[:digit:]]).*/\1/p; t; i7')
         DEFINES		:= -DCONFIG_ARMV$(ARMV)
@@ -69,15 +76,7 @@ ifeq ($(ARCH),x86)
         DEFINES		:= -DCONFIG_X86_64
 endif
 
-#
-# The PowerPC 64 bits architecture could be big or little endian.
-# They are handled in the same way.
-#
 ifeq ($(ARCH),ppc64)
-        ifeq ($(UNAME-M),ppc64)
-                error := $(error ppc64 big endian not yet supported)
-        endif
-
         DEFINES		:= -DCONFIG_PPC64 -D__SANE_USERSPACE_TYPES__
 endif
 
-- 
2.12.2



More information about the CRIU mailing list