[Lunar-commits] <moonbase> Squashed commit of the following:

Samuel Verstraete elangelo at lunar-linux.org
Wed Sep 23 15:24:02 CEST 2009


commit d04190de9cea9fdb2cf23799bfa6fbc0cc1bb16c
Author: Samuel Verstraete <elangelo at lunar-linux.org>
Date:   Wed Sep 23 15:24:02 2009 +0200

    Squashed commit of the following:
    
    commit e137886d5df969db7c029fa4478137948ae78d17
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Wed Sep 23 11:51:53 2009 +0200
    
        kernel-headers: version bump
    
    commit 6c78c27e97b782b7bbdbb8aaba62fb82c5785ca6
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Wed Sep 23 10:28:51 2009 +0200
    
        linux-2.6-stable... let's project the stable in the present
    
    commit b40508c6e62a3a910a0eabde7ea6f5bbd086b9ec
    Merge: 3c45223 d625caa
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Wed Sep 23 08:46:43 2009 +0200
    
        Merge branch 'master' into gcc44
    
        Conflicts:
        	libs/boost/BUILD
    
    commit 3c45223e705820b284ca0671a1cdb5d65c64f415
    Merge: e01e14b da4ef92
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Tue Aug 25 11:14:33 2009 +0200
    
        Merge branch 'master' into gcc44
    
        Conflicts:
        	libs/boost/BUILD
    
    commit e01e14b12da930e110b99dbad0fd4920643e13ba
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Fri Aug 14 14:02:15 2009 +0200
    
        boost: make it build goddmanit!
    
    commit 5d8b9679e9f742703b3bb9c31b1318b5e030b97a
    Merge: d6ccd35 bc7f075
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Fri Aug 14 08:36:22 2009 +0200
    
        Merge branch 'master' into gcc44
    
    commit d6ccd353eae6684912bf388955f884812733c7ea
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Thu Aug 13 10:39:33 2009 +0200
    
        bison: 2.4.1
    
    commit 92ce8efc672297215efc380a306bd0b8a2fdc3cd
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Thu Aug 13 10:36:49 2009 +0200
    
        readline: 6.0
    
    commit 9e88cff0d1de5f17a329163483c4edae810140c6
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Wed Aug 12 22:00:25 2009 +0200
    
        binutils: x86_64
    
    commit 33c3008da91c11eb5d82c89c46dec44d3f00b49a
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Thu Aug 13 10:34:20 2009 +0200
    
        binutils: 2.19.1
    
        Conflicts:
    
        	devel/binutils/BUILD
        	devel/binutils/DETAILS
    
    commit 213e2e0d0b25f59db7eee96b7b389524645063d1
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Wed Aug 5 14:51:19 2009 +0200
    
        no gcc 4.2 plugin
    
    commit f593fc3f257686a47b447a1dd1a70fd35ed95787
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Wed Aug 5 14:50:59 2009 +0200
    
        added the optimization thing
    
    commit 0b0ff67b579fe2e751095c5ca374167b09429248
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Wed Aug 5 14:45:34 2009 +0200
    
        gcc: 4.4.1
    
    commit e26450a53e0fcc9a19528ce416f6d0f4324203c3
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Thu Aug 13 10:27:52 2009 +0200
    
        glibc: 2.10.1
    
    commit 986295314e14290bf73e02a8362c12b5ad8d1cf2
    Author: Samuel Verstraete <elangelo at lunar-linux.org>
    Date:   Wed Aug 5 14:50:12 2009 +0200
    
        glibc: something newer !
---
 compilers/gcc/BUILD                            |   15 +-
 compilers/gcc/BUILD.x86_64                     |   13 +-
 compilers/gcc/CONFIGURE                        |   12 +-
 compilers/gcc/DEPENDS                          |    3 +-
 compilers/gcc/DETAILS                          |    6 +-
 compilers/gcc/POST_INSTALL                     |   14 +-
 compilers/gcc/plugin.d/optimize-gcc_4_2.plugin |  524 -----------------------
 compilers/gcc/plugin.d/optimize-gcc_4_4.plugin |  526 ++++++++++++++++++++++++
 devel/binutils/BUILD                           |   24 +-
 devel/binutils/BUILD.sparc64                   |    7 +-
 devel/binutils/BUILD.x86_64                    |   12 +
 devel/binutils/DETAILS                         |   15 +-
 devel/bison/DETAILS                            |   14 +-
 devel/vde2/BUILD                               |    7 +
 kernel/kernel-headers-2.6/DETAILS              |    6 +-
 kernel/kernel-headers-2.6/DETAILS.x86_64       |    6 +-
 kernel/linux-2.6-stable/BUILD                  |    4 +-
 kernel/linux-2.6-stable/DETAILS                |    9 +-
 kernel/linux-2.6-stable/POST_INSTALL           |    2 +-
 libs/glibc/BUILD                               |  117 +++---
 libs/glibc/BUILD.x86_64                        |  123 +++---
 libs/glibc/CONFIGURE                           |    8 +-
 libs/glibc/DETAILS                             |   24 +-
 libs/glibc/PRE_BUILD                           |    6 +-
 libs/readline/BUILD                            |   22 +-
 libs/readline/DETAILS                          |   12 +-
 libs/readline/POST_INSTALL                     |    4 +-
 27 files changed, 767 insertions(+), 768 deletions(-)

diff --git a/compilers/gcc/BUILD b/compilers/gcc/BUILD
index fe306a7..7fcc411 100644
--- a/compilers/gcc/BUILD
+++ b/compilers/gcc/BUILD
@@ -3,17 +3,14 @@
   mkdir BUILD  &&
   cd BUILD     &&
 
-  sedit 's/trap 0/trap "" 0/' ../configure  &&
+  #sedit 's/trap 0/trap "" 0/' ../configure  &&
   # We use libiberty.a from binutils instead
-  sedit 's/install_to_$(INSTALL_DEST) //' ../libiberty/Makefile.in &&
+  sedit 's/install_to_$(INSTALL_DEST) //' ../libiberty/Makefile.in  &&
 
-  LANGUAGES="${LANGUAGES:=c++}" &&
+  LANGUAGES="${LANGUAGES:=c++}"  &&
 
-  if in_depends gcc mpfr ; then
-    LANGUAGES="${LANGUAGES},fortran"
-  fi
-
-  ../configure --host=$BUILD                          \
+  ../configure --build=$BUILD                         \
+               --host=$BUILD                          \
                --enable-languages=$LANGUAGES          \
                --prefix=${MODULE_PREFIX}              \
                --infodir=${MODULE_PREFIX}/share/info  \
@@ -25,7 +22,7 @@
                --with-gnu-ld                          \
                --with-system-zlib                     \
                --enable-shared                        \
-               $OPTS &&
+               $OPTS                                 &&
 
   make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap-lean  &&
   prepare_install  && 
diff --git a/compilers/gcc/BUILD.x86_64 b/compilers/gcc/BUILD.x86_64
index 34a04f7..6ed319d 100644
--- a/compilers/gcc/BUILD.x86_64
+++ b/compilers/gcc/BUILD.x86_64
@@ -3,17 +3,14 @@
   mkdir BUILD  &&
   cd BUILD     &&
 
-  sedit 's/trap 0/trap "" 0/' ../configure  &&
+  #sedit 's/trap 0/trap "" 0/' ../configure  &&
   # We use libiberty.a from binutils instead
-  sedit 's/install_to_$(INSTALL_DEST) //' ../libiberty/Makefile.in &&
+  sedit 's/install_to_$(INSTALL_DEST) //' ../libiberty/Makefile.in  &&
 
-  LANGUAGES=${LANGUAGES:=c++} &&
-
-  if in_depends gcc mpfr ; then
-    LANGUAGES="${LANGUAGES},fortran"
-  fi
+  LANGUAGES=${LANGUAGES:=c++}  &&
 
   ../configure --host=$BUILD                          \
+               --build=$BUILD                         \
                --enable-languages=$LANGUAGES          \
                --prefix=${MODULE_PREFIX}              \
                --infodir=${MODULE_PREFIX}/share/info  \
@@ -26,7 +23,7 @@
                --with-system-zlib                     \
                --enable-shared                        \
                --disable-multilib                     \
-               $OPTS &&
+               $OPTS                                 &&
 
   make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap-lean  &&
   prepare_install  && 
diff --git a/compilers/gcc/CONFIGURE b/compilers/gcc/CONFIGURE
index 176efa1..79b186a 100644
--- a/compilers/gcc/CONFIGURE
+++ b/compilers/gcc/CONFIGURE
@@ -9,12 +9,13 @@ if [ -n "$RECONFIGURE" ] ; then
     OPTIONS=(
       "java"    "Java"        "off"
       "objc"    "Objective C" "off"
+      "fortran" "Fortran"     "off"
     )
-    RESULT=`dialog --title "Select additional compiler languages"   \
-                   --stdout                                         \
-                   --separate-output                                \
-                   --checklist  "Available additional languages:"   \
-                    0 0 0                                           \
+    RESULT=`dialog --title "Select additional compiler languages"  \
+                   --stdout                                        \
+                   --separate-output                               \
+                   --checklist  "Available additional languages:"  \
+                    0 0 0                                          \
                    "${OPTIONS[@]}"`
 
     LANGUAGES="c++,$(echo $RESULT | sed 's/ /,/g')"
@@ -29,4 +30,3 @@ if [ -n "$RECONFIGURE" ] ; then
   fi
 
 fi
-
diff --git a/compilers/gcc/DEPENDS b/compilers/gcc/DEPENDS
index 858cf14..ae64c3c 100644
--- a/compilers/gcc/DEPENDS
+++ b/compilers/gcc/DEPENDS
@@ -1 +1,2 @@
-optional_depends "mpfr" "" "" "to compile fortran support"
+depends gmp
+depends mpfr
diff --git a/compilers/gcc/DETAILS b/compilers/gcc/DETAILS
index 91ae188..1174072 100644
--- a/compilers/gcc/DETAILS
+++ b/compilers/gcc/DETAILS
@@ -1,13 +1,13 @@
           MODULE=gcc
-         VERSION=4.2.4
+         VERSION=4.4.1
           SOURCE=$MODULE-$VERSION.tar.bz2
    SOURCE_URL[0]=$GNU_URL/gcc/$MODULE-$VERSION
    SOURCE_URL[1]=ftp://ftp.gnu.org/pub/gnu/gcc/$MODULE-$VERSION
    SOURCE_URL[2]=http://www.online-mirror.org/gcc/$MODULE-$VERSION
-      SOURCE_VFY=sha1:bb20efc7750fe0d6172c5945572bf036fe59d3dd
+      SOURCE_VFY=sha1:9156ddb7e4cc72288ec31760d6ddc7981123a8a2
         WEB_SITE=http://gcc.gnu.org
          ENTERED=20020628
-         UPDATED=20080523
+         UPDATED=20090801
            PSAFE=no
            SHORT="GNU compiler collection"
 
diff --git a/compilers/gcc/POST_INSTALL b/compilers/gcc/POST_INSTALL
index c3e8185..6179464 100644
--- a/compilers/gcc/POST_INSTALL
+++ b/compilers/gcc/POST_INSTALL
@@ -1,14 +1,8 @@
-# allow seamless upgrade/downgrade from/to gcc <=> gcc3
-if module_installed gcc3 ; then
-  remove_module gcc3
-fi
-
-cd /usr/lib/gcc/$BUILD/$VERSION                          &&
-ln    -sf /usr/bin/cpp cpp                               &&
-cd /lib/                                                 &&
-ln    -sf /usr/bin/cpp cpp                               && 
+cd /usr/lib/gcc/$BUILD/$VERSION  &&
+ln    -sf /usr/bin/cpp cpp       &&
+cd /lib/                         &&
+ln    -sf /usr/bin/cpp cpp       && 
 
 if [ ! -e /usr/bin/cc ] ; then
   ln -s gcc /usr/bin/cc
 fi || true
-
diff --git a/compilers/gcc/plugin.d/optimize-gcc_4_2.plugin b/compilers/gcc/plugin.d/optimize-gcc_4_2.plugin
deleted file mode 100644
index 8220ab2..0000000
--- a/compilers/gcc/plugin.d/optimize-gcc_4_2.plugin
+++ /dev/null
@@ -1,524 +0,0 @@
-#
-# gcc-4.2.x compiler optimizations plugin
-#
-
-plugin_compiler_gcc_4_2_optimize()
-{
-  if [ "${LUNAR_COMPILER:-GCC_4_2}" != "GCC_4_2" ]; then
-    return 2
-  fi
-
-  debug_msg "plugin_compiler_gcc_4_2_optimize($@)"
-  if [ -f /etc/lunar/local/optimizations.GCC_4_2 ]; then
-    . /etc/lunar/local/optimizations.GCC_4_2
-  fi
-
-  # some local macro's
-  cflags_add()
-  {
-    CFLAGS="$CFLAGS $@"
-  }
-
-  cxxflags_add()
-  {
-    CXXFLAGS="$CXXFLAGS $@"
-  }
-
-  cppflags_add()
-  {
-    CPPFLAGS="$CPPFLAGS $@"
-  }
-
-  c_cxx_flags_add()
-  {
-    cflags_add $@
-    cxxflags_add $@
-  }
-
-  # CFLAGS/CXXFLAGS - base optimization
-  case $BOPT in
-    None)    c_cxx_flags_add "-O0" ;;
-    Small)   c_cxx_flags_add "-Os" ;;
-    Fast)    c_cxx_flags_add "-O1" ;;
-    Faster)  c_cxx_flags_add "-O2" ;;
-    Fastest) c_cxx_flags_add "-O3" ;;
-  esac
-
-  # CFLAGS -march cpu-specific optimization
-  if [ -n "$CPU" ]; then
-    c_cxx_flags_add "-march=$CPU"
-  fi
-
-  # GCC specific extra optimizations
-  for SP in ${SPD[@]}; do
-    case $SP in
-      Speedy)   c_cxx_flags_add "-funroll-loops" ;;
-      Regparm)  c_cxx_flags_add "-mregparm=3" ;;
-      Risky)    c_cxx_flags_add "-ffast-math" ;;
-      Pointers) c_cxx_flags_add "-fomit-frame-pointer" ;;
-      Siblings) c_cxx_flags_add "-foptimize-sibling-calls" ;;
-      Profiling)
-        c_cxx_flags_add "-fprofile-arcs"
-        set_local_config "KEEP_SOURCE" "on"
-      ;;
-      Branching) c_cxx_flags_add "-fbranch-probabilities" ;;
-      Aliasing)  c_cxx_flags_add "-fstrict-aliasing" ;;
-      Cprop)     c_cxx_flags_add "-fno-cprop-registers" ;;
-      Float)     c_cxx_flags_add "-ffloat-store" ;;
-      Address)   c_cxx_flags_add "-fforce-addr" ;;
-      Align)     c_cxx_flags_add "-falign-functions -falign-loops -falign-jumps" ;;
-      Expensive) c_cxx_flags_add "-fexpensive-optimizations" ;;
-      Doubles)   c_cxx_flags_add "-malign-double" ;;
-      Tracer)    c_cxx_flags_add "-ftracer" ;;
-      Blocks)    c_cxx_flags_add "-freorder-blocks" ;;
-    esac
-  done
-
-  # STACK - kind of dangerous - shouldn't we just remove this?
-  if (( STACK > 0 )) ; then
-    c_cxx_flags_add "-mpreferred-stack-boundary=$STACK"
-    cppflags_add "-mpreferred-stack-boundary=$STACK"
-  fi
-
-  for XTR in ${XTRA[@]}; do
-    case $XTR in
-      MMX)     c_cxx_flags_add "-mmmx" ;;
-      SSE)     c_cxx_flags_add "-msse" ;;
-      SSE2)    c_cxx_flags_add "-msse2" ;;
-      SSE3)    c_cxx_flags_add "-msse3" ;;
-      dnow)    c_cxx_flags_add "-m3dnow" ;;
-      Altivec) c_cxx_flags_add "-maltivec" ;;
-    esac
-  done
-
-  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" ;;
-  esac
-
-  for OPT in ${CC_OPTS[@]}; do
-    case $OPT in
-      Deprecated)
-        cxxflags_add "-Wno-deprecated"
-        ;;
-      Debug)
-        c_cxx_flags_add "-g"
-        ;;
-      Pipe)
-        c_cxx_flags_add "-pipe"
-        ;;
-    esac
-  done
-
-  CC=gcc
-  CXX=g++
-  CPP=cpp
-
-  export CFLAGS CXXFLAGS CPPFLAGS
-  export CC CXX CPP
- 
-  verbose_msg "CC=\"$CC\""
-  verbose_msg "CXX=\"$CXX\""
-  verbose_msg "CPP=\"$CPP\""
-  verbose_msg "CFLAGS=\"$CFLAGS\""
-  verbose_msg "CXXFLAGS=\"$CXXFLAGS\""
-  verbose_msg "CPPFLAGS=\"$CPPFLAGS\""
-
-  return 2
-}
-
-
-plugin_compiler_gcc_4_2_menu()
-{
-  # The main code calls this function WITHOUT $1 to find out which
-  # compiler optimization plugins exist. It then returns the plugin
-  # identifier which can be saved in $LUNAR_COMPILER as the user's
-  # choice for COMPILERS
-  if [ -z "$1" ]; then
-    echo "GCC_4_2"
-    echo "GNU C Compiler suite version 4.2.x"
-    return 2
-  elif [ "$1" != "GCC_4_2" ]; then
-    # we don't display anything when the user selected a
-    # different menu
-    return 2
-  fi
-
-  # now we are done with determining if we are really the menu
-  # that the user wants - so we can display it
-  menu() 
-  { 
-    unset RESULT
-    if [ "$1" == "checklist" ]; then
-      RESULT=`$DIALOG --no-cancel --item-help --separate-output --checklist "$2" 0 0 0 "${OPTIONS[@]}"`
-      if [ $? != 0 ]; then
-        return 1
-      fi
-    elif [ "$1" == "radiolist" ]; then
-      RESULT=`$DIALOG --no-cancel --item-help --radiolist "$2" 0 0 0 "${OPTIONS[@]}"`
-      if [ $? != 0 ]; then
-        return 1
-      fi
-    fi
-    RESULT=$(echo $RESULT | sed -e 's:^"::' -e 's:"$::')
-    return 0
-  }
-
-  save_optimizations()
-  {
-    debug_msg "save_optimizations($@)"
-    cat >/etc/lunar/local/optimizations.GCC_4_2  <<EOF
-CPU=$CPU
-BOPT=$BOPT
-SPD=( $(echo ${SPD[@]} ) )
-XTRA=( $(echo ${XTRA[@]}) )
-FPM=$FPM
-CC_OPTS=( $(echo ${CC_OPTS[@]} ) )
-STACK=$STACK
-EOF
-  }
-
-  if [ -f /etc/lunar/local/optimizations.GCC_4_2 ]; then
-    . /etc/lunar/local/optimizations.GCC_4_2
-  fi
-
-  export IFS=$'\t\n'
-  TITLE="Lunar Compiler Optimizations"
-
-  SAFE_OPTIMIZATIONS=${SAFE_OPTIMIZATIONS:-on}
-
-  while true; do
-    unset OPTIONS
-    IS_DEFAULT=$([ `get_local_config LUNAR_COMPILER` == "GCC_4_2" ] && 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 $(
-      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!)"
-      else
-        echo "safe"
-        echo "Turn off optimization safety  [$SAFE_OPTIMIZATIONS]"
-        echo "Allow potentially unsafe optimizations (DANGEROUS!)"
-      fi
-      echo "bopt"
-      echo "Base speed optimization       [$BOPT]"
-      echo "Select the base optimization from -Os, -O0, -O1 etc"
-      echo "cpu"
-      echo "CPU selection                 [$CPU]"
-      echo "Select the target CPU type"
-      if [ "$SAFE_OPTIMIZATIONS" == "off" ] ; then
-        echo "xtra"
-        echo "CPU extensions                [${XTRA[@]}]"
-        echo "Select CPU extensions"
-        echo "spd"
-        echo "Specialized optimizations     [${SPD[@]}]"
-        echo "Select specific compiler flags for expensive and risky optimizations"
-        echo "fpm"
-        echo "Floating point optimizations  [$FPM]"
-        echo "enable specific floating point optimizations"
-      fi
-      echo "cc_opt"
-      echo "General C/C++ options         [${CC_OPTS[@]}]"
-      echo "Select named pipes, warnings on deprecated symbols"
-      if [ "$SAFE_OPTIMIZATIONS" == "off" ] ; then
-        echo "stack"
-        echo "Stack                         [$STACK]"
-        echo "Set the stack size"
-      fi) `
-      if [ $? != 0 ]; then
-        save_optimizations
-        set_local_config SAFE_OPTIMIZATIONS $SAFE_OPTIMIZATIONS
-        return
-      fi
-
-      case $CHOICE in 
-        default)
-          if [ "$IS_DEFAULT" != "DEFAULT" ]; then
-            set_local_config LUNAR_COMPILER GCC_4_2
-            $DIALOG --msgbox "Gcc 4.2 is now the default compiler!" 6 60
-          fi
-          ;;
-        safe)
-          if [ "$SAFE_OPTIMIZATIONS" == "off" ]; then
-            SAFE_OPTIMIZATIONS=on
-            unset SPD XTRA STACK
-            FPM=("None")
-            BOPT=${BOPT//Fastest/Faster}
-          else
-            $DIALOG --defaultno --yes-label "No" --no-label "Yes" --colors --yesno " \Z1*** WARNING ***\n\n\ZnPlease read this carefully. You are about to turn off the optimization safety. This means that you can possibly turn on compiler or linker optimizations that can and will break your box. Not only will the problem most likely occur only days, weeks or months after you turn this switch, but also it can corrupt all your personal data, make your machine unbootable, and cause serious personal distress, headache, loss of vision, heart failure, loss of income, or otherwise very bad things. Before you turn off this option, please think for yourself for a minute and ask yourself: Is it worth it?\n\nOnly use safe optimizations?" 20 70
-            if [ $? == 0 ]; then
-              SAFE_OPTIMIZATIONS=off
-            fi
-          fi
-        ;;
-        bopt)
-          OPTIONS=(
-            "None" "-O0" $( [ "$BOPT" == "None" ] && echo "on" || echo "off" ) "Only default optimizations"
-            "Fast" "-O1" $( [ "$BOPT" == "Fast" ] && echo "on" || echo "off" ) "-O1"
-            "Faster" "-O2" $( [ "$BOPT" == "Faster" ] && echo "on" || echo "off" ) "-O2"
-            "Fastest" "-O3" $( [ "$BOPT" == "Fastest" ] && echo "on" || echo "off" ) "-O3"
-            "Small" "-Os" $( [ "$BOPT" == "Small" ] && echo "on" || echo "off" ) "-Os"
-            )
-          menu radiolist "Choose the base compile-time optimization. Most people will use -O2 or -O3. Note that some modules set their own level." &&
-          BOPT=$RESULT
-        ;;
-        cpu)
-          case $PLATFORM in
-            x86)
-              OPTIONS=(
-                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
-                "i386" "i386" $( [ "$CPU" == "i386" ] && echo "on" || echo "off" ) "i386 processors"
-                "i486" "i486" $( [ "$CPU" == "i486" ] && echo "on" || echo "off" ) "i486 processors"
-                "i586" "i586 (Pentium)" $( [ "$CPU" == "i586" ] && echo "on" || echo "off" ) "i586 processors, identical to 'pentium'"
-                "pentium-mmx" "pentium-mmx" $( [ "$CPU" == "pentium-mmx" ] && echo "on" || echo "off" ) "Pentium processors with mmx"
-                "i686" "i686 (PentiumPro)" $( [ "$CPU" == "i686" ] && echo "on" || echo "off" ) "i686 processors, identical to 'pentiumpro'"
-                "pentium2" "P2" $( [ "$CPU" == "pentium2" ] && echo "on" || echo "off" ) "Pentium II processors"
-                "pentium3" "P3 (Celeron)" $( [ "$CPU" == "pentium3" ] && echo "on" || echo "off" ) "Pentium III processors"
-                "pentium3m" "P3 mobile (Celeron)" $( [ "$CPU" == "pentium3m" ] && echo "on" || echo "off" ) "Pentium III Mobile processors"
-                "pentium-m" "P3 mobile (Celeron) Low power version" $( [ "$CPU" == "pentium-m" ] && echo "on" || echo "off" ) "Pentium III Mobile processor - low power versions"
-                "pentium4" "P4" $( [ "$CPU" == "pentium4" ] && echo "on" || echo "off" ) "Pentium 4 processors"
-                "pentium4m" "P4 mobile" $( [ "$CPU" == "pentium4m" ] && echo "on" || echo "off" ) "Pentium 4 mobile processors"
-                "prescott" "Xeon" $( [ "$CPU" == "prescott" ] && echo "on" || echo "off" ) "Newer Xeons with sse3"
-                "nocona" "nocona" $( [ "$CPU" == "nocona" ] && echo "on" || echo "off" ) "Newer Xeons with sse3 and em64t"
-                "k6" "k6" $( [ "$CPU" == "k6" ] && echo "on" || echo "off" ) "AMD K6 processors"
-                "k6-2" "k6-2" $( [ "$CPU" == "k6-2" ] && echo "on" || echo "off" ) "AMD K6-2 processors"
-                "k6-3" "k6-3" $( [ "$CPU" == "k6-3" ] && echo "on" || echo "off" ) "AMD K6-3 processors"
-                "athlon" "athlon" $( [ "$CPU" == "athlon" ] && echo "on" || echo "off" ) "AMD Athlon processors"
-                "athlon-tbird" "athlon-tbird" $( [ "$CPU" == "athlon-tbird" ] && echo "on" || echo "off" ) "AMD Athlon Thunderbird processors"
-                "athlon-4" "athlon-4" $( [ "$CPU" == "athlon-4" ] && echo "on" || echo "off" ) "AMD Athlon 4 processors"
-                "athlon-xp" "athlon-xp" $( [ "$CPU" == "athlon-xp" ] && echo "on" || echo "off" ) "AMD Athlon XP processors"
-                "athlon-mp" "athlon-mp" $( [ "$CPU" == "athlon-mp" ] && echo "on" || echo "off" ) "AMD athlon MP processors"
-                "k8" "k8" $( [ "$CPU" == "k8" ] && echo "on" || echo "off" ) "AMD K8 processors"
-                "opteron" "opteron" $( [ "$CPU" == "opteron" ] && echo "on" || echo "off" ) "AMD opteron processors"
-                "athlon64" "athlon64" $( [ "$CPU" == "athlon64" ] && echo "on" || echo "off" ) "AMD Athlon 64 processors"
-                "athlon-fx" "athlon-fx" $( [ "$CPU" == "athlon-fx" ] && echo "on" || echo "off" ) "AMD Athlon fx processors"
-                "winchip-c6" "winchip-c6" $( [ "$CPU" == "winchip-c6" ] && echo "on" || echo "off" ) "IDT Winchip C6 CPU (a 486)"
-                "winchip2" "winchip2" $( [ "$CPU" == "winchip2" ] && echo "on" || echo "off" ) "IDT Winchip2 CPU (a 486)"
-                "c3" "c3" $( [ "$CPU" == "c3" ] && echo "on" || echo "off" ) "Via C3 CPU with MMX and 3dNOW"
-                "c3-2" "c3-2" $( [ "$CPU" == "c3-2" ] && echo "on" || echo "off" ) "Via C3-2 CPU with MMX and SSE"
-                )
-            ;;
-            Alpha)
-              OPTIONS=(
-                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
-                "ev4" "ev4" $( [ "$CPU" == "ev4" ] && echo "on" || echo "off" ) "Alpha EV4 (21064)"
-                "ev45" "ev45" $( [ "$CPU" == "ev45" ] && echo "on" || echo "off" ) "Alpha EV45 (21064a)"
-                "ev5" "ev5" $( [ "$CPU" == "ev5" ] && echo "on" || echo "off" ) "Alpha EV5 (21164)"
-                "ev56" "ev56" $( [ "$CPU" == "ev56" ] && echo "on" || echo "off" ) "Alpha EV56 (21164a)"
-                "pca56" "pca56" $( [ "$CPU" == "pca56" ] && echo "on" || echo "off" ) "Alpha pca56 (21164PC)"
-                "ev6" "ev6" $( [ "$CPU" == "ev6" ] && echo "on" || echo "off" ) "Alpha EV6 (21264)"
-                "ev67" "ev67" $( [ "$CPU" == "ev67" ] && echo "on" || echo "off" ) "Alpha EV67 (21264a)"
-                "ev68" "ev68" $( [ "$CPU" == "ev68" ] && echo "on" || echo "off" ) "Alpha EV68 (21264b)"
-                )
-            ;;
-            PowerPC)
-              OPTIONS=(
-                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
-                "common" "common" $( [ "$CPU" == "common" ] && echo "on" || echo "off" ) "Common PowerPC"
-                "rios" "rios" $( [ "$CPU" == "rios" ] && echo "on" || echo "off" ) "Rios PowerPC"
-                "rios1" "rios1" $( [ "$CPU" == "rios1" ] && echo "on" || echo "off" ) "Rios1 PowerPC"
-                "rsc" "rsc" $( [ "$CPU" == "rsc" ] && echo "on" || echo "off" ) "RSC PowerPC"
-                "rios2" "rios2" $( [ "$CPU" == "rios2" ] && echo "on" || echo "off" ) "Rios2 PowerPC"
-                "rs64a" "rs64a" $( [ "$CPU" == "rs64a" ] && echo "on" || echo "off" ) "RS64a PowerPC"
-                "403" "403" $( [ "$CPU" == "403" ] && echo "on" || echo "off" ) "403 PowerPC"
-                "505" "505" $( [ "$CPU" == "505" ] && echo "on" || echo "off" ) "505 PowerPC"
-                "601" "601" $( [ "$CPU" == "601" ] && echo "on" || echo "off" ) "601 PowerPC"
-                "602" "602" $( [ "$CPU" == "602" ] && echo "on" || echo "off" ) "602 PowerPC"
-                "603" "603" $( [ "$CPU" == "603" ] && echo "on" || echo "off" ) "603 PowerPC"
-                "603a" "603a" $( [ "$CPU" == "603a" ] && echo "on" || echo "off" ) "603a PowerPC"
-                "604" "604" $( [ "$CPU" == "604" ] && echo "on" || echo "off" ) "604 PowerPC"
-                "604e" "604e" $( [ "$CPU" == "604e" ] && echo "on" || echo "off" ) "604e PowerPC"
-                "620" "620" $( [ "$CPU" == "620" ] && echo "on" || echo "off" ) "620 PowerPC"
-                "630" "630" $( [ "$CPU" == "630" ] && echo "on" || echo "off" ) "630 PowerPC"
-                "740" "740" $( [ "$CPU" == "740" ] && echo "on" || echo "off" ) "740 PowerPC"
-                "7400" "7400" $( [ "$CPU" == "7400" ] && echo "on" || echo "off" ) "7400 PowerPC"
-                "7450" "7450" $( [ "$CPU" == "7450" ] && echo "on" || echo "off" ) "7450 PowerPC"
-                "750" "750" $( [ "$CPU" == "750" ] && echo "on" || echo "off" ) "750 PowerPC"
-                "801" "801" $( [ "$CPU" == "801" ] && echo "on" || echo "off" ) "801 PowerPC"
-                "821" "821" $( [ "$CPU" == "821" ] && echo "on" || echo "off" ) "821 PowerPC"
-                "823" "823" $( [ "$CPU" == "823" ] && echo "on" || echo "off" ) "823 PowerPC"
-                "Power" "Power" $( [ "$CPU" == "Power" ] && echo "on" || echo "off" ) "Power PowerPC"
-                "Power2" "Power2" $( [ "$CPU" == "Power2" ] && echo "on" || echo "off" ) "Power2 PowerPC"
-                "PowerPC" "PowerPC" $( [ "$CPU" == "PowerPC" ] && echo "on" || echo "off" ) "IBM and Apple hardware (Power and PowerPC)"
-                )
-            ;;
-            SPARC)
-              OPTIONS=(
-                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
-                "v7" "v7" $( [ "$CPU" == "v7" ] && echo "on" || echo "off" ) "V7 SPARC"
-                "cypress" "cypress" $( [ "$CPU" == "cypress" ] && echo "on" || echo "off" ) "Cypress SPARC"
-                "v8" "v8" $( [ "$CPU" == "v8" ] && echo "on" || echo "off" ) "V8 SPARC"
-                "supersparc" "supersparc" $( [ "$CPU" == "supersparc" ] && echo "on" || echo "off" ) "SuperSPARC"
-                "sparclite" "sparclite" $( [ "$CPU" == "sparclite" ] && echo "on" || echo "off" ) "SPARCLite"
-                "hypersparc" "hypersparc" $( [ "$CPU" == "hypersparc" ] && echo "on" || echo "off" ) "HyperSPARC"
-                "sparclite86x" "sparclite86x" $( [ "$CPU" == "sparclite86x" ] && echo "on" || echo "off" ) "SPARCLite86x"
-                "f930" "f930" $( [ "$CPU" == "f930" ] && echo "on" || echo "off" ) "f930 SPARC"
-                "f934" "f934" $( [ "$CPU" == "f934" ] && echo "on" || echo "off" ) "f934 SPARC"
-                "sparclet" "sparclet" $( [ "$CPU" == "sparclet" ] && echo "on" || echo "off" ) "SPARCLet"
-                "tsc701" "tsc701" $( [ "$CPU" == "tsc701" ] && echo "on" || echo "off" ) "tsc701"
-                "v9" "v9" $( [ "$CPU" == "v9" ] && echo "on" || echo "off" ) "V9 SPARC"
-                "ultrasparc" "ultrasparc" $( [ "$CPU" == "ultrasparc" ] && echo "on" || echo "off" ) "ULTRASPARC"
-                )
-            ;;
-            x86_64)
-              OPTIONS=(
-                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
-                "x86-64" "x86-64" $( [ "$CPU" == "x86-64" ] && echo "on" || echo "off" ) "Both AMD64 and Intel EM64T machines"
-                "nocona" "nocona" $( [ "$CPU" == "nocona" ] && echo "on" || echo "off" ) "Newer Xeons with sse3 and em64t"
-                "k8" "k8" $( [ "$CPU" == "k8" ] && echo "on" || echo "off" ) "AMD K8 processors"
-                "opteron" "opteron" $( [ "$CPU" == "opteron" ] && echo "on" || echo "off" ) "AMD opteron processors"
-                "athlon64" "athlon64" $( [ "$CPU" == "athlon64" ] && echo "on" || echo "off" ) "AMD Athlon 64 processors"
-                "athlon-fx" "athlon-fx" $( [ "$CPU" == "athlon-fx" ] && echo "on" || echo "off" ) "AMD Athlon fx processors"
-                )
-            ;;
-          esac
-          menu radiolist "CPU, according to the kernel you have a$(cat /proc/cpuinfo | grep 'model name' | cut -d: -f2 | head -n 1). If you are unsure, use $(arch) - anything higher is not safe." &&
-          CPU=$RESULT
-        ;;
-        spd)
-          OPTIONS=(
-            "Speedy" "-funroll-loops" $( echo ${SPD[@]} | grep -q "Speedy" && echo "on" || echo "off" ) "Optimize to increase performance of generated code"
-            "Regparm" "-mregparm=3" $( echo ${SPD[@]} | grep -q "Regparm" && echo "on" || echo "off" ) "Pass up to 3 function arguments in registers instead of stack"
-            "Risky" "-ffast-math" $( echo ${SPD[@]} | grep -q "Risky" && echo "on" || echo "off" ) "Optimize to increase performance ... by violating ANSI and IEEE FP rules"
-            "Pointers" "-fomit-frame-pointer" $( echo ${SPD[@]} | grep -q "Pointers" && echo "on" || echo "off" ) "Optimize by omitting frame pointers"
-            "Siblings" "-foptimize-sibling-calls" $( echo ${SPD[@]} | grep -q "Siblings" && echo "on" || echo "off" ) "Optimize sibling calls"
-            "Profiling" "-fprofile-arcs" $( echo ${SPD[@]} | grep -q "Profiling" && echo "on" || echo "off" ) "Generate profiles (For later use with Branching)"
-            "Branching" "-fbranching-probabilities" $( echo ${SPD[@]} | grep -q "Branching" && echo "on" || echo "off" ) "Predict branching (For using profiled sources)"
-            "Aliasing" "-fstrict-aliasing" $( echo ${SPD[@]} | grep -q "Aliasing" && echo "on" || echo "off" ) "Enable strict aliasing (enabled by default -O1 and above)"
-            "Cprop" "-fno-cprop-registers" $( echo ${SPD[@]} | grep -q "Cprop" && echo "on" || echo "off" ) "Reduce scheduling dependencies and remove copies"
-            "Float" "-ffloat-store" $( echo ${SPD[@]} | grep -q "Float" && echo "on" || echo "off" ) "Enable float store"
-            "Address" "-fforce-addr" $( echo ${SPD[@]} | grep -q "Address" && echo "on" || echo "off" ) "Force memory address"
-            "Align" "-falign-functions" $( echo ${SPD[@]} | grep -q "Align" && echo "on" || echo "off" ) "Align functions, loops, and jumps"
-            "Expensive" "-fexpensive-optimizations" $( echo ${SPD[@]} | grep -q "Expensive" && echo "on" || echo "off" ) "Perform expensive optimizations"
-            "Doubles" "-malign-double" $( echo ${SPD[@]} | grep -q "Doubles" && echo "on" || echo "off" ) "Align double, long double, and long long on two word boundaries"
-            "Tracer" "-ftracer" $( echo ${SPD[@]} | grep -q "Tracer" && echo "on" || echo "off" ) "Perform tail duplication to enlarge superblock size."
-            "Blocks" "-freorder-blocks" $( echo ${SPD[@]} | grep -q "Blocks" && echo "on" || echo "off" ) "Reorder basic blocks in order to reduce number of taken branches."
-            )
-          menu checklist "Select additional flags to optimize specific areas of the created code. Note that some of these flags are turned on automatically with -O2 or -O3. See 'man gcc' for more information. None of these options are safe!" &&
-          SPD=($RESULT)
-        ;;
-        fpm)
-          OPTIONS=(
-            "None" "Use compiler default" $([ "$FPM" == "None" ] && echo "on" || echo "off" ) "Use compiler default"
-            )
-          case $PLATFORM in 
-            x86|x86_64)
-              if grep '^fpu' /proc/cpuinfo | grep -qw yes; then
-                OPTIONS=(
-                  ${OPTIONS[@]}
-                  "x387" "Floating point coprocessor" $([ "$FPM" == "x387" ] && echo "on" || echo "off" ) "Classic 387 or higher Floating Point Co-Processor"
-                  )
-              fi
-              if grep -qw sse /proc/cpuinfo; then
-                OPTIONS=(
-                  ${OPTIONS[@]}
-                  "SSE" "Streaming SIMD Extensions" $([ "$FPM" == "SSE" ] && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data)"
-                  )
-              fi
-              if grep '^fpu' /proc/cpuinfo | grep -qw yes; then
-                OPTIONS=(
-                  ${OPTIONS[@]}
-                  "Both" "x387 and SSE" $([ "$FPM" == "Both" ] && echo "on" || echo "off" ) "Both SSE and 387"
-                  )
-              fi
-            ;;
-            PowerPC)
-              if grep -qw altivec /proc/cpuinfo; then
-                OPTIONS=(
-                  ${OPTIONS[@]}
-                  "Altivec" "PowerPC only" $([ "$FPM" == "Altivec" ] && echo "on" || echo "off" ) "Altivec"
-                  )
-              fi
-            ;;
-          esac
-          unset FLAGS
-          for EXT in fpu sse altivec ; do
-            if grep -qw "$EXT" /proc/cpuinfo ; then
-              FLAGS="$FLAGS $EXT"
-            fi
-          done
-          FLAGS=${FLAGS/fpu/387}
-          FLAGS=${FLAGS/387 sse/387 and sse (both)}
-          menu radiolist "Select available Floating Point Math compile extensions. The kernel reports that this system has: $FLAGS. None of these are safe." &&
-          FPM=$RESULT
-        ;;
-        xtra)
-          unset OPTIONS
-          case $PLATFORM in 
-            x86|x86_64)
-              if grep -qw mmx /proc/cpuinfo; then
-                OPTIONS=(
-                  ${OPTIONS[@]}
-                  "MMX" "MMX" $( echo ${XTRA[@]} | grep -q "MMX" && echo "on" || echo "off" ) "Multi-Media instruction code eXtensions"
-                  )
-              fi
-              if grep -qw sse /proc/cpuinfo; then
-                OPTIONS=(
-                  ${OPTIONS[@]} 
-                  "SSE" "SSE" $( echo ${XTRA[@]} | grep -q "SSE" && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data) Extensions"
-                  )
-              fi
-              if grep -qw sse2 /proc/cpuinfo; then
-                OPTIONS=(
-                  ${OPTIONS[@]}
-                  "SSE2" "SSE2" $( echo ${XTRA[@]} | grep -q "SSE2" && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data) Extensions v2"
-                  )
-              fi
-              if grep -qw pni /proc/cpuinfo; then
-                OPTIONS=(
-                  ${OPTIONS[@]}
-                  "SSE3" "SSE3" $( echo ${XTRA[@]} | grep -q "SSE3" && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data) Extensions v3"
-                  )
-              fi
-              if grep -qw 3dnow /proc/cpuinfo; then
-                OPTIONS=(
-                  ${OPTIONS[@]}
-                  "dnow" "3dnow" $( echo ${XTRA[@]} | grep -q "dnow" && echo "on" || echo "off" ) "3dnow"
-                  )
-              fi
-            ;;
-            PowerPC)
-              if grep -qw altivec /proc/cpuinfo; then
-                OPTIONS=(
-                  "Altivec" "Altivec" $( echo ${XTRA[@]} | grep -q "Altivec" && echo "on" || echo "off" ) "Altivec"
-                  )
-              fi
-            ;;
-          esac
-          unset FLAGS
-          for EXT in mmx sse sse2 pni 3dnow altivec ; do
-            if grep -qw "$EXT" /proc/cpuinfo ; then
-              echo $EXT
-              FLAGS="$FLAGS $EXT"
-            fi
-          done
-          FLAGS=${FLAGS/pni/sse3}
-          menu checklist "Select compiler use of extra instruction sets. The kernel reports that this system has: $FLAGS. None of these are safe." &&
-          XTRA=($RESULT)
-        ;;
-        cc_opt)
-          OPTIONS=(
-            "Deprecated" "-Wno-deprecated for C++" $( echo ${CC_OPTS[@]} | grep -qw "Deprecated" && echo "on" || echo "off" ) "Disable warnings of deprecated symbols in C++"
-            "Debug" "-g" $( echo ${CC_OPTS[@]} | grep -qw "Debug" && echo "on" || echo "off" ) "Add debug symbols"
-            "Pipe" "-pipe (RECOMMENDED)" $( echo ${CC_OPTS[@]} | grep -qw "Pipe" && echo "on" || echo "off" ) "Enable cc to use named pipes."
-            )
-          menu checklist "General C/C++ compiler settings" &&
-          CC_OPTS=($RESULT)
-        ;;
-        stack)
-          STACK=`$DIALOG --nocancel --inputbox "Enter the number to set the stack to, leave empty for default. Only used on x86 platform. Not safe" 0 55 $STACK`
-        ;;
-      esac
-  done
-
-  save_optimizations
-}
-
-
-plugin_register BUILD_BUILD plugin_compiler_gcc_4_2_optimize
-plugin_register OPTIMIZE_MENU plugin_compiler_gcc_4_2_menu
diff --git a/compilers/gcc/plugin.d/optimize-gcc_4_4.plugin b/compilers/gcc/plugin.d/optimize-gcc_4_4.plugin
new file mode 100644
index 0000000..c6bab48
--- /dev/null
+++ b/compilers/gcc/plugin.d/optimize-gcc_4_4.plugin
@@ -0,0 +1,526 @@
+#
+# gcc-4.3.x compiler optimizations plugin
+#
+
+plugin_compiler_gcc_4_4_optimize()
+{
+  if [ "${LUNAR_COMPILER:-GCC_4_4}" != "GCC_4_4" ]; then
+    return 2
+  fi
+
+  debug_msg "plugin_compiler_gcc_4_4_optimize($@)"
+  if [ -f /etc/lunar/local/optimizations.GCC_4_4 ]; then
+    . /etc/lunar/local/optimizations.GCC_4_4
+  fi
+
+  # some local macro's
+  cflags_add()
+  {
+    CFLAGS="$CFLAGS $@"
+  }
+
+  cxxflags_add()
+  {
+    CXXFLAGS="$CXXFLAGS $@"
+  }
+
+  cppflags_add()
+  {
+    CPPFLAGS="$CPPFLAGS $@"
+  }
+
+  c_cxx_flags_add()
+  {
+    cflags_add $@
+    cxxflags_add $@
+  }
+
+  # CFLAGS/CXXFLAGS - base optimization
+  case $BOPT in
+    None)    c_cxx_flags_add "-O0" ;;
+    Small)   c_cxx_flags_add "-Os" ;;
+    Fast)    c_cxx_flags_add "-O1" ;;
+    Faster)  c_cxx_flags_add "-O2" ;;
+    Fastest) c_cxx_flags_add "-O3" ;;
+  esac
+
+  # CFLAGS -march cpu-specific optimization
+  if [ -n "$CPU" ]; then
+    c_cxx_flags_add "-march=$CPU"
+  fi
+
+  # GCC specific extra optimizations
+  for SP in ${SPD[@]}; do
+    case $SP in
+      Speedy)   c_cxx_flags_add "-funroll-loops" ;;
+      Regparm)  c_cxx_flags_add "-mregparm=3" ;;
+      Risky)    c_cxx_flags_add "-ffast-math" ;;
+      Pointers) c_cxx_flags_add "-fomit-frame-pointer" ;;
+      Siblings) c_cxx_flags_add "-foptimize-sibling-calls" ;;
+      Profiling)
+        c_cxx_flags_add "-fprofile-arcs"
+        set_local_config "KEEP_SOURCE" "on"
+      ;;
+      Branching) c_cxx_flags_add "-fbranch-probabilities" ;;
+      Aliasing)  c_cxx_flags_add "-fstrict-aliasing" ;;
+      Cprop)     c_cxx_flags_add "-fno-cprop-registers" ;;
+      Float)     c_cxx_flags_add "-ffloat-store" ;;
+      Address)   c_cxx_flags_add "-fforce-addr" ;;
+      Align)     c_cxx_flags_add "-falign-functions -falign-loops -falign-jumps" ;;
+      Expensive) c_cxx_flags_add "-fexpensive-optimizations" ;;
+      Doubles)   c_cxx_flags_add "-malign-double" ;;
+      Tracer)    c_cxx_flags_add "-ftracer" ;;
+      Blocks)    c_cxx_flags_add "-freorder-blocks" ;;
+    esac
+  done
+
+  # STACK - kind of dangerous - shouldn't we just remove this?
+  if (( STACK > 0 )) ; then
+    c_cxx_flags_add "-mpreferred-stack-boundary=$STACK"
+    cppflags_add "-mpreferred-stack-boundary=$STACK"
+  fi
+
+  for XTR in ${XTRA[@]}; do
+    case $XTR in
+      MMX)     c_cxx_flags_add "-mmmx" ;;
+      SSE)     c_cxx_flags_add "-msse" ;;
+      SSE2)    c_cxx_flags_add "-msse2" ;;
+      SSE3)    c_cxx_flags_add "-msse3" ;;
+      dnow)    c_cxx_flags_add "-m3dnow" ;;
+      Altivec) c_cxx_flags_add "-maltivec" ;;
+    esac
+  done
+
+  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" ;;
+  esac
+
+  for OPT in ${CC_OPTS[@]}; do
+    case $OPT in
+      Deprecated)
+        cxxflags_add "-Wno-deprecated"
+        ;;
+      Debug)
+        c_cxx_flags_add "-g"
+        ;;
+      Pipe)
+        c_cxx_flags_add "-pipe"
+        ;;
+    esac
+  done
+
+  CC=gcc
+  CXX=g++
+  CPP=cpp
+
+  export CFLAGS CXXFLAGS CPPFLAGS
+  export CC CXX CPP
+ 
+  verbose_msg "CC=\"$CC\""
+  verbose_msg "CXX=\"$CXX\""
+  verbose_msg "CPP=\"$CPP\""
+  verbose_msg "CFLAGS=\"$CFLAGS\""
+  verbose_msg "CXXFLAGS=\"$CXXFLAGS\""
+  verbose_msg "CPPFLAGS=\"$CPPFLAGS\""
+
+  return 2
+}
+
+
+plugin_compiler_gcc_4_4_menu()
+{
+  # The main code calls this function WITHOUT $1 to find out which
+  # compiler optimization plugins exist. It then returns the plugin
+  # identifier which can be saved in $LUNAR_COMPILER as the user's
+  # choice for COMPILERS
+  if [ -z "$1" ]; then
+    echo "GCC_4_4"
+    echo "GNU C Compiler suite version 4.4.x"
+    return 2
+  elif [ "$1" != "GCC_4_4" ]; then
+    # we don't display anything when the user selected a
+    # different menu
+    return 2
+  fi
+
+  # now we are done with determining if we are really the menu
+  # that the user wants - so we can display it
+  menu() 
+  { 
+    unset RESULT
+    if [ "$1" == "checklist" ]; then
+      RESULT=`$DIALOG --no-cancel --item-help --separate-output --checklist "$2" 0 0 0 "${OPTIONS[@]}"`
+      if [ $? != 0 ]; then
+        return 1
+      fi
+    elif [ "$1" == "radiolist" ]; then
+      RESULT=`$DIALOG --no-cancel --item-help --radiolist "$2" 0 0 0 "${OPTIONS[@]}"`
+      if [ $? != 0 ]; then
+        return 1
+      fi
+    fi
+    RESULT=$(echo $RESULT | sed -e 's:^"::' -e 's:"$::')
+    return 0
+  }
+
+  save_optimizations()
+  {
+    debug_msg "save_optimizations($@)"
+    cat >/etc/lunar/local/optimizations.GCC_4_4  <<EOF
+CPU=$CPU
+BOPT=$BOPT
+SPD=( $(echo ${SPD[@]} ) )
+XTRA=( $(echo ${XTRA[@]}) )
+FPM=$FPM
+CC_OPTS=( $(echo ${CC_OPTS[@]} ) )
+STACK=$STACK
+EOF
+  }
+
+  if [ -f /etc/lunar/local/optimizations.GCC_4_4 ]; then
+    . /etc/lunar/local/optimizations.GCC_4_4
+  fi
+
+  export IFS=$'\t\n'
+  TITLE="Lunar Compiler Optimizations"
+
+  SAFE_OPTIMIZATIONS=${SAFE_OPTIMIZATIONS:-on}
+
+  while true; do
+    unset OPTIONS
+    IS_DEFAULT=$([ `get_local_config LUNAR_COMPILER` == "GCC_4_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 $(
+      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!)"
+      else
+        echo "safe"
+        echo "Turn off optimization safety  [$SAFE_OPTIMIZATIONS]"
+        echo "Allow potentially unsafe optimizations (DANGEROUS!)"
+      fi
+      echo "bopt"
+      echo "Base speed optimization       [$BOPT]"
+      echo "Select the base optimization from -Os, -O0, -O1 etc"
+      echo "cpu"
+      echo "CPU selection                 [$CPU]"
+      echo "Select the target CPU type"
+      if [ "$SAFE_OPTIMIZATIONS" == "off" ] ; then
+        echo "xtra"
+        echo "CPU extensions                [${XTRA[@]}]"
+        echo "Select CPU extensions"
+        echo "spd"
+        echo "Specialized optimizations     [${SPD[@]}]"
+        echo "Select specific compiler flags for expensive and risky optimizations"
+        echo "fpm"
+        echo "Floating point optimizations  [$FPM]"
+        echo "enable specific floating point optimizations"
+      fi
+      echo "cc_opt"
+      echo "General C/C++ options         [${CC_OPTS[@]}]"
+      echo "Select named pipes, warnings on deprecated symbols"
+      if [ "$SAFE_OPTIMIZATIONS" == "off" ] ; then
+        echo "stack"
+        echo "Stack                         [$STACK]"
+        echo "Set the stack size"
+      fi) `
+      if [ $? != 0 ]; then
+        save_optimizations
+        set_local_config SAFE_OPTIMIZATIONS $SAFE_OPTIMIZATIONS
+        return
+      fi
+
+      case $CHOICE in 
+        default)
+          if [ "$IS_DEFAULT" != "DEFAULT" ]; then
+            set_local_config LUNAR_COMPILER GCC_4_4
+            $DIALOG --msgbox "Gcc 4.3 is now the default compiler!" 6 60
+          fi
+          ;;
+        safe)
+          if [ "$SAFE_OPTIMIZATIONS" == "off" ]; then
+            SAFE_OPTIMIZATIONS=on
+            unset SPD XTRA STACK
+            FPM=("None")
+            BOPT=${BOPT//Fastest/Faster}
+          else
+            $DIALOG --defaultno --yes-label "No" --no-label "Yes" --colors --yesno " \Z1*** WARNING ***\n\n\ZnPlease read this carefully. You are about to turn off the optimization safety. This means that you can possibly turn on compiler or linker optimizations that can and will break your box. Not only will the problem most likely occur only days, weeks or months after you turn this switch, but also it can corrupt all your personal data, make your machine unbootable, and cause serious personal distress, headache, loss of vision, heart failure, loss of income, or otherwise very bad things. Before you turn off this option, please think for yourself for a minute and ask yourself: Is it worth it?\n\nOnly use safe optimizations?" 20 70
+            if [ $? == 0 ]; then
+              SAFE_OPTIMIZATIONS=off
+            fi
+          fi
+        ;;
+        bopt)
+          OPTIONS=(
+            "None" "-O0" $( [ "$BOPT" == "None" ] && echo "on" || echo "off" ) "Only default optimizations"
+            "Fast" "-O1" $( [ "$BOPT" == "Fast" ] && echo "on" || echo "off" ) "-O1"
+            "Faster" "-O2" $( [ "$BOPT" == "Faster" ] && echo "on" || echo "off" ) "-O2"
+            "Fastest" "-O3" $( [ "$BOPT" == "Fastest" ] && echo "on" || echo "off" ) "-O3"
+            "Small" "-Os" $( [ "$BOPT" == "Small" ] && echo "on" || echo "off" ) "-Os"
+            )
+          menu radiolist "Choose the base compile-time optimization. Most people will use -O2 or -O3. Note that some modules set their own level." &&
+          BOPT=$RESULT
+        ;;
+        cpu)
+          case $PLATFORM in
+            x86)
+              OPTIONS=(
+                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
+                "i386" "i386" $( [ "$CPU" == "i386" ] && echo "on" || echo "off" ) "i386 processors"
+                "i486" "i486" $( [ "$CPU" == "i486" ] && echo "on" || echo "off" ) "i486 processors"
+                "i586" "i586 (Pentium)" $( [ "$CPU" == "i586" ] && echo "on" || echo "off" ) "i586 processors, identical to 'pentium'"
+                "pentium-mmx" "pentium-mmx" $( [ "$CPU" == "pentium-mmx" ] && echo "on" || echo "off" ) "Pentium processors with mmx"
+                "i686" "i686 (PentiumPro)" $( [ "$CPU" == "i686" ] && echo "on" || echo "off" ) "i686 processors, identical to 'pentiumpro'"
+                "pentium2" "P2" $( [ "$CPU" == "pentium2" ] && echo "on" || echo "off" ) "Pentium II processors"
+                "pentium3" "P3 (Celeron)" $( [ "$CPU" == "pentium3" ] && echo "on" || echo "off" ) "Pentium III processors"
+                "pentium3m" "P3 mobile (Celeron)" $( [ "$CPU" == "pentium3m" ] && echo "on" || echo "off" ) "Pentium III Mobile processors"
+                "pentium-m" "P3 mobile (Celeron) Low power version" $( [ "$CPU" == "pentium-m" ] && echo "on" || echo "off" ) "Pentium III Mobile processor - low power versions"
+                "pentium4" "P4" $( [ "$CPU" == "pentium4" ] && echo "on" || echo "off" ) "Pentium 4 processors"
+                "pentium4m" "P4 mobile" $( [ "$CPU" == "pentium4m" ] && echo "on" || echo "off" ) "Pentium 4 mobile processors"
+                "core2" "Core 2" $( [ "$CPU" == "core2" ] && echo "on" || echo "off" ) "Intel Core 2 processors"
+                "prescott" "Xeon" $( [ "$CPU" == "prescott" ] && echo "on" || echo "off" ) "Newer Xeons with sse3"
+                "nocona" "nocona" $( [ "$CPU" == "nocona" ] && echo "on" || echo "off" ) "Newer Xeons with sse3 and em64t"
+                "k6" "k6" $( [ "$CPU" == "k6" ] && echo "on" || echo "off" ) "AMD K6 processors"
+                "k6-2" "k6-2" $( [ "$CPU" == "k6-2" ] && echo "on" || echo "off" ) "AMD K6-2 processors"
+                "k6-3" "k6-3" $( [ "$CPU" == "k6-3" ] && echo "on" || echo "off" ) "AMD K6-3 processors"
+                "athlon" "athlon" $( [ "$CPU" == "athlon" ] && echo "on" || echo "off" ) "AMD Athlon processors"
+                "athlon-tbird" "athlon-tbird" $( [ "$CPU" == "athlon-tbird" ] && echo "on" || echo "off" ) "AMD Athlon Thunderbird processors"
+                "athlon-4" "athlon-4" $( [ "$CPU" == "athlon-4" ] && echo "on" || echo "off" ) "AMD Athlon 4 processors"
+                "athlon-xp" "athlon-xp" $( [ "$CPU" == "athlon-xp" ] && echo "on" || echo "off" ) "AMD Athlon XP processors"
+                "athlon-mp" "athlon-mp" $( [ "$CPU" == "athlon-mp" ] && echo "on" || echo "off" ) "AMD athlon MP processors"
+                "k8" "k8" $( [ "$CPU" == "k8" ] && echo "on" || echo "off" ) "AMD K8 processors"
+                "opteron" "opteron" $( [ "$CPU" == "opteron" ] && echo "on" || echo "off" ) "AMD opteron processors"
+                "athlon64" "athlon64" $( [ "$CPU" == "athlon64" ] && echo "on" || echo "off" ) "AMD Athlon 64 processors"
+                "athlon-fx" "athlon-fx" $( [ "$CPU" == "athlon-fx" ] && echo "on" || echo "off" ) "AMD Athlon fx processors"
+                "geode" "geode" $( [ "$CPU" == "geode" ] && echo "on" || echo "off" ) "AMD Geode processors"
+                "winchip-c6" "winchip-c6" $( [ "$CPU" == "winchip-c6" ] && echo "on" || echo "off" ) "IDT Winchip C6 CPU (a 486)"
+                "winchip2" "winchip2" $( [ "$CPU" == "winchip2" ] && echo "on" || echo "off" ) "IDT Winchip2 CPU (a 486)"
+                "c3" "c3" $( [ "$CPU" == "c3" ] && echo "on" || echo "off" ) "Via C3 CPU with MMX and 3dNOW"
+                "c3-2" "c3-2" $( [ "$CPU" == "c3-2" ] && echo "on" || echo "off" ) "Via C3-2 CPU with MMX and SSE"
+                )
+            ;;
+            Alpha)
+              OPTIONS=(
+                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
+                "ev4" "ev4" $( [ "$CPU" == "ev4" ] && echo "on" || echo "off" ) "Alpha EV4 (21064)"
+                "ev45" "ev45" $( [ "$CPU" == "ev45" ] && echo "on" || echo "off" ) "Alpha EV45 (21064a)"
+                "ev5" "ev5" $( [ "$CPU" == "ev5" ] && echo "on" || echo "off" ) "Alpha EV5 (21164)"
+                "ev56" "ev56" $( [ "$CPU" == "ev56" ] && echo "on" || echo "off" ) "Alpha EV56 (21164a)"
+                "pca56" "pca56" $( [ "$CPU" == "pca56" ] && echo "on" || echo "off" ) "Alpha pca56 (21164PC)"
+                "ev6" "ev6" $( [ "$CPU" == "ev6" ] && echo "on" || echo "off" ) "Alpha EV6 (21264)"
+                "ev67" "ev67" $( [ "$CPU" == "ev67" ] && echo "on" || echo "off" ) "Alpha EV67 (21264a)"
+                "ev68" "ev68" $( [ "$CPU" == "ev68" ] && echo "on" || echo "off" ) "Alpha EV68 (21264b)"
+                )
+            ;;
+            PowerPC)
+              OPTIONS=(
+                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
+                "common" "common" $( [ "$CPU" == "common" ] && echo "on" || echo "off" ) "Common PowerPC"
+                "rios" "rios" $( [ "$CPU" == "rios" ] && echo "on" || echo "off" ) "Rios PowerPC"
+                "rios1" "rios1" $( [ "$CPU" == "rios1" ] && echo "on" || echo "off" ) "Rios1 PowerPC"
+                "rsc" "rsc" $( [ "$CPU" == "rsc" ] && echo "on" || echo "off" ) "RSC PowerPC"
+                "rios2" "rios2" $( [ "$CPU" == "rios2" ] && echo "on" || echo "off" ) "Rios2 PowerPC"
+                "rs64a" "rs64a" $( [ "$CPU" == "rs64a" ] && echo "on" || echo "off" ) "RS64a PowerPC"
+                "403" "403" $( [ "$CPU" == "403" ] && echo "on" || echo "off" ) "403 PowerPC"
+                "505" "505" $( [ "$CPU" == "505" ] && echo "on" || echo "off" ) "505 PowerPC"
+                "601" "601" $( [ "$CPU" == "601" ] && echo "on" || echo "off" ) "601 PowerPC"
+                "602" "602" $( [ "$CPU" == "602" ] && echo "on" || echo "off" ) "602 PowerPC"
+                "603" "603" $( [ "$CPU" == "603" ] && echo "on" || echo "off" ) "603 PowerPC"
+                "603a" "603a" $( [ "$CPU" == "603a" ] && echo "on" || echo "off" ) "603a PowerPC"
+                "604" "604" $( [ "$CPU" == "604" ] && echo "on" || echo "off" ) "604 PowerPC"
+                "604e" "604e" $( [ "$CPU" == "604e" ] && echo "on" || echo "off" ) "604e PowerPC"
+                "620" "620" $( [ "$CPU" == "620" ] && echo "on" || echo "off" ) "620 PowerPC"
+                "630" "630" $( [ "$CPU" == "630" ] && echo "on" || echo "off" ) "630 PowerPC"
+                "740" "740" $( [ "$CPU" == "740" ] && echo "on" || echo "off" ) "740 PowerPC"
+                "7400" "7400" $( [ "$CPU" == "7400" ] && echo "on" || echo "off" ) "7400 PowerPC"
+                "7450" "7450" $( [ "$CPU" == "7450" ] && echo "on" || echo "off" ) "7450 PowerPC"
+                "750" "750" $( [ "$CPU" == "750" ] && echo "on" || echo "off" ) "750 PowerPC"
+                "801" "801" $( [ "$CPU" == "801" ] && echo "on" || echo "off" ) "801 PowerPC"
+                "821" "821" $( [ "$CPU" == "821" ] && echo "on" || echo "off" ) "821 PowerPC"
+                "823" "823" $( [ "$CPU" == "823" ] && echo "on" || echo "off" ) "823 PowerPC"
+                "Power" "Power" $( [ "$CPU" == "Power" ] && echo "on" || echo "off" ) "Power PowerPC"
+                "Power2" "Power2" $( [ "$CPU" == "Power2" ] && echo "on" || echo "off" ) "Power2 PowerPC"
+                "PowerPC" "PowerPC" $( [ "$CPU" == "PowerPC" ] && echo "on" || echo "off" ) "IBM and Apple hardware (Power and PowerPC)"
+                )
+            ;;
+            SPARC)
+              OPTIONS=(
+                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
+                "v7" "v7" $( [ "$CPU" == "v7" ] && echo "on" || echo "off" ) "V7 SPARC"
+                "cypress" "cypress" $( [ "$CPU" == "cypress" ] && echo "on" || echo "off" ) "Cypress SPARC"
+                "v8" "v8" $( [ "$CPU" == "v8" ] && echo "on" || echo "off" ) "V8 SPARC"
+                "supersparc" "supersparc" $( [ "$CPU" == "supersparc" ] && echo "on" || echo "off" ) "SuperSPARC"
+                "sparclite" "sparclite" $( [ "$CPU" == "sparclite" ] && echo "on" || echo "off" ) "SPARCLite"
+                "hypersparc" "hypersparc" $( [ "$CPU" == "hypersparc" ] && echo "on" || echo "off" ) "HyperSPARC"
+                "sparclite86x" "sparclite86x" $( [ "$CPU" == "sparclite86x" ] && echo "on" || echo "off" ) "SPARCLite86x"
+                "f930" "f930" $( [ "$CPU" == "f930" ] && echo "on" || echo "off" ) "f930 SPARC"
+                "f934" "f934" $( [ "$CPU" == "f934" ] && echo "on" || echo "off" ) "f934 SPARC"
+                "sparclet" "sparclet" $( [ "$CPU" == "sparclet" ] && echo "on" || echo "off" ) "SPARCLet"
+                "tsc701" "tsc701" $( [ "$CPU" == "tsc701" ] && echo "on" || echo "off" ) "tsc701"
+                "v9" "v9" $( [ "$CPU" == "v9" ] && echo "on" || echo "off" ) "V9 SPARC"
+                "ultrasparc" "ultrasparc" $( [ "$CPU" == "ultrasparc" ] && echo "on" || echo "off" ) "ULTRASPARC"
+                )
+            ;;
+            x86_64)
+              OPTIONS=(
+                "None" "" $( [ ! "$CPU" ] && echo "on" || echo "off" ) "All processor types"
+                "x86-64" "x86-64" $( [ "$CPU" == "x86-64" ] && echo "on" || echo "off" ) "Both AMD64 and Intel EM64T machines"
+                "nocona" "nocona" $( [ "$CPU" == "nocona" ] && echo "on" || echo "off" ) "Newer Xeons with sse3 and em64t"
+                "k8" "k8" $( [ "$CPU" == "k8" ] && echo "on" || echo "off" ) "AMD K8 processors"
+                "opteron" "opteron" $( [ "$CPU" == "opteron" ] && echo "on" || echo "off" ) "AMD opteron processors"
+                "athlon64" "athlon64" $( [ "$CPU" == "athlon64" ] && echo "on" || echo "off" ) "AMD Athlon 64 processors"
+                "athlon-fx" "athlon-fx" $( [ "$CPU" == "athlon-fx" ] && echo "on" || echo "off" ) "AMD Athlon fx processors"
+                )
+            ;;
+          esac
+          menu radiolist "CPU, according to the kernel you have a$(cat /proc/cpuinfo | grep 'model name' | cut -d: -f2 | head -n 1). If you are unsure, use $(arch) - anything higher is not safe." &&
+          CPU=$RESULT
+        ;;
+        spd)
+          OPTIONS=(
+            "Speedy" "-funroll-loops" $( echo ${SPD[@]} | grep -q "Speedy" && echo "on" || echo "off" ) "Optimize to increase performance of generated code"
+            "Regparm" "-mregparm=3" $( echo ${SPD[@]} | grep -q "Regparm" && echo "on" || echo "off" ) "Pass up to 3 function arguments in registers instead of stack"
+            "Risky" "-ffast-math" $( echo ${SPD[@]} | grep -q "Risky" && echo "on" || echo "off" ) "Optimize to increase performance ... by violating ANSI and IEEE FP rules"
+            "Pointers" "-fomit-frame-pointer" $( echo ${SPD[@]} | grep -q "Pointers" && echo "on" || echo "off" ) "Optimize by omitting frame pointers"
+            "Siblings" "-foptimize-sibling-calls" $( echo ${SPD[@]} | grep -q "Siblings" && echo "on" || echo "off" ) "Optimize sibling calls"
+            "Profiling" "-fprofile-arcs" $( echo ${SPD[@]} | grep -q "Profiling" && echo "on" || echo "off" ) "Generate profiles (For later use with Branching)"
+            "Branching" "-fbranching-probabilities" $( echo ${SPD[@]} | grep -q "Branching" && echo "on" || echo "off" ) "Predict branching (For using profiled sources)"
+            "Aliasing" "-fstrict-aliasing" $( echo ${SPD[@]} | grep -q "Aliasing" && echo "on" || echo "off" ) "Enable strict aliasing (enabled by default -O1 and above)"
+            "Cprop" "-fno-cprop-registers" $( echo ${SPD[@]} | grep -q "Cprop" && echo "on" || echo "off" ) "Reduce scheduling dependencies and remove copies"
+            "Float" "-ffloat-store" $( echo ${SPD[@]} | grep -q "Float" && echo "on" || echo "off" ) "Enable float store"
+            "Address" "-fforce-addr" $( echo ${SPD[@]} | grep -q "Address" && echo "on" || echo "off" ) "Force memory address"
+            "Align" "-falign-functions" $( echo ${SPD[@]} | grep -q "Align" && echo "on" || echo "off" ) "Align functions, loops, and jumps"
+            "Expensive" "-fexpensive-optimizations" $( echo ${SPD[@]} | grep -q "Expensive" && echo "on" || echo "off" ) "Perform expensive optimizations"
+            "Doubles" "-malign-double" $( echo ${SPD[@]} | grep -q "Doubles" && echo "on" || echo "off" ) "Align double, long double, and long long on two word boundaries"
+            "Tracer" "-ftracer" $( echo ${SPD[@]} | grep -q "Tracer" && echo "on" || echo "off" ) "Perform tail duplication to enlarge superblock size."
+            "Blocks" "-freorder-blocks" $( echo ${SPD[@]} | grep -q "Blocks" && echo "on" || echo "off" ) "Reorder basic blocks in order to reduce number of taken branches."
+            )
+          menu checklist "Select additional flags to optimize specific areas of the created code. Note that some of these flags are turned on automatically with -O2 or -O3. See 'man gcc' for more information. None of these options are safe!" &&
+          SPD=($RESULT)
+        ;;
+        fpm)
+          OPTIONS=(
+            "None" "Use compiler default" $([ "$FPM" == "None" ] && echo "on" || echo "off" ) "Use compiler default"
+            )
+          case $PLATFORM in 
+            x86|x86_64)
+              if grep '^fpu' /proc/cpuinfo | grep -qw yes; then
+                OPTIONS=(
+                  ${OPTIONS[@]}
+                  "x387" "Floating point coprocessor" $([ "$FPM" == "x387" ] && echo "on" || echo "off" ) "Classic 387 or higher Floating Point Co-Processor"
+                  )
+              fi
+              if grep -qw sse /proc/cpuinfo; then
+                OPTIONS=(
+                  ${OPTIONS[@]}
+                  "SSE" "Streaming SIMD Extensions" $([ "$FPM" == "SSE" ] && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data)"
+                  )
+              fi
+              if grep '^fpu' /proc/cpuinfo | grep -qw yes; then
+                OPTIONS=(
+                  ${OPTIONS[@]}
+                  "Both" "x387 and SSE" $([ "$FPM" == "Both" ] && echo "on" || echo "off" ) "Both SSE and 387"
+                  )
+              fi
+            ;;
+            PowerPC)
+              if grep -qw altivec /proc/cpuinfo; then
+                OPTIONS=(
+                  ${OPTIONS[@]}
+                  "Altivec" "PowerPC only" $([ "$FPM" == "Altivec" ] && echo "on" || echo "off" ) "Altivec"
+                  )
+              fi
+            ;;
+          esac
+          unset FLAGS
+          for EXT in fpu sse altivec ; do
+            if grep -qw "$EXT" /proc/cpuinfo ; then
+              FLAGS="$FLAGS $EXT"
+            fi
+          done
+          FLAGS=${FLAGS/fpu/387}
+          FLAGS=${FLAGS/387 sse/387 and sse (both)}
+          menu radiolist "Select available Floating Point Math compile extensions. The kernel reports that this system has: $FLAGS. None of these are safe." &&
+          FPM=$RESULT
+        ;;
+        xtra)
+          unset OPTIONS
+          case $PLATFORM in 
+            x86|x86_64)
+              if grep -qw mmx /proc/cpuinfo; then
+                OPTIONS=(
+                  ${OPTIONS[@]}
+                  "MMX" "MMX" $( echo ${XTRA[@]} | grep -q "MMX" && echo "on" || echo "off" ) "Multi-Media instruction code eXtensions"
+                  )
+              fi
+              if grep -qw sse /proc/cpuinfo; then
+                OPTIONS=(
+                  ${OPTIONS[@]} 
+                  "SSE" "SSE" $( echo ${XTRA[@]} | grep -q "SSE" && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data) Extensions"
+                  )
+              fi
+              if grep -qw sse2 /proc/cpuinfo; then
+                OPTIONS=(
+                  ${OPTIONS[@]}
+                  "SSE2" "SSE2" $( echo ${XTRA[@]} | grep -q "SSE2" && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data) Extensions v2"
+                  )
+              fi
+              if grep -qw pni /proc/cpuinfo; then
+                OPTIONS=(
+                  ${OPTIONS[@]}
+                  "SSE3" "SSE3" $( echo ${XTRA[@]} | grep -q "SSE3" && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data) Extensions v3"
+                  )
+              fi
+              if grep -qw 3dnow /proc/cpuinfo; then
+                OPTIONS=(
+                  ${OPTIONS[@]}
+                  "dnow" "3dnow" $( echo ${XTRA[@]} | grep -q "dnow" && echo "on" || echo "off" ) "3dnow"
+                  )
+              fi
+            ;;
+            PowerPC)
+              if grep -qw altivec /proc/cpuinfo; then
+                OPTIONS=(
+                  "Altivec" "Altivec" $( echo ${XTRA[@]} | grep -q "Altivec" && echo "on" || echo "off" ) "Altivec"
+                  )
+              fi
+            ;;
+          esac
+          unset FLAGS
+          for EXT in mmx sse sse2 pni 3dnow altivec ; do
+            if grep -qw "$EXT" /proc/cpuinfo ; then
+              echo $EXT
+              FLAGS="$FLAGS $EXT"
+            fi
+          done
+          FLAGS=${FLAGS/pni/sse3}
+          menu checklist "Select compiler use of extra instruction sets. The kernel reports that this system has: $FLAGS. None of these are safe." &&
+          XTRA=($RESULT)
+        ;;
+        cc_opt)
+          OPTIONS=(
+            "Deprecated" "-Wno-deprecated for C++" $( echo ${CC_OPTS[@]} | grep -qw "Deprecated" && echo "on" || echo "off" ) "Disable warnings of deprecated symbols in C++"
+            "Debug" "-g" $( echo ${CC_OPTS[@]} | grep -qw "Debug" && echo "on" || echo "off" ) "Add debug symbols"
+            "Pipe" "-pipe (RECOMMENDED)" $( echo ${CC_OPTS[@]} | grep -qw "Pipe" && echo "on" || echo "off" ) "Enable cc to use named pipes."
+            )
+          menu checklist "General C/C++ compiler settings" &&
+          CC_OPTS=($RESULT)
+        ;;
+        stack)
+          STACK=`$DIALOG --nocancel --inputbox "Enter the number to set the stack to, leave empty for default. Only used on x86 platform. Not safe" 0 55 $STACK`
+        ;;
+      esac
+  done
+
+  save_optimizations
+}
+
+
+plugin_register BUILD_BUILD plugin_compiler_gcc_4_4_optimize
+plugin_register OPTIMIZE_MENU plugin_compiler_gcc_4_4_menu
diff --git a/devel/binutils/BUILD b/devel/binutils/BUILD
index 3a1ccd0..3140e0e 100644
--- a/devel/binutils/BUILD
+++ b/devel/binutils/BUILD
@@ -1,21 +1,13 @@
 (
 
-  patch_it $SOURCE_CACHE/$SOURCE2 0 &&
-
-  #Somehow I believe this might/should be logged as a bug to the glibc guys...
-  sedit 's/^all: all-redirect/all: all-redirect $(MKDOC)/' \
-                    bfd/doc/Makefile.in  &&
-
-  aclocal  &&
-  autoconf &&
-
-  OPTS+=" --host=$BUILD"     &&
-  default_config             &&
-  make tooldir=/usr          &&
-  prepare_install            &&
-  make tooldir=/usr install  &&
-  make tooldir=/usr install-info &&
-  mkdir -p $DOCUMENT_DIRECTORY/binutils &&
+  ./configure  --host=$BUILD  \
+               --prefix=/usr  &&
+
+  make tooldir=/usr           &&
+  prepare_install             &&
+  make tooldir=/usr install   &&
+  make tooldir=/usr install-info  &&
+  mkdir -p $DOCUMENT_DIRECTORY/binutils  &&
   cp -p binutils/NEWS binutils/ChangeLog $DOCUMENT_DIRECTORY/binutils
 
 ) > $C_FIFO 2>&1
diff --git a/devel/binutils/BUILD.sparc64 b/devel/binutils/BUILD.sparc64
index f56658d..c5cabf7 100644
--- a/devel/binutils/BUILD.sparc64
+++ b/devel/binutils/BUILD.sparc64
@@ -4,9 +4,10 @@
   sedit 's/^all: all-redirect/all: all-redirect $(MKDOC)/' \
                     bfd/doc/Makefile.in  &&
 
-  ./configure  --host=$BUILD             \
-               --target=sparc-linux      \
-               --prefix=/usr             &&
+  ./configure  --host=$BUILD         \
+               --target=sparc-linux  \
+               --prefix=/usr        &&
+
   make tooldir=/usr          &&
   prepare_install            &&
   make tooldir=/usr install  &&
diff --git a/devel/binutils/BUILD.x86_64 b/devel/binutils/BUILD.x86_64
new file mode 100644
index 0000000..23a6244
--- /dev/null
+++ b/devel/binutils/BUILD.x86_64
@@ -0,0 +1,12 @@
+(
+
+  ./configure  --prefix=/usr  &&
+
+  make tooldir=/usr           &&
+  prepare_install             &&
+  make tooldir=/usr install   &&
+  make tooldir=/usr install-info  &&
+  mkdir -p $DOCUMENT_DIRECTORY/binutils  &&
+  cp -p binutils/NEWS binutils/ChangeLog $DOCUMENT_DIRECTORY/binutils
+
+) > $C_FIFO 2>&1
diff --git a/devel/binutils/DETAILS b/devel/binutils/DETAILS
index 562b8c2..4dac1de 100644
--- a/devel/binutils/DETAILS
+++ b/devel/binutils/DETAILS
@@ -1,16 +1,13 @@
           MODULE=binutils
-         VERSION=2.18
+         VERSION=2.19.1
           SOURCE=$MODULE-$VERSION.tar.bz2
-         SOURCE2=binutils-2.18-makeinfo.patch
-   SOURCE_URL[0]=$GNU_URL/$MODULE/
-   SOURCE_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE/
-     SOURCE2_URL=$PATCH_URL
-      SOURCE_VFY=sha1:fdec92e9dfc6c32155869f3910f47041c78e2277
-     SOURCE2_VFY=sha1:f42e425f7651f8d80838514e4cc34917bde8f6b3
+   SOURCE_URL[0]=$GNU_URL/$MODULE
+   SOURCE_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE
+      SOURCE_VFY=sha1:88c91e36cde93433e4c4c2b2e3417777aad84526
         WEB_SITE=http://sources.redhat.com/binutils
          ENTERED=20010922
-         UPDATED=20071121
-           SHORT="essential collection of binary utilities."
+         UPDATED=20090401
+           SHORT="An essential collection of binary utilities"
 
 cat << EOF
 binutils - Collection of binary utilities
diff --git a/devel/bison/DETAILS b/devel/bison/DETAILS
index 77984c5..7b33792 100644
--- a/devel/bison/DETAILS
+++ b/devel/bison/DETAILS
@@ -1,13 +1,13 @@
           MODULE=bison
-         VERSION=2.3
-          SOURCE=$MODULE-$VERSION.tar.gz
-   SOURCE_URL[0]=$GNU_URL/$MODULE/
-   SOURCE_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE/
+         VERSION=2.4.1
+          SOURCE=$MODULE-$VERSION.tar.bz2
+   SOURCE_URL[0]=$GNU_URL/$MODULE
+   SOURCE_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE
         WEB_SITE=http://www.gnu.org/software/bison/bison.html
-      SOURCE_VFY=sha1:4df84c2c5971946111ff1982fb830b3c78d7c57e
+      SOURCE_VFY=sha1:fc96b28ee4a6a914b18cb1eddb68177d94b83361
          ENTERED=20010922
-         UPDATED=20060608
-           SHORT="replacement for the parser generator yacc"
+         UPDATED=20090618
+           SHORT="A replacement for the parser generator yacc"
 
 cat << EOF
 bison - Replacement for the parser generator yacc
diff --git a/devel/vde2/BUILD b/devel/vde2/BUILD
new file mode 100644
index 0000000..c2abe8c
--- /dev/null
+++ b/devel/vde2/BUILD
@@ -0,0 +1,7 @@
+(
+
+  patch_it $SOURCE2 1  &&
+
+  default_build
+
+) > $C_FIFO 2>&1
diff --git a/kernel/kernel-headers-2.6/DETAILS b/kernel/kernel-headers-2.6/DETAILS
index 0432de1..dbddffa 100644
--- a/kernel/kernel-headers-2.6/DETAILS
+++ b/kernel/kernel-headers-2.6/DETAILS
@@ -1,13 +1,13 @@
             MODULE=kernel-headers-2.6
-           VERSION=2.6.23
+           VERSION=2.6.30.7
             SOURCE=kernel-headers-$VERSION.tar.bz2
   SOURCE_DIRECTORY=${BUILD_DIRECTORY}/kernel-headers-$VERSION
         SOURCE_URL=$MIRROR_URL/
-        SOURCE_VFY=sha1:a6d2aeabe95c4970ebe7b02271a430c8d6fabde3
+        SOURCE_VFY=sha1:b1b5a23df1a1d08cc7c9355f18ae70a6ae0e9b48
           WEB_SITE=http://www.lunar-linux.org
         MAINTAINER=moe at lunar-linux.org
            ENTERED=20040226
-           UPDATED=20071118
+           UPDATED=20090923
             SHORT="sanitized 2.6.x kernel headers for userspace"
 cat << EOF
 Sanitized 2.6.x kernel headers for userspace
diff --git a/kernel/kernel-headers-2.6/DETAILS.x86_64 b/kernel/kernel-headers-2.6/DETAILS.x86_64
index ad938d1..415a6d7 100644
--- a/kernel/kernel-headers-2.6/DETAILS.x86_64
+++ b/kernel/kernel-headers-2.6/DETAILS.x86_64
@@ -1,13 +1,13 @@
             MODULE=kernel-headers-2.6
-           VERSION=2.6.23-x86_64
+           VERSION=2.6.30.7-x86_64
             SOURCE=kernel-headers-$VERSION.tar.bz2
   SOURCE_DIRECTORY=${BUILD_DIRECTORY}/kernel-headers-$VERSION
         SOURCE_URL=$MIRROR_URL/
-        SOURCE_VFY=sha1:5d0350ad353c1c8a49b762dcfb8dc319f749193a
+        SOURCE_VFY=sha1:e6f3029d5293c04fa490770fb5ec88e37c2e999d
           WEB_SITE=http://www.lunar-linux.org
         MAINTAINER=moe at lunar-linux.org
            ENTERED=20040226
-           UPDATED=20071102
+           UPDATED=20090923
             SHORT="sanitized 2.6.x kernel headers for userspace"
 cat << EOF
 Sanitized 2.6.x kernel headers for userspace
diff --git a/kernel/linux-2.6-stable/BUILD b/kernel/linux-2.6-stable/BUILD
index 3027699..d41ddb7 100644
--- a/kernel/linux-2.6-stable/BUILD
+++ b/kernel/linux-2.6-stable/BUILD
@@ -33,7 +33,7 @@
   backup_mods_krnl $VERSION                    &&
   prepare_install                           &&
   make modules_install                      &&
-  cp arch/${MYARCH}/boot/bzImage /boot/$VERSION  &&
-  cp System.map /boot/System.map-$VERSION
+  cp arch/${MYARCH}/boot/bzImage /boot/$VERSION-`arch`  &&
+  cp System.map /boot/System.map-$VERSION-`arch`
 
 ) > $C_FIFO 2>&1
diff --git a/kernel/linux-2.6-stable/DETAILS b/kernel/linux-2.6-stable/DETAILS
index dfb674a..e6e3441 100644
--- a/kernel/linux-2.6-stable/DETAILS
+++ b/kernel/linux-2.6-stable/DETAILS
@@ -1,5 +1,5 @@
           MODULE=linux-2.6-stable
-         VERSION=2.6.24.7
+         VERSION=2.6.30.7
             BASE=$(echo $VERSION | cut -d. -f1,2,3)
           SOURCE=linux-${BASE}.tar.bz2
          SOURCE2=patch-${VERSION}.bz2
@@ -8,12 +8,11 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/linux-$VERSION
    SOURCE_URL[1]=http://www.kernel.org/pub/linux/kernel/v2.6/
   SOURCE2_URL[0]=$KERNEL_URL/pub/linux/kernel/v2.6/
   SOURCE2_URL[1]=http://www.kernel.org/pub/linux/kernel/v2.6/
-      SOURCE_VFY=sha1:351aebc784a5395fe4c92d1e514a89680482f7e2
-     SOURCE2_VFY=sha1:8daa0107234b6f3649e7577d1c53842306c471be
+      SOURCE_VFY=sha1:5fb7f2ccdc59c57887d586971a157bee7af324d1
+     SOURCE2_VFY=sha1:f4b458c7eb9c5d6f9c801e3b3fbc9d455b77ef77
         WEB_SITE=http://www.kernel.org
          ENTERED=20070313
-         UPDATED=20080506
-      MAINTAINER=moe at lunar-linux.org
+         UPDATED=20090923
            SHORT="The uber-stable version of the 2.6 kernel"
      KEEP_SOURCE=on
            TMPFS=off
diff --git a/kernel/linux-2.6-stable/POST_INSTALL b/kernel/linux-2.6-stable/POST_INSTALL
index 1963779..dd6cddc 100644
--- a/kernel/linux-2.6-stable/POST_INSTALL
+++ b/kernel/linux-2.6-stable/POST_INSTALL
@@ -1,4 +1,4 @@
-update_bootloader $VERSION $VERSION
+update_bootloader $VERSION-`arch` $VERSION-`arch`
 
 #  Reinstall packages that add their own kernel modules
 
diff --git a/libs/glibc/BUILD b/libs/glibc/BUILD
index 24f09d7..492fff8 100644
--- a/libs/glibc/BUILD
+++ b/libs/glibc/BUILD
@@ -1,72 +1,71 @@
 (
-
+ 
 # This sedit takes care of Bug Report 398 submitted by Striker.
   sedit "s:/tmp:$SOURCE_DIRECTORY/tmp:g" scripts/test-installation.pl &&
   mkdir -p $SOURCE_DIRECTORY/tmp &&
-
+ 
   # There is no other option but nptl
-  OPTS="$OPTS --enable-add-ons=nptl,libidn --with-__thread --with-tls"
-
+  OPTS+=" --enable-add-ons=nptl,libidn --with-__thread --with-tls" &&
+ 
   if [ -n "$MAKES" ] && [ "$MAKES" -gt 1 ] ; then
     sedit "s/# PARALLELMFLAGS = -j 4/PARALLELMFLAGS = -j $MAKES/" Makefile.in
-  fi
-
-  export CC=gcc
-
+  fi &&
+ 
+  export CC=gcc &&
+ 
   # Don't fully strip libc
   if [[ "$LDFLAGS" == *-s* ]] ; then
     STRIP=y
-  fi
-  unset LDFLAGS
-
+  fi &&
+  unset LDFLAGS &&
+ 
   patch_it $SOURCE3 1 &&
-
+ 
   INSTALL_ROOT=$SOURCE_DIRECTORY/glibcroot &&
   mkdir -p $INSTALL_ROOT &&
-  cd $INSTALL_ROOT
-
-  OPTS="$OPTS --with-headers=/usr/include"
-
-  ../configure --prefix=/usr                           \
-               --infodir=/usr/share/info               \
-               --mandir=/usr/share/man                 \
-               --with-elf                              \
-               --with-gd=no                            \
-               --without-cvs                           \
-               --enable-shared                         \
-               --with-kernel=2.6.23                    \
-               $OPTS                                  &&
-
+  cd $INSTALL_ROOT &&
+ 
+  OPTS+=" --with-headers=/usr/include" &&
+ 
+  ../configure --prefix=/usr              \
+               --infodir=/usr/share/info  \
+               --mandir=/usr/share/man    \
+               --with-elf                 \
+               --with-gd=no               \
+               --without-cvs              \
+               --enable-shared            \
+               $OPTS                     &&
+ 
   # explicitly exit here since the following code unsets $?
   make || exit 1 &&
-
+ 
   # Preserve the old glibc temporarily
-  LD=/lib/ld-linux.so.2
-  GLIBC=/lib/libc.so.6
-  DL=/lib/libdl.so.2
-  M=/lib/libm.so.6
-  RT=/lib/librt.so.1
-  PTHREAD=/lib/libpthread.so.0
-  NSS=/lib/libnss_files.so.2
-  UTIL=/lib/libutil.so.1
-  NSL=/lib/libnsl.so.1
-  CRYPT=/lib/libcrypt.so.1
-
+  LD=/lib/ld-linux.so.2  &&
+  GLIBC=/lib/libc.so.6   &&
+  DL=/lib/libdl.so.2     &&
+  M=/lib/libm.so.6       &&
+  RT=/lib/librt.so.1     &&
+  PTHREAD=/lib/libpthread.so.0  &&
+  NSS=/lib/libnss_files.so.2    &&
+  UTIL=/lib/libutil.so.1        &&
+  NSL=/lib/libnsl.so.1          &&
+  CRYPT=/lib/libcrypt.so.1      &&
+ 
   case "`arch`" in
     alpha)
-          GLIBC=/lib/libc.so.6.1
-          DL=/lib/libdl.so.2.1
+          GLIBC=/lib/libc.so.6.1  &&
+          DL=/lib/libdl.so.2.1    &&
           M=/lib/libm.so.6.1
           ;;
      ppc)
-          LD=/lib/ld.so.1
+          LD=/lib/ld.so.1  &&
           DL=/lib/libdl.so.2
           ;;
      *)
           DL=/lib/libdl.so.2
           ;;
-  esac
-
+  esac &&
+ 
   cp $LD /lib/ld-lunar.so               &&
   cp $GLIBC /lib/libc-lunar.so          &&
   cp $DL /lib/libdl-lunar.so            &&
@@ -77,7 +76,7 @@
   cp $UTIL /lib/libutil-lunar.so        &&
   cp $NSL /lib/libnsl-lunar.so          &&
   cp $CRYPT /lib/libcrypt-lunar.so      &&
-
+ 
   # Setup links for libraries
   sln /lib/ld-lunar.so $LD               &&
   sln /lib/libc-lunar.so $GLIBC          &&
@@ -89,16 +88,16 @@
   sln /lib/libutil-lunar.so $UTIL        &&
   sln /lib/libnsl-lunar.so $NSL          &&
   sln /lib/libcrypt-lunar.so $CRYPT      &&
-
+ 
   # clean hack to make sure gnu/stubs.h gets refreshed
   rm -f /usr/include/gnu/stubs.h &&
-
+ 
   # This removes the old glibc
   prepare_install &&
-
+ 
   # And now we install the new
   make install &&
-
+ 
   # Now optionally perform debug symbol stripping only
   if [ "$STRIP" == "y" ] ; then
     for FN in ld-$VERSION.so \
@@ -106,37 +105,37 @@
         libnss_{compat,files,hesiod,nis,nisplus}-$VERSION.so \
         lib{memusage,pcprofile,SegFault,thread_db-1.0}.so ; do
       strip -S /lib/$FN
-    done
+    done &&
     for FN in "/usr/lib/gconv/*.so" ; do
       strip -S $FN
     done
   fi  &&
-
+ 
   # Added a symlink for ash and others
   ln -sf /usr/lib/libbsd-compat.a /usr/lib/libbsd.a  &&
-
+ 
   # Rebuild the ld cache
   rm -f /etc/ld.so.cache 2>/dev/null  &&
   ldconfig                            &&
-
+ 
   # Remove the temporary libc
   rm /lib/{ld,lib{c,dl,m,rt,pthread,nss_files,util,nsl,crypt}}-lunar.so  &&
-
+ 
   # Generate locale info
   if [ -z "$GLIBC_LOCALES" ]; then
     make localedata/install-locales || exit 1
   else
     devoke_installwatch &&
     for LOCALE in $GLIBC_LOCALES; do
-      INPUTFILE=$(echo $LOCALE | cut -d/ -f1 | sed -e 's:\..*$::g')
-      OUTPUTFILE=$(echo $LOCALE | cut -d/ -f1)
-      CHARMAP=$(echo  $LOCALE | cut -d/ -f2)
-      mkdir -p /usr/lib/locale/$OUTPUTFILE
-      echo "localedef -i $INPUTFILE -f $CHARMAP $OUTPUTFILE"
+      INPUTFILE=$(echo $LOCALE | cut -d/ -f1 | sed -e 's:\..*$::g') &&
+      OUTPUTFILE=$(echo $LOCALE | cut -d/ -f1) &&
+      CHARMAP=$(echo  $LOCALE | cut -d/ -f2) &&
+      mkdir -p /usr/lib/locale/$OUTPUTFILE &&
+      echo "localedef -i $INPUTFILE -f $CHARMAP $OUTPUTFILE" &&
       localedef -i $INPUTFILE -f $CHARMAP $OUTPUTFILE
     done
     invoke_installwatch &&
     touch /usr/lib/locale/locale-archive
   fi
-
+ 
 ) > $C_FIFO 2>&1 && ldconfig
diff --git a/libs/glibc/BUILD.x86_64 b/libs/glibc/BUILD.x86_64
index c61b76c..6720b9e 100644
--- a/libs/glibc/BUILD.x86_64
+++ b/libs/glibc/BUILD.x86_64
@@ -1,60 +1,61 @@
 (
-
+ 
 # This sedit takes care of Bug Report 398 submitted by Striker.
   sedit "s:/tmp:$SOURCE_DIRECTORY/tmp:g" scripts/test-installation.pl &&
   mkdir -p $SOURCE_DIRECTORY/tmp &&
-
+ 
   # There is no other option but nptl
-  OPTS="$OPTS --enable-add-ons=nptl,libidn --with-__thread --with-tls"
-
+  OPTS+=" --enable-add-ons=nptl,libidn --with-__thread --with-tls" &&
+ 
   if [ -n "$MAKES" ] && [ "$MAKES" -gt 1 ] ; then
     sedit "s/# PARALLELMFLAGS = -j 4/PARALLELMFLAGS = -j $MAKES/" Makefile.in
-  fi
-
-  export CC=gcc
-
+  fi &&
+ 
+  export CC=gcc &&
+ 
   # Don't fully strip libc
   if [[ "$LDFLAGS" == *-s* ]] ; then
     STRIP=y
-  fi
-  unset LDFLAGS 
-
+  fi &&
+  unset LDFLAGS &&
+ 
   patch_it $SOURCE3 1 &&
-
+ 
   INSTALL_ROOT=$SOURCE_DIRECTORY/glibcroot &&
   mkdir -p $INSTALL_ROOT &&
-  cd $INSTALL_ROOT
-
-  OPTS="$OPTS --with-headers=/usr/include"
-
-  ../configure --prefix=/usr                           \
-               --infodir=/usr/share/info               \
-               --mandir=/usr/share/man                 \
-               --with-elf                              \
-               --with-gd=no                            \
-               --without-cvs                           \
-               --enable-shared                         \
-               --host=$BUILD                           \
-               --build=$BUILD                          \
-               --with-kernel=2.6.23                    \
-               $OPTS                                  &&
-
+  cd $INSTALL_ROOT &&
+ 
+  OPTS+=" --with-headers=/usr/include" &&
+ 
+  ../configure --prefix=/usr              \
+               --infodir=/usr/share/info  \
+               --mandir=/usr/share/man    \
+               --with-elf                 \
+               --with-gd=no               \
+               --without-cvs              \
+               --enable-shared            \
+               --host=$BUILD              \
+	       --build=$BUILD             \
+               $OPTS                     &&
+ 
   # explicitly exit here since the following code unsets $?
-  make || exit 1
-
+  make || exit 1 &&
+ 
   # Preserve the old glibc temporarily
-  LD=/lib/ld-linux-x86-64.so.2
-  GLIBC=/lib/libc.so.6
-  DL=/lib/libdl.so.2
-  M=/lib/libm.so.6
-  RT=/lib/librt.so.1
-  PTHREAD=/lib/libpthread.so.0
-  NSS=/lib/libnss_files.so.2
-  UTIL=/lib/libutil.so.1
-  NSL=/lib/libnsl.so.1
-  CRYPT=/lib/libcrypt.so.1
-  DL=/lib/libdl.so.2
-
+  LD=/lib/ld-linux.so.2  &&
+  LD=/lib/ld-linux-x86-64.so.2  && 
+  GLIBC=/lib/libc.so.6   &&
+  DL=/lib/libdl.so.2     &&
+  M=/lib/libm.so.6       &&
+  RT=/lib/librt.so.1     &&
+  PTHREAD=/lib/libpthread.so.0  &&
+  NSS=/lib/libnss_files.so.2    &&
+  UTIL=/lib/libutil.so.1        &&
+  NSL=/lib/libnsl.so.1          &&
+  CRYPT=/lib/libcrypt.so.1      &&
+ 
+  DL=/lib/libdl.so.2  &&
+ 
   cp $LD /lib/ld-lunar.so               &&
   cp $GLIBC /lib/libc-lunar.so          &&
   cp $DL /lib/libdl-lunar.so            &&
@@ -65,7 +66,7 @@
   cp $UTIL /lib/libutil-lunar.so        &&
   cp $NSL /lib/libnsl-lunar.so          &&
   cp $CRYPT /lib/libcrypt-lunar.so      &&
-
+ 
   # Setup links for libraries
   sln /lib/ld-lunar.so $LD               &&
   sln /lib/libc-lunar.so $GLIBC          &&
@@ -77,16 +78,16 @@
   sln /lib/libutil-lunar.so $UTIL        &&
   sln /lib/libnsl-lunar.so $NSL          &&
   sln /lib/libcrypt-lunar.so $CRYPT      &&
-
+ 
   # clean hack to make sure gnu/stubs.h gets refreshed
-  rm -f /usr/include/gnu/stubs.h  &&
-
+  rm -f /usr/include/gnu/stubs.h &&
+ 
   # This removes the old glibc
-  prepare_install                 &&
-
+  prepare_install &&
+ 
   # And now we install the new
-  make install                    &&
-
+  make install &&
+ 
   # Now optionally perform debug symbol stripping only
   if [ "$STRIP" == "y" ] ; then
     for FN in ld-$VERSION.so \
@@ -94,37 +95,37 @@
         libnss_{compat,files,hesiod,nis,nisplus}-$VERSION.so \
         lib{memusage,pcprofile,SegFault,thread_db-1.0}.so ; do
       strip -S /lib/$FN
-    done
+    done &&
     for FN in "/usr/lib/gconv/*.so" ; do
       strip -S $FN
     done
   fi  &&
-  
+ 
   # Added a symlink for ash and others
   ln -sf /usr/lib/libbsd-compat.a /usr/lib/libbsd.a  &&
-
+ 
   # Rebuild the ld cache
   rm -f /etc/ld.so.cache 2>/dev/null  &&
   ldconfig                            &&
-
+ 
   # Remove the temporary libc
   rm /lib/{ld,lib{c,dl,m,rt,pthread,nss_files,util,nsl,crypt}}-lunar.so  &&
-
+ 
   # Generate locale info
   if [ -z "$GLIBC_LOCALES" ]; then
     make localedata/install-locales || exit 1
   else
     devoke_installwatch &&
     for LOCALE in $GLIBC_LOCALES; do
-      INPUTFILE=$(echo $LOCALE | cut -d/ -f1 | sed -e 's:\..*$::g')
-      OUTPUTFILE=$(echo $LOCALE | cut -d/ -f1)
-      CHARMAP=$(echo  $LOCALE | cut -d/ -f2)
-      mkdir -p /usr/lib/locale/$OUTPUTFILE
-      echo "localedef -i $INPUTFILE -f $CHARMAP $OUTPUTFILE"
+      INPUTFILE=$(echo $LOCALE | cut -d/ -f1 | sed -e 's:\..*$::g') &&
+      OUTPUTFILE=$(echo $LOCALE | cut -d/ -f1) &&
+      CHARMAP=$(echo  $LOCALE | cut -d/ -f2) &&
+      mkdir -p /usr/lib/locale/$OUTPUTFILE &&
+      echo "localedef -i $INPUTFILE -f $CHARMAP $OUTPUTFILE" &&
       localedef -i $INPUTFILE -f $CHARMAP $OUTPUTFILE
     done
     invoke_installwatch &&
     touch /usr/lib/locale/locale-archive
   fi
-  
+ 
 ) > $C_FIFO 2>&1 && ldconfig
diff --git a/libs/glibc/CONFIGURE b/libs/glibc/CONFIGURE
index 9c9ee7f..f871d4c 100644
--- a/libs/glibc/CONFIGURE
+++ b/libs/glibc/CONFIGURE
@@ -14,9 +14,9 @@ unpack_localedata() {
   message "Extracting locale data .. this might take a second .."
 
   # Extract the localedata directory from the source tarball
-  tar -C /tmp                    \
-      -T $FILELIST_FILE          \
-      --strip-components=1       \
+  tar -C /tmp               \
+      -T $FILELIST_FILE     \
+      --strip-components=1  \
       -xjf $SOURCE_CACHE/$SOURCE
 }
 
@@ -58,7 +58,7 @@ select_locales() {
   BACKTITLE="Glibc Configuration"
       TITLE="Locale Selection"
        HELP="Translated messages are automatically installed, but the locale database that controls other behavior is not.  Please select desired locale or locales.  If none are selected then all will be installed."
-  make_locales_checklist | xargs \
+  make_locales_checklist | xargs  \
   dialog --backtitle "$BACKTITLE" \
          --title     "$TITLE"     \
          --stdout                 \
diff --git a/libs/glibc/DETAILS b/libs/glibc/DETAILS
index caa7873..164a9ea 100644
--- a/libs/glibc/DETAILS
+++ b/libs/glibc/DETAILS
@@ -1,20 +1,20 @@
           MODULE=glibc
-         VERSION=2.7
-          SOURCE=$MODULE-$VERSION.tar.bz2
+         VERSION=2.10.1
+          SOURCE=$MODULE-$VERSION.tar.gz
          SOURCE2=$MODULE-libidn-$VERSION.tar.bz2
-         SOURCE3=$MODULE-2.7-no_timezones.patch
-   SOURCE_URL[0]=$GNU_URL/$MODULE/
-   SOURCE_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE/
-  SOURCE2_URL[0]=$GNU_URL/$MODULE/
-  SOURCE2_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE/
+         SOURCE3=$MODULE-$VERSION-no_timezones.patch
+   SOURCE_URL[0]=$GNU_URL/$MODULE
+   SOURCE_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE
+  SOURCE2_URL[0]=$GNU_URL/$MODULE
+  SOURCE2_URL[1]=ftp://ftp.gnu.org/pub/gnu/$MODULE
      SOURCE3_URL=$PATCH_URL
-      SOURCE_VFY=sha1:ccc70e95db826e4b1fd3b484154402fdc3df88f7
-     SOURCE2_VFY=sha1:2338cc9b5795f5e97a19aac6d7d00ab750e81ac3
-     SOURCE3_VFY=sha1:b8cbd1725572600db0df32321a771ce0b11894c8
+      SOURCE_VFY=sha1:e185b1faa54b734f9baba815142e9abf6c02054b
+     SOURCE2_VFY=sha1:50c1ac0d9ddff6eb83f75aa1c4cb84ba6fffa0cd
+     SOURCE3_VFY=sha1:9163df279f04efcc37a146115534e9fd0f9a19c5
         WEB_SITE=http://www.gnu.org/software/libc
          ENTERED=20010922
-         UPDATED=20071211
-           SHORT="C library for use with GNU/Hurd and GNU/Linux."
+         UPDATED=20090518
+           SHORT="C library for use with GNU/Hurd and GNU/Linux"
 PSAFE=no
 
 cat << EOF
diff --git a/libs/glibc/PRE_BUILD b/libs/glibc/PRE_BUILD
index c418228..1daa4b3 100644
--- a/libs/glibc/PRE_BUILD
+++ b/libs/glibc/PRE_BUILD
@@ -1,4 +1,4 @@
-default_pre_build               &&
-cd      $SOURCE_DIRECTORY       &&
-unpack  $SOURCE2                &&
+default_pre_build          &&
+cd      $SOURCE_DIRECTORY  &&
+unpack  $SOURCE2           &&
 mv glibc-libidn-$VERSION libidn
diff --git a/libs/readline/BUILD b/libs/readline/BUILD
index 10dd423..953d42d 100644
--- a/libs/readline/BUILD
+++ b/libs/readline/BUILD
@@ -1,7 +1,7 @@
 (
 
-  OUR_OLD_READLINE_VVV=$(lvu installed readline | perl -pe 's/([0-9]).+/$1/') &&
-  set_module_config OUR_OLD_READLINE_VVV "$OUR_OLD_READLINE_VVV" &&
+  OUR_OLD_READLINE_VVV=$(lvu installed readline | perl -pe 's/([0-9]).+/$1/')  &&
+  set_module_config OUR_OLD_READLINE_VVV "$OUR_OLD_READLINE_VVV"  &&
   # ************************ WARNING *************************
   # DO NOT MESS WITH THE CONFIGURE STUFF here unless you
   # really know what you're doing! We chose the lib location
@@ -9,19 +9,19 @@
   # needed at init time! If you move it you could break your 
   # system!
 
-  ./configure --libdir=/lib              \
-              --prefix=/usr              \
-              --mandir=/usr/share/man    \
+  ./configure --libdir=/lib               \
+              --prefix=/usr               \
+              --mandir=/usr/share/man     \
               --infodir=/usr/share/info  &&
   default_make                           &&
   if [ ! -e /etc/inputrc ] ; then 
     install $SCRIPT_DIRECTORY/inputrc /etc/
-  fi                                     &&
-  # temp hack to help in change over to readline-5.0 from readline-4.x
-  # can be removed when everyone is over to readline 5.0
-  devoke_installwatch                                  &&
-  ln -sf /lib/libreadline.so.5 /lib/libreadline.so.4 &&
-  ln -sf /lib/libhistory.so.5  /lib/libhistory.so.4  &&
+  fi  &&
+  # temp hack to help in change over to readline-6.0 from readline-5.x
+  # can be removed when everyone is over to readline 6.0
+  devoke_installwatch                                 &&
+  ln -sf /lib/libreadline.so.6 /lib/libreadline.so.5  &&
+  ln -sf /lib/libhistory.so.6  /lib/libhistory.so.5   &&
   invoke_installwatch                                  
 
 ) > $C_FIFO 2>&1
diff --git a/libs/readline/DETAILS b/libs/readline/DETAILS
index c58ca2a..54b2623 100644
--- a/libs/readline/DETAILS
+++ b/libs/readline/DETAILS
@@ -1,13 +1,13 @@
           MODULE=readline
-         VERSION=5.2
+         VERSION=6.0
           SOURCE=$MODULE-$VERSION.tar.gz
-   SOURCE_URL[0]=$GNU_URL/$MODULE/
-   SOURCE_URL[1]=ftp://ftp.cwru.edu/pub/bash/
-   SOURCE_URL[2]=ftp://ftp.gnu.org/pub/gnu/$MODULE/
-      SOURCE_VFY=sha1:18f3412c73068509d5f491b7b4535aeaf9522834
+   SOURCE_URL[0]=$GNU_URL/$MODULE
+   SOURCE_URL[1]=ftp://ftp.cwru.edu/pub/bash
+   SOURCE_URL[2]=ftp://ftp.gnu.org/pub/gnu/$MODULE
+      SOURCE_VFY=sha1:1e511b091514ef631c539552316787c75ace5262
         WEB_SITE=http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
          ENTERED=20010922
-         UPDATED=20061012
+         UPDATED=20090617
            SHORT="Lets users edit command lines as they are typed in"
 
 cat << EOF
diff --git a/libs/readline/POST_INSTALL b/libs/readline/POST_INSTALL
index b8e2a28..9755df3 100644
--- a/libs/readline/POST_INSTALL
+++ b/libs/readline/POST_INSTALL
@@ -11,6 +11,6 @@ if [[ "$OUR_NEW_READLINE_VVV" > "$OUR_OLD_READLINE_VVV" ]]; then
 
 fi
 
-rm -f /lib/libreadline.so.4 &&
-rm -f /lib/libhistory.so.4  &&
+#rm -f /lib/libreadline.so.5  &&
+#rm -f /lib/libhistory.so.5   &&
 unset_module_config OUR_OLD_READLINE_VVV


More information about the Lunar-commits mailing list