From 3795eff827a6c5e28395fff5f725c307e68f9ade Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Mon, 16 Dec 2019 13:41:45 +0100 Subject: [PATCH] Enable builds with ARM Clang compiler --- Makefile | 9 +++++++++ bench/Makefile | 3 +++ ext/hwloc/Makefile | 3 +++ make/include_ARMCLANG.mk | 29 +++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 make/include_ARMCLANG.mk diff --git a/Makefile b/Makefile index 9f093e1ef..f4e68a891 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,15 @@ OBJ := $(filter-out $(BUILD_DIR)/access_x86_pci.o,$(OBJ)) else OBJ := $(filter-out $(BUILD_DIR)/loadDataARM.o,$(OBJ)) endif +ifeq ($(COMPILER), ARMCLANG) +OBJ := $(filter-out $(BUILD_DIR)/topology_cpuid.o,$(OBJ)) +OBJ := $(filter-out $(BUILD_DIR)/loadData.o,$(OBJ)) +OBJ := $(filter-out $(BUILD_DIR)/access_x86.o,$(OBJ)) +OBJ := $(filter-out $(BUILD_DIR)/access_x86_msr.o,$(OBJ)) +OBJ := $(filter-out $(BUILD_DIR)/access_x86_pci.o,$(OBJ)) +else +OBJ := $(filter-out $(BUILD_DIR)/loadDataARM.o,$(OBJ)) +endif ifneq ($(NVIDIA_INTERFACE), true) OBJ := $(filter-out $(BUILD_DIR)/nvmon.o,$(OBJ)) OBJ := $(filter-out $(BUILD_DIR)/topology_gpu.o,$(OBJ)) diff --git a/bench/Makefile b/bench/Makefile index 78100eb20..16e6ad89a 100644 --- a/bench/Makefile +++ b/bench/Makefile @@ -63,6 +63,9 @@ endif ifeq ($(COMPILER),GCCARMv8) BENCH_DIR = ./armv8 endif +ifeq ($(COMPILER),ARMCLANG) +BENCH_DIR = ./armv8 +endif ifeq ($(COMPILER),GCCPOWER) BENCH_DIR = ./power endif diff --git a/ext/hwloc/Makefile b/ext/hwloc/Makefile index a980ca698..3f90b4827 100644 --- a/ext/hwloc/Makefile +++ b/ext/hwloc/Makefile @@ -39,6 +39,9 @@ endif ifeq ($(strip $(COMPILER)), GCCARMv8) OBJ := $(filter-out $(BUILD_DIR)/topology-x86.o, $(OBJ)) endif +ifeq ($(strip $(COMPILER)), ARMCLANG) +OBJ := $(filter-out $(BUILD_DIR)/topology-x86.o, $(OBJ)) +endif ifeq ($(COMPILER),GCCPOWER) OBJ := $(filter-out $(BUILD_DIR)/topology-x86.o,$(OBJ)) endif diff --git a/make/include_ARMCLANG.mk b/make/include_ARMCLANG.mk new file mode 100644 index 000000000..ae6a48d7c --- /dev/null +++ b/make/include_ARMCLANG.mk @@ -0,0 +1,29 @@ +CC = armclang +FC = armflang +AS = as +AR = ar +PAS = ./perl/AsmGen.pl +GEN_PAS = ./perl/generatePas.pl +GEN_GROUPS = ./perl/generateGroups.pl +GEN_PMHEADER = ./perl/gen_events.pl + +ANSI_CFLAGS = + +CFLAGS = -O2 -std=c99 -Wno-format -fPIC +FCFLAGS = -module ./ # ifort +#FCFLAGS = -J ./ -fsyntax-only #gfortran +PASFLAGS = ARMv8 +ASFLAGS = +CPPFLAGS = +LFLAGS = -pthread + +SHARED_CFLAGS = -fPIC -fvisibility=hidden +SHARED_LFLAGS = -shared -fvisibility=hidden + +DEFINES = -DPAGE_ALIGNMENT=4096 +DEFINES += -DLIKWID_MONITOR_LOCK +DEFINES += -DDEBUGLEV=0 +DEFINES += -D__ARM_ARCH_8A=1 + +INCLUDES = +LIBS = -lm -lrt