diff --git a/etc/config/settings.csh b/etc/config/settings.csh index 6174c5f4d7..882fa326d7 100644 --- a/etc/config/settings.csh +++ b/etc/config/settings.csh @@ -96,6 +96,16 @@ case Linux: setenv WM_LDFLAGS '-m64' breaksw + case ppc64le: + setenv WM_ARCH linuxPPC64le + setenv WM_COMPILER_LIB_ARCH 64 + setenv WM_CC 'gcc' + setenv WM_CXX 'g++' + setenv WM_CFLAGS '-m64 -fPIC' + setenv WM_CXXFLAGS '-m64 -fPIC' + setenv WM_LDFLAGS '-m64' + breaksw + default: echo Unknown processor type `uname -m` for Linux breaksw diff --git a/etc/config/settings.sh b/etc/config/settings.sh index 6c5c589e4e..95c41e1bc8 100644 --- a/etc/config/settings.sh +++ b/etc/config/settings.sh @@ -125,6 +125,16 @@ Linux) export WM_LDFLAGS='-m64' ;; + ppc64le) + WM_ARCH=linuxPPC64le + export WM_COMPILER_LIB_ARCH=64 + export WM_CC='gcc' + export WM_CXX='g++' + export WM_CFLAGS='-m64 -fPIC' + export WM_CXXFLAGS='-m64 -fPIC' + export WM_LDFLAGS='-m64' + ;; + *) echo Unknown processor type `uname -m` for Linux 1>&2 ;; diff --git a/wmake/rules/linuxPPC64leGcc/X b/wmake/rules/linuxPPC64leGcc/X new file mode 100644 index 0000000000..5d1f9c5cc5 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/X @@ -0,0 +1,3 @@ +XFLAGS = +XINC = $(XFLAGS) -I/usr/X11R6/include +XLIBS = -L/usr/X11R6/lib64 -lXext -lX11 diff --git a/wmake/rules/linuxPPC64leGcc/c b/wmake/rules/linuxPPC64leGcc/c new file mode 100644 index 0000000000..d9aa80f726 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/c @@ -0,0 +1,16 @@ +SUFFIXES += .c + +cWARN = -Wall + +cc = gcc -m64 -mcpu=power8 + +include $(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) -shared +LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxPPC64leGcc/c++ b/wmake/rules/linuxPPC64leGcc/c++ new file mode 100644 index 0000000000..65a63430c3 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/c++ @@ -0,0 +1,21 @@ +SUFFIXES += .C + +c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m64 -mcpu=power8 + +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 $< -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed diff --git a/wmake/rules/linuxPPC64leGcc/c++Debug b/wmake/rules/linuxPPC64leGcc/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxPPC64leGcc/c++Opt b/wmake/rules/linuxPPC64leGcc/c++Opt new file mode 100644 index 0000000000..599e6aba61 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/c++Opt @@ -0,0 +1,4 @@ +c++DBUG = +c++OPT = -O3 + +ROUNDING_MATH = -frounding-math diff --git a/wmake/rules/linuxPPC64leGcc/c++Prof b/wmake/rules/linuxPPC64leGcc/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxPPC64leGcc/cDebug b/wmake/rules/linuxPPC64leGcc/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxPPC64leGcc/cOpt b/wmake/rules/linuxPPC64leGcc/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linuxPPC64leGcc/cProf b/wmake/rules/linuxPPC64leGcc/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxPPC64leGcc/general b/wmake/rules/linuxPPC64leGcc/general new file mode 100644 index 0000000000..f800e09afc --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/general @@ -0,0 +1,10 @@ +CPP = cpp -traditional-cpp $(GFLAGS) +LD = ld -m elf64lppc + +PROJECT_LIBS = -l$(WM_PROJECT) -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/X +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linuxPPC64leGcc/mplibHPMPI b/wmake/rules/linuxPPC64leGcc/mplibHPMPI new file mode 100644 index 0000000000..574492a236 --- /dev/null +++ b/wmake/rules/linuxPPC64leGcc/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi