mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 05:18:00 +00:00
make: separate supported architecture checks
Arch-specific options will be clearer without support checks. Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
52188d31be
commit
3af5fb23c4
23
Makefile
23
Makefile
@ -19,12 +19,22 @@ export CFLAGS
|
|||||||
HOSTCFLAGS ?= $(CFLAGS)
|
HOSTCFLAGS ?= $(CFLAGS)
|
||||||
export HOSTCFLAGS
|
export HOSTCFLAGS
|
||||||
|
|
||||||
|
UNAME-M := $(shell uname -m)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Architecture specific options.
|
# Supported Architectures
|
||||||
ifneq ($(filter-out x86 arm aarch64 ppc64,$(ARCH)),)
|
ifneq ($(filter-out x86 arm aarch64 ppc64,$(ARCH)),)
|
||||||
$(error "The architecture $(ARCH) isn't supported")
|
$(error "The architecture $(ARCH) isn't supported")
|
||||||
endif
|
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)
|
ifeq ($(ARCH),x86)
|
||||||
LDARCH := i386:x86-64
|
LDARCH := i386:x86-64
|
||||||
VDSO := y
|
VDSO := y
|
||||||
@ -43,9 +53,6 @@ LDARCH ?= $(SRCARCH)
|
|||||||
|
|
||||||
export LDARCH VDSO
|
export LDARCH VDSO
|
||||||
|
|
||||||
UNAME-M := $(shell uname -m)
|
|
||||||
export UNAME-M
|
|
||||||
|
|
||||||
ifeq ($(ARCH),arm)
|
ifeq ($(ARCH),arm)
|
||||||
ARMV := $(shell echo $(UNAME-M) | sed -nr 's/armv([[:digit:]]).*/\1/p; t; i7')
|
ARMV := $(shell echo $(UNAME-M) | sed -nr 's/armv([[:digit:]]).*/\1/p; t; i7')
|
||||||
DEFINES := -DCONFIG_ARMV$(ARMV)
|
DEFINES := -DCONFIG_ARMV$(ARMV)
|
||||||
@ -69,15 +76,7 @@ ifeq ($(ARCH),x86)
|
|||||||
DEFINES := -DCONFIG_X86_64
|
DEFINES := -DCONFIG_X86_64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
|
||||||
# The PowerPC 64 bits architecture could be big or little endian.
|
|
||||||
# They are handled in the same way.
|
|
||||||
#
|
|
||||||
ifeq ($(ARCH),ppc64)
|
ifeq ($(ARCH),ppc64)
|
||||||
ifeq ($(UNAME-M),ppc64)
|
|
||||||
error := $(error ppc64 big endian not yet supported)
|
|
||||||
endif
|
|
||||||
|
|
||||||
DEFINES := -DCONFIG_PPC64
|
DEFINES := -DCONFIG_PPC64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user