diff --git a/etc/bashrc b/etc/bashrc index 5aae670e8..c0cf57639 100755 --- a/etc/bashrc +++ b/etc/bashrc @@ -316,6 +316,19 @@ Linux) export WM_LDFLAGS='-mfloat-abi=hard' ;; + aarch64) + # https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html + # This command will provide more details for your specific processor + # gcc -c -Q -march=native -mtune=native --help=target + WM_ARCH=linuxARM8 + export WM_COMPILER_LIB_ARCH=64 + export WM_CC='gcc' + export WM_CXX='g++' + export WM_CFLAGS='-fPIC -march=native -mtune=native' + export WM_CXXFLAGS='-fPIC -march=native -mtune=native' + export WM_LDFLAGS='' + ;; + *) echo Unknown processor type `uname -m` for Linux ;; diff --git a/wmake/rules/linuxARM8Gcc/c b/wmake/rules/linuxARM8Gcc/c new file mode 100644 index 000000000..5be3206f8 --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxARM8Gcc/c++ b/wmake/rules/linuxARM8Gcc/c++ new file mode 100644 index 000000000..8251ef4cf --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ + +include $(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 $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed +LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed diff --git a/wmake/rules/linuxARM8Gcc/c++Debug b/wmake/rules/linuxARM8Gcc/c++Debug new file mode 100644 index 000000000..19bdb9c33 --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxARM8Gcc/c++Opt b/wmake/rules/linuxARM8Gcc/c++Opt new file mode 100644 index 000000000..371045009 --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/c++Opt @@ -0,0 +1,2 @@ +c++DBUG = +c++OPT = -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -march=native -mtune=native diff --git a/wmake/rules/linuxARM8Gcc/c++Prof b/wmake/rules/linuxARM8Gcc/c++Prof new file mode 100644 index 000000000..3bda4dad5 --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxARM8Gcc/cDebug b/wmake/rules/linuxARM8Gcc/cDebug new file mode 100644 index 000000000..72b638f45 --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxARM8Gcc/cOpt b/wmake/rules/linuxARM8Gcc/cOpt new file mode 100644 index 000000000..f90d970cc --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -fprefetch-loop-arrays -march=native -mtune=native diff --git a/wmake/rules/linuxARM8Gcc/cProf b/wmake/rules/linuxARM8Gcc/cProf new file mode 100644 index 000000000..ca3ac9bf5 --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxARM8Gcc/general b/wmake/rules/linuxARM8Gcc/general new file mode 100644 index 000000000..376c61484 --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/general @@ -0,0 +1,9 @@ +CPP = cpp -traditional-cpp $(GFLAGS) +LD = ld + +PROJECT_LIBS = -l$(WM_PROJECT) -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linuxARM8Gcc/mplibOPENMPI b/wmake/rules/linuxARM8Gcc/mplibOPENMPI new file mode 100644 index 000000000..834d2d3e2 --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/mplibOPENMPI @@ -0,0 +1,3 @@ +PFLAGS = -DOMPI_SKIP_MPICXX +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi diff --git a/wmake/rules/linuxARM8Gcc/mplibSYSTEMOPENMPI b/wmake/rules/linuxARM8Gcc/mplibSYSTEMOPENMPI new file mode 100644 index 000000000..cce2cd0ef --- /dev/null +++ b/wmake/rules/linuxARM8Gcc/mplibSYSTEMOPENMPI @@ -0,0 +1,3 @@ +PFLAGS = -DOMPI_SKIP_MPICXX +PINC = $(OPENMPI_COMPILE_FLAGS) +PLIBS = -L$(MPI_ARCH_PATH)/lib/openmpi -lmpi