From 849b42d6dc9b1cd60978c302ccc70aad42ba2f25 Mon Sep 17 00:00:00 2001
From: Joe Garcia <joe.garcia@ssec.wisc.edu>
Date: Tue, 6 Nov 2018 14:33:53 -0600
Subject: [PATCH] cpuflags override documentation

---
 ShellB3/shallbethree.sh | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/ShellB3/shallbethree.sh b/ShellB3/shallbethree.sh
index a40cac75..819b8750 100755
--- a/ShellB3/shallbethree.sh
+++ b/ShellB3/shallbethree.sh
@@ -2023,7 +2023,9 @@ elif isLinux ; then
     [ -z "${F95}" ] && export F95=gfortran
   fi
 
-  if in_set ${CPUTYPE} x86_64 i386 i686 ; then
+  if [ -n "${LINUXCPUFLAGS}" ] ; then
+    echo -n #no-op
+  elif in_set ${CPUTYPE} x86_64 i386 i686 ; then
     export LINUXCPUFLAGS="-fPIC -msse4"
   else
     export LINUXCPUFLAGS="-fPIC"
@@ -8976,17 +8978,22 @@ list_envs(){
     echo "(Mac Only)"
     echo "SYSROOT - (optional) set to the system root to build off of. default find one based on deployment target"
     echo "MACOSX_DEPLOYMENT_TARGET - set to minimum Mac version to deploy to (default ${DEFAULT_MACOSX_DEPLOYMENT_TARGET})"
+  elif isLinux ; then
+    echo "(Linux Only)"
+    echo "LINUXCPUFLAGS - (optional) set system optimization flags. default is \"-fPIC -msse4\" for intel, \"-fPIC\" for arm."
+    echo "                    older processors may need -msse2 instead of -msse4"
   fi
   echo "(All Platforms)"
-  echo -n "CPUTYPE - set to cpu type to build for target. default is native, usually x86_64."
+  echo -n "CPUTYPE         - set to cpu type to build for target. default is native, usually x86_64."
   if isDarwin ; then
     echo " Can also be i386 (32bit)"
   else
     echo " Can also be i686 (32bit)"
   fi
-  echo "PYTHON_VERSION - override the python version to build. default is determined by the trim"
+  echo "PYTHON_VERSION  - override the python version to build. default is determined by the trim. should be 2 or 3"
+  echo "MAKE_STACKLESS  - default is to use normal C Python, but setting this to YES will build a stackless version"
   echo "PORTABLESHELLB3 - default YES will build most its own libraries. if set NO will link to any acceptable system libraries."
-  echo "MAKEFLAGS - can be set to parallel building by setting to '-j8' or the like"
+  echo "MAKEFLAGS       - can be set to parallel building by setting to '-j8' or the like"
 }
 
 help(){
-- 
GitLab