[Lunar-commits] r18944 - in moonbase/trunk: compilers/gcc/plugin.d distributed/distcc/plugin.d utils/ccache/plugin.d
Auke Kok
sofar at lunar-linux.org
Tue Feb 28 18:38:31 UTC 2006
Author: sofar
Date: 2006-02-28 18:38:25 +0000 (Tue, 28 Feb 2006)
New Revision: 18944
Modified:
moonbase/trunk/compilers/gcc/plugin.d/optimize-gcc_3_4.plugin
moonbase/trunk/distributed/distcc/plugin.d/optimize-distcc.plugin
moonbase/trunk/utils/ccache/plugin.d/optimize-ccache.plugin
Log:
- FPU/FPM fix
- making the menu's work a bit more intuitive
Modified: moonbase/trunk/compilers/gcc/plugin.d/optimize-gcc_3_4.plugin
===================================================================
--- moonbase/trunk/compilers/gcc/plugin.d/optimize-gcc_3_4.plugin 2006-02-28 17:24:47 UTC (rev 18943)
+++ moonbase/trunk/compilers/gcc/plugin.d/optimize-gcc_3_4.plugin 2006-02-28 18:38:25 UTC (rev 18944)
@@ -123,7 +123,7 @@
esac
done
- case $FPU in
+ case $FPM in
x387) c_cxx_flags_add "-mfpmath=387" ;;
SSE) c_cxx_flags_add "-mfpmath=sse" ;;
Both) c_cxx_flags_add "-mfpmath=sse,387" ;;
@@ -144,11 +144,19 @@
esac
done
+ CC=gcc
+ CXX=g++
+ CPP=cpp
+
export BUILD
export COPT CCOPT
export CFLAGS CXXFLAGS CPPFLAGS
+ export CC CXX CPP
verbose_msg "BUILD=\"$BUILD\""
+ verbose_msg "CC=\"$CC\""
+ verbose_msg "CXX=\"$CXX\""
+ verbose_msg "CPP=\"$CPP\""
verbose_msg "CFLAGS=\"$CFLAGS\""
verbose_msg "CXXFLAGS=\"$CXXFLAGS\""
verbose_msg "CPPFLAGS=\"$CPPFLAGS\""
@@ -220,8 +228,13 @@
while true; do
unset OPTIONS
+ IS_DEFAULT=$([ `get_local_config LUNAR_COMPILER` == "GCC_3_4" ] && echo DEFAULT || get_local_config LUNAR_COMPILER)
DEFAULT=${CHOICE:-safe}
- CHOICE=`$DIALOG --title "$TITLE" --ok-label "Select" --cancel-label "Close" --default-item "$DEFAULT" --item-help --menu "" 0 0 0 "default" "Set this compiler as the default compiler" "Attempt to compile all lunar modules with this compiler from now on" $(if [ "$SAFE_OPTIMIZATIONS" == "off" ] ; then
+ CHOICE=`$DIALOG --title "$TITLE" --ok-label "Select" --cancel-label "Close" --default-item "$DEFAULT" --item-help --menu "" 0 0 0 $(
+ echo "default"
+ echo "Set this compiler as default [$IS_DEFAULT]"
+ echo "Enables you to substitute the default C compiler"
+ if [ "$SAFE_OPTIMIZATIONS" == "off" ] ; then
echo "safe"
echo "Turn on optimization safety [$SAFE_OPTIMIZATIONS]"
echo "Only allow safe optimizations (removes dangerous settings!)"
@@ -266,8 +279,10 @@
case $CHOICE in
default)
- set_local_config LUNAR_COMPILER GCC_3_4
- $DIALOG --msgbox "Gcc 3.4 is now the default compiler!" 6 60
+ if [ "$IS_DEFAULT" != "DEFAULT" ]; then
+ set_local_config LUNAR_COMPILER GCC_3_4
+ $DIALOG --msgbox "Gcc 3.4 is now the default compiler!" 6 60
+ fi
;;
safe)
if [ "$SAFE_OPTIMIZATIONS" == "off" ]; then
Modified: moonbase/trunk/distributed/distcc/plugin.d/optimize-distcc.plugin
===================================================================
--- moonbase/trunk/distributed/distcc/plugin.d/optimize-distcc.plugin 2006-02-28 17:24:47 UTC (rev 18943)
+++ moonbase/trunk/distributed/distcc/plugin.d/optimize-distcc.plugin 2006-02-28 18:38:25 UTC (rev 18944)
@@ -5,9 +5,7 @@
plugin_distcc_optimize()
{
- if [ -f /etc/lunar/local/optimizations.DISTCC ]; then
- . /etc/lunar/local/optimizations.DISTCC
- fi
+ . /etc/lunar/local/optimizations.DISTCC
if [ "$USE_DISTCC" == "yes" ]; then
# we append distcc in case ccache is also used to
@@ -55,24 +53,26 @@
export IFS=$'\t\n'
TITLE="Lunar Distcc Optimizations"
- RESULT=`$DIALOG --menu "Use the Distributed C Compiler program distcc?" 0 0 0 "USE_DISTCC" "Enable/disable the Compiler Cache ? [$(if [ $USE_DISTCC == 'yes' ]; then echo ENABLED ; else echo DISABLED; fi)]" "DISTCC_HOSTS" "Select remote target hosts..."`
- if [ $? != 0 ]; then
- return
- elif [ "$RESULT" == "USE_DISTCC" ]; then
- if [ $USE_DISTCC == 'yes' ]; then
- USE_DISTCC=no
- else
- USE_DISTCC=yes
- fi
- save_optimizations
- elif [ "$RESULT" == "DISTCC_HOSTS" ]; then
- DISTCC_HOSTS=`$DIALOG --inputbox "Enter a list of hosts as hostnames or IP addresses (see man distcc)" 9 60 $DISTCC_HOSTS`
+ while true; do
+ RESULT=`$DIALOG --cancel-label "Close" --menu "Use the Distributed C Compiler program distcc?" 0 0 0 "USE_DISTCC" "Use the distributed compiler [$USE_DISTCC]" "DISTCC_HOSTS" "Select remote target hosts..."`
if [ $? != 0 ]; then
- return
- else
+ break
+ elif [ "$RESULT" == "USE_DISTCC" ]; then
+ if [ $USE_DISTCC == 'yes' ]; then
+ USE_DISTCC=no
+ else
+ USE_DISTCC=yes
+ fi
save_optimizations
+ elif [ "$RESULT" == "DISTCC_HOSTS" ]; then
+ DISTCC_HOSTS=`$DIALOG --inputbox "Enter a list of hosts as hostnames or IP addresses (see man distcc)" 9 60 $DISTCC_HOSTS`
+ if [ $? != 0 ]; then
+ continue
+ else
+ save_optimizations
+ fi
fi
- fi
+ done
}
Modified: moonbase/trunk/utils/ccache/plugin.d/optimize-ccache.plugin
===================================================================
--- moonbase/trunk/utils/ccache/plugin.d/optimize-ccache.plugin 2006-02-28 17:24:47 UTC (rev 18943)
+++ moonbase/trunk/utils/ccache/plugin.d/optimize-ccache.plugin 2006-02-28 18:38:25 UTC (rev 18944)
@@ -5,9 +5,7 @@
plugin_ccache_optimize()
{
- if [ -f /etc/lunar/local/optimizations.CCACHE ]; then
- . /etc/lunar/local/optimizations.CCACHE
- fi
+ . /etc/lunar/local/optimizations.CCACHE
if [ "$USE_CCACHE" == "yes" ]; then
# we PRE-pend ccache in case distcc is also used to
@@ -52,15 +50,19 @@
export IFS=$'\t\n'
TITLE="Lunar CCache Optimizations"
- RESULT=`$DIALOG --menu "Use the C Compiler Cache program ccache? This will speed up subsequent compiliation of any module, at a small price." 0 0 0 "USE_CCACHE" "Enable/disable the Compiler Cache ? [$(if [ $USE_CCACHE == 'yes' ]; then echo ENABLED ; else echo DISABLED; fi)]"`
- if [ $? == 0 ]; then
- if [ $USE_CCACHE == 'yes' ]; then
- USE_CCACHE=no
+ while true; do
+ RESULT=`$DIALOG --cancel-label "Close" --menu "Use the C Compiler Cache program ccache? This will speed up subsequent compiliation of any module, at a small price." 0 0 0 "USE_CCACHE" "Use the Compiler Cache [$USE_CCACHE]"`
+ if [ $? != 0 ]; then
+ break
else
- USE_CCACHE=yes
+ if [ $USE_CCACHE == 'yes' ]; then
+ USE_CCACHE=no
+ else
+ USE_CCACHE=yes
+ fi
+ save_optimizations
fi
- save_optimizations
- fi
+ done
}
More information about the Lunar-commits
mailing list