2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

cr: determine the version of the ARM architecture of the target machine

This patch modifies the build system to analyze the version
of the target ARM architecture and setup the compiler flags
accordingly. This makes it possible to support the ARM
architectures prior to ARMv7.

Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Alexander Kartashov
2013-07-10 10:15:54 +04:00
committed by Pavel Emelyanov
parent 5eb254b016
commit 3a94986310

View File

@@ -39,8 +39,6 @@ OBJCOPY := $(CROSS_COMPILE)objcopy
ARCH ?= $(shell uname -m | sed \ ARCH ?= $(shell uname -m | sed \
-e s/i.86/i386/ \ -e s/i.86/i386/ \
-e s/sun4u/sparc64/ \ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ \
-e s/sa110/arm/ \
-e s/s390x/s390/ \ -e s/s390x/s390/ \
-e s/parisc64/parisc/ \ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ \ -e s/ppc.*/powerpc/ \
@@ -57,11 +55,19 @@ ifeq ($(ARCH),x86_64)
LDARCH := i386:x86-64 LDARCH := i386:x86-64
endif endif
ifeq ($(ARCH),arm) ifeq ($(shell echo $(ARCH) | sed -e 's/arm.*/arm/'),arm)
ARMV := $(shell echo $(ARCH) | sed -r -e 's/armv([[:digit:]]).*/\1/')
ARCH := arm ARCH := arm
ARCH_DEFINES := -DCONFIG_ARM DEFINES := -DCONFIG_ARM -DCONFIG_ARMV$(ARMV)
LDARCH := arm LDARCH := arm
ifeq ($(ARMV),6)
CFLAGS += -march=armv6
endif
ifeq ($(ARMV),7)
CFLAGS += -march=armv7-a CFLAGS += -march=armv7-a
endif
endif endif
SRC_DIR ?= $(CURDIR) SRC_DIR ?= $(CURDIR)