mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 12:57:57 +00:00
build: Move ARCH handling on toplevel
We are going to build everything from toplevel for convenience (just like it was before criu 2) so move one more snippet on top. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
8a4c16fba0
commit
08bb98266b
41
Makefile
41
Makefile
@ -29,7 +29,42 @@ SRC_DIR := $(CURDIR)
|
|||||||
export SRC_DIR
|
export SRC_DIR
|
||||||
|
|
||||||
#
|
#
|
||||||
# General architecture specific options.
|
# Architecture specific options.
|
||||||
|
ifneq ($(filter-out x86 arm arm64 ppc64,$(ARCH)),)
|
||||||
|
$(error "The architecture $(ARCH) isn't supported")
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),x86)
|
||||||
|
SRCARCH := x86
|
||||||
|
LDARCH := i386:x86-64
|
||||||
|
VDSO := y
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),arm)
|
||||||
|
SRCARCH := arm
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),arm64)
|
||||||
|
ARCH := aarch64
|
||||||
|
SRCARCH := aarch64
|
||||||
|
VDSO := y
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH),ppc64)
|
||||||
|
SRCARCH := ppc64
|
||||||
|
LDARCH := powerpc:common64
|
||||||
|
VDSO := y
|
||||||
|
endif
|
||||||
|
|
||||||
|
LDARCH ?= $(SRCARCH)
|
||||||
|
|
||||||
|
export SRCARCH LDARCH VDSO
|
||||||
|
|
||||||
|
SRCARCH ?= $(ARCH)
|
||||||
|
LDARCH ?= $(SRCARCH)
|
||||||
|
|
||||||
|
export SRCARCH LDARCH VDSO
|
||||||
|
|
||||||
UNAME-M := $(shell uname -m)
|
UNAME-M := $(shell uname -m)
|
||||||
export UNAME-M
|
export UNAME-M
|
||||||
|
|
||||||
@ -54,10 +89,6 @@ ifeq ($(ARCH),x86)
|
|||||||
DEFINES := -DCONFIG_X86_64
|
DEFINES := -DCONFIG_X86_64
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),aarch64)
|
|
||||||
VDSO := y
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The PowerPC 64 bits architecture could be big or little endian.
|
# The PowerPC 64 bits architecture could be big or little endian.
|
||||||
# They are handled in the same way.
|
# They are handled in the same way.
|
||||||
|
@ -2,39 +2,8 @@
|
|||||||
# 6a8d90f5fec4 "attr: Allow attribute type 0"
|
# 6a8d90f5fec4 "attr: Allow attribute type 0"
|
||||||
WRAPFLAGS += -Wl,--wrap=nla_parse,--wrap=nlmsg_parse
|
WRAPFLAGS += -Wl,--wrap=nla_parse,--wrap=nlmsg_parse
|
||||||
|
|
||||||
ifeq ($(ARCH),x86)
|
|
||||||
SRCARCH := x86
|
|
||||||
LDARCH := i386:x86-64
|
|
||||||
VDSO := y
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(ARCH),arm)
|
|
||||||
SRCARCH := arm
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(ARCH),arm64)
|
|
||||||
ARCH := aarch64
|
|
||||||
SRCARCH := aarch64
|
|
||||||
VDSO := y
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc64)
|
|
||||||
SRCARCH := ppc64
|
|
||||||
LDARCH := powerpc:common64
|
|
||||||
VDSO := y
|
|
||||||
endif
|
|
||||||
|
|
||||||
LDARCH ?= $(SRCARCH)
|
|
||||||
|
|
||||||
export SRCARCH LDARCH VDSO
|
|
||||||
|
|
||||||
SRCARCH ?= $(ARCH)
|
|
||||||
LDARCH ?= $(SRCARCH)
|
|
||||||
ARCH_DIR := arch/$(SRCARCH)
|
ARCH_DIR := arch/$(SRCARCH)
|
||||||
|
export ARCH_DIR
|
||||||
export SRCARCH LDARCH ARCH_DIR VDSO
|
|
||||||
|
|
||||||
$(if $(wildcard $(ARCH_DIR)),,$(error "The architecture $(ARCH) isn't supported"))
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# General flags.
|
# General flags.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user