Commit 08bb9826 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 8a4c16fb
...@@ -29,7 +29,42 @@ SRC_DIR := $(CURDIR) ...@@ -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) ...@@ -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 @@ ...@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment