Commit 0a4d8379 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

Fix zdtm with Ubuntu Bionic/arm/clang

In Ubuntu Bionic for armhf, clang is compiled for armv8l rather than
armv7l (as it was and still is for gcc) and so it uses armv8 by default.

This breaks compilation of tests using smp_mb():

> error: instruction requires: data-barriers

The fix is to add "-march=armv7-a" to CFLAGS which we already do,
except not for the tests.
Signed-off-by: 's avatarKir Kolyshkin <kolyshkin@gmail.com>
parent 780d6ea0
......@@ -21,6 +21,16 @@ endif
SRCARCH ?= $(ARCH)
ifeq ($(ARCH),arm)
ARMV := $(shell echo $(UNAME-M) | sed -nr 's/armv([[:digit:]]).*/\1/p; t; i7')
ifeq ($(ARMV),6)
USERCFLAGS += -march=armv6
else ifeq ($(ARMV),7)
USERCFLAGS += -march=armv7-a
endif
endif
CC := gcc
CFLAGS += -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
CFLAGS += $(USERCFLAGS)
......
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