diff --git a/etc/config.csh/settings b/etc/config.csh/settings index a68110918c..bceb2500d9 100644 --- a/etc/config.csh/settings +++ b/etc/config.csh/settings @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -81,6 +81,16 @@ case Linux: endsw breaksw + case aarch64: + setenv WM_ARCH linuxArm64 + setenv WM_COMPILER_LIB_ARCH 64 + setenv WM_CC 'gcc' + setenv WM_CXX 'g++' + setenv WM_CFLAGS '-fPIC' + setenv WM_CXXFLAGS '-fPIC -std=c++0x' + setenv WM_LDFLAGS '' + ;; + case ppc64: setenv WM_ARCH linuxPPC64 setenv WM_COMPILER_LIB_ARCH 64 diff --git a/etc/config.sh/settings b/etc/config.sh/settings index a49b6c4507..d48896bac9 100644 --- a/etc/config.sh/settings +++ b/etc/config.sh/settings @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -74,6 +74,16 @@ Linux) esac ;; + aarch64) + WM_ARCH=linuxArm64 + export WM_COMPILER_LIB_ARCH=64 + export WM_CC='gcc' + export WM_CXX='g++' + export WM_CFLAGS='-fPIC' + export WM_CXXFLAGS='-fPIC -std=c++0x' + export WM_LDFLAGS= + ;; + armv7l) WM_ARCH=linuxARM7 export WM_ARCH_OPTION=32 diff --git a/wmake/rules/linuxArm64Gcc/c b/wmake/rules/linuxArm64Gcc/c new file mode 100644 index 0000000000..91d6fda4de --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/c @@ -0,0 +1,16 @@ +SUFFIXES += .c + +cWARN = -Wall + +cc = gcc + +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $< -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -fuse-ld=bfd -shared +LINKEXE = $(cc) -fuse-ld=bfd -Xlinker --add-needed -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxArm64Gcc/c++ b/wmake/rules/linuxArm64Gcc/c++ new file mode 100644 index 0000000000..d9554221c5 --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/c++ @@ -0,0 +1,25 @@ +SUFFIXES += .C + +c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \ + -Wno-invalid-offsetof -Wno-attributes + +# Suppress some warnings for flex++ and CGAL +c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds + +CC = g++ -std=c++11 + +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-100 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -fuse-ld=bfd -shared -Xlinker --add-needed -Xlinker --no-as-needed +LINKEXE = $(CC) $(c++FLAGS) -fuse-ld=bfd -Xlinker --add-needed -Xlinker --no-as-needed diff --git a/wmake/rules/linuxArm64Gcc/c++Debug b/wmake/rules/linuxArm64Gcc/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxArm64Gcc/c++Opt b/wmake/rules/linuxArm64Gcc/c++Opt new file mode 100644 index 0000000000..3168a563b1 --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/c++Opt @@ -0,0 +1,4 @@ +c++DBUG = +c++OPT = -O3 -mcpu=native + +ROUNDING_MATH = -frounding-math diff --git a/wmake/rules/linuxArm64Gcc/c++Prof b/wmake/rules/linuxArm64Gcc/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxArm64Gcc/cDebug b/wmake/rules/linuxArm64Gcc/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxArm64Gcc/cOpt b/wmake/rules/linuxArm64Gcc/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linuxArm64Gcc/cProf b/wmake/rules/linuxArm64Gcc/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxArm64Gcc/general b/wmake/rules/linuxArm64Gcc/general new file mode 100644 index 0000000000..1002cb169b --- /dev/null +++ b/wmake/rules/linuxArm64Gcc/general @@ -0,0 +1,8 @@ +CPP = cpp -traditional-cpp $(GFLAGS) + +PROJECT_LIBS = -l$(WM_PROJECT) -ldl + +include $(GENERAL_RULES)/standard + +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++