convenient change of ML system architecture via system option ML_preference_64, which is grepped off-line from stored preferences during bootstrap;
authorwenzelm
Fri Sep 11 17:57:34 2015 +0200 (2015-09-11)
changeset 61158ea6a4c8bc722
parent 61157 13f4056c42d7
child 61159 da900891ee06
convenient change of ML system architecture via system option ML_preference_64, which is grepped off-line from stored preferences during bootstrap;
Admin/components/components.sha1
Admin/components/main
Admin/polyml/settings
NEWS
etc/options
     1.1 --- a/Admin/components/components.sha1	Fri Sep 11 17:48:49 2015 +0200
     1.2 +++ b/Admin/components/components.sha1	Fri Sep 11 17:57:34 2015 +0200
     1.3 @@ -94,6 +94,7 @@
     1.4  532f6e8814752aeb406c62fabcfd2cc05f8a7ca8  polyml-5.5.2.tar.gz
     1.5  1c53f699d35c0db6c7cf4ea51f2310adbd1d0dc5  polyml-5.5.3-20150820.tar.gz
     1.6  b4b624fb5f34d1dc814fb4fb469fafd7d7ea018a  polyml-5.5.3-20150908.tar.gz
     1.7 +b668e1f43a41608a8eb365c5e19db6c54c72748a  polyml-5.5.3-20150911.tar.gz
     1.8  8ee375cfc38972f080dbc78f07b68dac03efe968  ProofGeneral-3.7.1.1.tar.gz
     1.9  847b52c0676b5eb0fbf0476f64fc08c2d72afd0c  ProofGeneral-4.1.tar.gz
    1.10  8e0b2b432755ef11d964e20637d1bc567d1c0477  ProofGeneral-4.2-1.tar.gz
     2.1 --- a/Admin/components/main	Fri Sep 11 17:48:49 2015 +0200
     2.2 +++ b/Admin/components/main	Fri Sep 11 17:57:34 2015 +0200
     2.3 @@ -9,7 +9,7 @@
     2.4  jfreechart-1.0.14-1
     2.5  jortho-1.0-2
     2.6  kodkodi-1.5.2
     2.7 -polyml-5.5.3-20150908
     2.8 +polyml-5.5.3-20150911
     2.9  scala-2.11.7
    2.10  spass-3.8ds
    2.11  xz-java-1.2-1
     3.1 --- a/Admin/polyml/settings	Fri Sep 11 17:48:49 2015 +0200
     3.2 +++ b/Admin/polyml/settings	Fri Sep 11 17:57:34 2015 +0200
     3.3 @@ -3,56 +3,67 @@
     3.4  POLYML_HOME="$COMPONENT"
     3.5  
     3.6  
     3.7 -# simple settings (example)
     3.8 +# platform preference
     3.9  
    3.10 -#ML_SYSTEM=polyml-5.5.3
    3.11 -#ML_PLATFORM="$ISABELLE_PLATFORM32"
    3.12 -#ML_HOME="$POLYML_HOME/$ML_PLATFORM"
    3.13 -#ML_OPTIONS="-H 500"
    3.14 -#ML_SOURCES="$POLYML_HOME/src"
    3.15 -
    3.16 -
    3.17 -# smart settings
    3.18 -
    3.19 -ML_SYSTEM=polyml-5.5.3
    3.20 +if grep "ML_system_64.*=.*true" "$ISABELLE_HOME_USER/etc/preferences" >/dev/null 2>/dev/null
    3.21 +then
    3.22 +  ML_SYSTEM_64="true"
    3.23 +else
    3.24 +  ML_SYSTEM_64="false"
    3.25 +fi
    3.26  
    3.27 -case "$ISABELLE_PLATFORM" in
    3.28 -  *-linux)
    3.29 -    if env LD_LIBRARY_PATH="$POLYML_HOME/$ISABELLE_PLATFORM32:$LD_LIBRARY_PATH" \
    3.30 -      "$POLYML_HOME/$ISABELLE_PLATFORM32/poly" -v >/dev/null 2>/dev/null
    3.31 -    then
    3.32 -      ML_PLATFORM="$ISABELLE_PLATFORM32"
    3.33 -    else
    3.34 -      ML_PLATFORM="$ISABELLE_PLATFORM64"
    3.35 -      if [ -z "$ML_PLATFORM_FALLBACK" ]; then
    3.36 -        echo >&2 "### Cannot execute Poly/ML in 32bit mode (missing shared libraries for C/C++)"
    3.37 -        echo >&2 "### Using bulky 64bit version of Poly/ML instead"
    3.38 -        ML_PLATFORM_FALLBACK="true"
    3.39 -      fi
    3.40 -    fi
    3.41 +case "${ISABELLE_PLATFORM}:${ML_SYSTEM_64}" in
    3.42 +  x86-cygwin:true)
    3.43 +    PLATFORMS="x86_64-windows x86-windows"
    3.44      ;;
    3.45 -  x86-cygwin)
    3.46 -    ML_PLATFORM="x86-windows"
    3.47 +  x86-cygwin:*)
    3.48 +    PLATFORMS="x86-windows x86_64-windows"
    3.49 +    ;;
    3.50 +  *:true)
    3.51 +    PLATFORMS="$ISABELLE_PLATFORM64 $ISABELLE_PLATFORM32"
    3.52      ;;
    3.53    *)
    3.54 -    ML_PLATFORM="$ISABELLE_PLATFORM32"
    3.55 +    PLATFORMS="$ISABELLE_PLATFORM32 $ISABELLE_PLATFORM64"
    3.56      ;;
    3.57  esac
    3.58  
    3.59 -case "$ML_PLATFORM" in
    3.60 -  x86_64-windows)
    3.61 -    ML_OPTIONS="-H 1000 --codepage utf8"
    3.62 -    ;;
    3.63 -  x86-windows)
    3.64 -    ML_OPTIONS="-H 500 --codepage utf8"
    3.65 -    ;;
    3.66 -  x86_64-*)
    3.67 -    ML_OPTIONS="-H 1000"
    3.68 -    ;;
    3.69 -  *)
    3.70 -    ML_OPTIONS="-H 500"
    3.71 -    ;;
    3.72 -esac
    3.73 +
    3.74 +# check executable
    3.75 +
    3.76 +unset ML_HOME
    3.77 +
    3.78 +for PLATFORM in $PLATFORMS
    3.79 +do
    3.80 +  if [ -z "$ML_HOME" ]
    3.81 +  then
    3.82 +    if "$POLYML_HOME/$PLATFORM/polyml" -v >/dev/null 2>/dev/null
    3.83 +    then
    3.84 +
    3.85 +      # ML settings
    3.86 +
    3.87 +      ML_SYSTEM=polyml-5.5.3
    3.88 +      ML_PLATFORM="$PLATFORM"
    3.89 +      ML_HOME="$POLYML_HOME/$ML_PLATFORM"
    3.90 +      ML_SOURCES="$POLYML_HOME/src"
    3.91  
    3.92 -ML_HOME="$POLYML_HOME/$ML_PLATFORM"
    3.93 -ML_SOURCES="$POLYML_HOME/src"
    3.94 +      case "$ML_PLATFORM" in
    3.95 +        x86_64-windows)
    3.96 +          ML_OPTIONS="-H 1000 --codepage utf8"
    3.97 +          ;;
    3.98 +        x86-windows)
    3.99 +          ML_OPTIONS="-H 500 --codepage utf8"
   3.100 +          ;;
   3.101 +        x86_64-*)
   3.102 +          ML_OPTIONS="-H 1000"
   3.103 +          ;;
   3.104 +        *)
   3.105 +          ML_OPTIONS="-H 500"
   3.106 +          ;;
   3.107 +      esac
   3.108 +
   3.109 +    fi
   3.110 +  fi
   3.111 +done
   3.112 +
   3.113 +unset PLATFORM
   3.114 +unset PLATFORMS
     4.1 --- a/NEWS	Fri Sep 11 17:48:49 2015 +0200
     4.2 +++ b/NEWS	Fri Sep 11 17:57:34 2015 +0200
     4.3 @@ -344,6 +344,10 @@
     4.4  
     4.5  *** System ***
     4.6  
     4.7 +* Poly/ML default platform architecture may be changed from 32bit to
     4.8 +64bit via system option ML_system_64. A system restart (and rebuild)
     4.9 +is required after change.
    4.10 +
    4.11  * Poly/ML 5.5.3 runs natively on x86-windows and x86_64-windows,
    4.12  which both allow larger heap space than former x86-cygwin.
    4.13  
     5.1 --- a/etc/options	Fri Sep 11 17:48:49 2015 +0200
     5.2 +++ b/etc/options	Fri Sep 11 17:57:34 2015 +0200
     5.3 @@ -107,6 +107,9 @@
     5.4  public option ML_statistics : bool = true
     5.5    -- "ML run-time system statistics"
     5.6  
     5.7 +public option ML_system_64 : bool = false
     5.8 +  -- "ML system for 64bit platform is used if possible (change requires restart)"
     5.9 +
    5.10  
    5.11  section "Editor Reactivity"
    5.12