From 9c4e10fbd155daa0ee8206a8313436f14f7f7282 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 4 May 2024 14:48:02 +0200 Subject: [PATCH] sort hugetlb and shm alloc options --- Makefile.system | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Makefile.system b/Makefile.system index 840389db7..67830f2a3 100644 --- a/Makefile.system +++ b/Makefile.system @@ -355,7 +355,10 @@ OBJCONV = $(CROSS_SUFFIX)objconv # When fortran support was either not detected or actively deselected, only build BLAS. ifeq ($(NOFORTRAN), 1) C_LAPACK = 1 -override FEXTRALIB = +override FEXTRALIB = +ifeq ($(C_COMPILER), GCC) +CCOMMON_OPT += -Wno-error=incompatible-pointer-types +endif endif ifeq ($(C_COMPILER), GCC) @@ -959,18 +962,12 @@ endif ifeq ($(ARCH), loongarch64) LA64_ABI=$(shell $(CC) -mabi=lp64d -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo lp64d) -LA64_ARCH=$(shell $(CC) -march=loongarch64 -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo loongarch64) ifneq ($(LA64_ABI), lp64d) LA64_ABI=lp64 endif -ifneq ($(LA64_ARCH), loongarch64) -CCOMMON_OPT += -mabi=$(LA64_ABI) -FCOMMON_OPT += -mabi=$(LA64_ABI) -else CCOMMON_OPT += -march=loongarch64 -mabi=$(LA64_ABI) FCOMMON_OPT += -march=loongarch64 -mabi=$(LA64_ABI) endif -endif endif @@ -1589,13 +1586,23 @@ ifdef FUNCTION_PROFILE CCOMMON_OPT += -DFUNCTION_PROFILE endif +ifdef SHMEM_ALLOCATION +ifneq ($(SHMEM_ALLOCATION), 0) +CCOMMON_OPT += -DALLOC_SHM +endif +endif + ifdef HUGETLB_ALLOCATION +ifneq ($(HUGETLB_ALLOCATION), 0) CCOMMON_OPT += -DALLOC_HUGETLB endif +endif ifdef HUGETLBFILE_ALLOCATION +ifneq ($(HUGETLBFILE_ALLOCATION), 0) CCOMMON_OPT += -DALLOC_HUGETLBFILE -DHUGETLB_FILE_NAME=$(HUGETLBFILE_ALLOCATION) endif +endif ifdef STATIC_ALLOCATION CCOMMON_OPT += -DALLOC_STATIC