[Lunar-commits] <moonbase-core> Merge pull request #298 from v4hn/gcc-4.8

Auke Kok sofar+github at foo-projects.org
Sun May 5 00:19:34 CEST 2013


commit 569cda33e051b778551fc54a3253973b8dca35b6
Author: Auke Kok <sofar+github at foo-projects.org>
Date: Sat, 04 May 2013 15:19:30 -0700
URL: https://github.com/lunar-linux/moonbase-core/commit/569cda33e051b778551fc54a3253973b8dca35b6

Merge pull request #298 from v4hn/gcc-4.8

gcc 4.8 is out.
---
  compilers/gcc/BUILD                            | +31/-41   
  compilers/gcc/BUILD.x86_64                     | +0/-53    
  compilers/gcc/CONFIGURE                        | +0/-1     
  compilers/gcc/DETAILS                          | +3/-3     
  compilers/gcc/PRE_BUILD.x86_64                 | +2/-0     
  compilers/gcc/plugin.d/optimize-gcc_4_8.plugin | +24/-25   
  6 files changed, 60 insertions(+), 123 deletions(-)

--- a/compilers/gcc/BUILD
+++ b/compilers/gcc/BUILD
@@ -1,51 +1,41 @@
-(
+# move libstdc++.so.*-gdb.py to libexec dir
+patch_it $SOURCE2 1 &&
 
-  patch_it $SOURCE_CACHE/$SOURCE2 1  &&
+# installwatch fails to track files installed using tar
+sedit 's;^\(build_install_headers_dir=\).*;\1install-headers-cp;' gcc/config.build &&
 
-  # This will fix an issue where installwatch fail to track installed headers
-  sedit 's;^\(build_install_headers_dir=\).*;\1install-headers-cp;' gcc/config.build &&
+# We use libiberty.a from binutils instead
+sedit 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in  &&
 
-  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  &&
+mkdir BUILD  &&
+cd BUILD     &&
 
-  LANGUAGES="${LANGUAGES:=c++}"  &&
+LANGUAGES="${LANGUAGES:=c++}"  &&
 
-  ../configure --build=$BUILD                         \
-               --host=$BUILD                          \
-               --enable-languages=$LANGUAGES          \
-               --prefix=${MODULE_PREFIX}              \
-               --infodir=${MODULE_PREFIX}/share/info  \
-               --mandir=${MODULE_PREFIX}/share/man    \
-               --enable-__cxa_atexit                  \
-               --enable-threads                       \
-               --disable-nls                          \
-               --enable-target-optspace               \
-               --with-gnu-ld                          \
-               --with-system-zlib                     \
-               --enable-shared                        \
-               $OPTS                                 &&
+../configure --build=$BUILD                         \
+             --host=$BUILD                          \
+             --enable-languages=$LANGUAGES          \
+             --prefix=${MODULE_PREFIX}              \
+             --infodir=${MODULE_PREFIX}/share/info  \
+             --mandir=${MODULE_PREFIX}/share/man    \
+             --enable-__cxa_atexit                  \
+             --enable-threads                       \
+             --disable-nls                          \
+             --enable-target-optspace               \
+             --with-gnu-ld                          \
+             --with-system-zlib                     \
+             --enable-shared                        \
+             $OPTS                                 &&
 
-  make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap-lean  &&
-  prepare_install  &&
-  make install &&
+make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap-lean  &&
+prepare_install  &&
+make install &&
 
-# This used to be the POST_INSTALL and it really should not have. Doing this sort of thing means
-# these files will not be tracked; that is a no-no-no.
-
-  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  &&
+ln -sf /usr/bin/cpp /usr/lib/gcc/$BUILD/$VERSION/cpp &&
+ln -sf /usr/bin/cpp /lib/cpp                         &&
+ln -sf gcc          /usr/bin/cc                      &&
 
 # remove the offending broken freetype link
-  rm -f $MODULE_PREFIX/lib/gcc/$BUILD/$VERSION/include-fixed/freetype
-
-) > $C_FIFO 2>&1
+rm -f $MODULE_PREFIX/lib/gcc/$BUILD/$VERSION/include-fixed/freetype
--- a/compilers/gcc/BUILD.x86_64
+++ /dev/null
@@ -1,53 +0,0 @@
-(
-
-  patch_it $SOURCE_CACHE/$SOURCE2 1  &&
-
-  # This will fix an issue where installwatch fail to track installed headers
-  sedit 's;^\(build_install_headers_dir=\).*;\1install-headers-cp;' gcc/config.build &&
-
-
-  mkdir BUILD  &&
-  cd BUILD     &&
-
-  #sedit 's/trap 0/trap "" 0/' ../configure  &&
-  # We use libiberty.a from binutils instead
-  sedit 's/install_to_$(INSTALL_DEST) //' ../libiberty/Makefile.in  &&
-
-  LANGUAGES=${LANGUAGES:=c++}  &&
-
-  ../configure --host=$BUILD                          \
-               --build=$BUILD                         \
-               --enable-languages=$LANGUAGES          \
-               --prefix=${MODULE_PREFIX}              \
-               --infodir=${MODULE_PREFIX}/share/info  \
-               --mandir=${MODULE_PREFIX}/share/man    \
-               --enable-__cxa_atexit                  \
-               --enable-threads                       \
-               --disable-nls                          \
-               --enable-target-optspace               \
-               --with-gnu-ld                          \
-               --with-system-zlib                     \
-               --enable-shared                        \
-               --disable-multilib                     \
-               $OPTS                                 &&
-
-  make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap-lean  &&
-  prepare_install  &&
-  make install &&
-
-# This used to be the POST_INSTALL and it really should not have. Doing this sort of thing means
-# these files will not be tracked; that is a no-no-no.
-
-  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  &&
-
-# remove the offending freetype broken link
-  rm -f $MODULE_PREFIX/lib/gcc/$BUILD/$VERSION/include-fixed/freetype
-
-) > $C_FIFO 2>&1
--- a/compilers/gcc/CONFIGURE
+++ b/compilers/gcc/CONFIGURE
@@ -1,4 +1,3 @@
-
 # only lin -r gcc will trigger the language selector!
 if [ -n "$RECONFIGURE" ] ; then
 
--- a/compilers/gcc/DETAILS
+++ b/compilers/gcc/DETAILS
@@ -1,16 +1,16 @@
           MODULE=gcc
-         VERSION=4.7.3
+         VERSION=4.8.0
           SOURCE=$MODULE-$VERSION.tar.bz2
          SOURCE2=$MODULE-4.5.0-python.patch.bz2
    SOURCE_URL[0]=$GNU_URL/gcc/$MODULE-$VERSION
    SOURCE_URL[1]=ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION
    SOURCE_URL[2]=http://www.online-mirror.org/gcc/$MODULE-$VERSION
      SOURCE2_URL=$PATCH_URL
-      SOURCE_VFY=sha1:69e02737bd6e1a7c6047d801600d39c32b9427ca
+      SOURCE_VFY=sha1:b4ee6e9bdebc65223f95067d0cc1a634b59dad72
      SOURCE2_VFY=sha1:7c1fc0b526b74cce301b85acee04011ed6e5aa5a
         WEB_SITE=http://gcc.gnu.org
          ENTERED=20020628
-         UPDATED=20130414
+         UPDATED=20130403
            SHORT="GNU compiler collection"
 
 cat << EOF
--- /dev/null
+++ b/compilers/gcc/PRE_BUILD.x86_64
@@ -0,0 +1,2 @@
+OPTS+=" --disable-multilib" &&
+default_pre_build
@@ -1,16 +1,16 @@
 #
-# gcc-4.7.x compiler optimizations plugin
+# gcc-4.8.x compiler optimizations plugin
 #
 
-plugin_compiler_gcc_4_7_optimize()
+plugin_compiler_gcc_4_8_optimize()
 {
-  if [ "${LUNAR_COMPILER:-GCC_4_7}" != "GCC_4_7" ]; then
+  if [ "${LUNAR_COMPILER:-GCC_4_8}" != "GCC_4_8" ]; then
     return 2
   fi
 
-  debug_msg "plugin_compiler_gcc_4_7_optimize($@)"
-  if [ -f /etc/lunar/local/optimizations.GCC_4_7 ]; then
-    . /etc/lunar/local/optimizations.GCC_4_7
+  debug_msg "plugin_compiler_gcc_4_8_optimize($@)"
+  if [ -f /etc/lunar/local/optimizations.GCC_4_8 ]; then
+    . /etc/lunar/local/optimizations.GCC_4_8
   fi
 
   # some local macro's
@@ -49,7 +49,7 @@ plugin_compiler_gcc_4_7_optimize()
   if [ "$CPU" != "None" -a -n "$CPU" ]; then
     c_cxx_flags_add "-march=$CPU"
   fi
-  # CFLAGS -mtune cpu-specific tuning 
+  # CFLAGS -mtune cpu-specific tuning
   if [ "$CPUTUNE" != "None" -a -n "$CPUTUNE" ]; then
     c_cxx_flags_add "-mtune=$CPUTUNE"
   fi
@@ -159,17 +159,17 @@ plugin_compiler_gcc_4_7_optimize()
 }
 
 
-plugin_compiler_gcc_4_7_menu()
+plugin_compiler_gcc_4_8_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_7"
-    echo "GNU C Compiler suite version 4.7.x"
+    echo "GCC_4_8"
+    echo "GNU C Compiler suite version 4.8.x"
     return 2
-  elif [ "$1" != "GCC_4_7" ]; then
+  elif [ "$1" != "GCC_4_8" ]; then
     # we don't display anything when the user selected a
     # different menu
     return 2
@@ -177,8 +177,8 @@ plugin_compiler_gcc_4_7_menu()
 
   # now we are done with determining if we are really the menu
   # that the user wants - so we can display it
-  menu() 
-  { 
+  menu()
+  {
     unset RESULT
     if [ "$1" == "checklist" ]; then
       RESULT=`$DIALOG --no-cancel --item-help --separate-output --checklist "$2" 0 0 0 "${OPTIONS[@]}"`
@@ -198,7 +198,7 @@ plugin_compiler_gcc_4_7_menu()
   save_optimizations()
   {
     debug_msg "save_optimizations($@)"
-    cat >/etc/lunar/local/optimizations.GCC_4_7  <<EOF
+    cat >/etc/lunar/local/optimizations.GCC_4_8  <<EOF
 CPU=$CPU
 CPUTUNE=$CPUTUNE
 BOPT=$BOPT
@@ -210,8 +210,8 @@ STACK=$STACK
 EOF
   }
 
-  if [ -f /etc/lunar/local/optimizations.GCC_4_7 ]; then
-    . /etc/lunar/local/optimizations.GCC_4_7
+  if [ -f /etc/lunar/local/optimizations.GCC_4_8 ]; then
+    . /etc/lunar/local/optimizations.GCC_4_8
   fi
 
   export IFS=$'\t\n'
@@ -221,7 +221,7 @@ EOF
 
   while true; do
     unset OPTIONS
-    IS_DEFAULT=$([ "$(get_local_config LUNAR_COMPILER)" == "GCC_4_7" ] && echo DEFAULT || get_local_config LUNAR_COMPILER)
+    IS_DEFAULT=$([ "$(get_local_config LUNAR_COMPILER)" == "GCC_4_8" ] && 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"
@@ -270,11 +270,11 @@ EOF
         return
       fi
 
-      case $CHOICE in 
+      case $CHOICE in
         default)
           if [ "$IS_DEFAULT" != "DEFAULT" ]; then
-            set_local_config LUNAR_COMPILER GCC_4_7
-            $DIALOG --msgbox "Gcc 4.7 is now the default compiler!" 6 60
+            set_local_config LUNAR_COMPILER GCC_4_8
+            $DIALOG --msgbox "Gcc 4.8 is now the default compiler!" 6 60
           fi
           ;;
         safe)
@@ -496,7 +496,7 @@ EOF
           OPTIONS=(
             "None" "Use compiler default" $([ "$FPM" == "None" ] && echo "on" || echo "off" ) "Use compiler default"
             )
-          case $PLATFORM in 
+          case $PLATFORM in
             x86|x86_64)
               if grep '^fpu' /proc/cpuinfo | grep -qw yes; then
                 OPTIONS=(
@@ -549,7 +549,7 @@ EOF
               fi
               if grep -qw sse /proc/cpuinfo; then
                 OPTIONS=(
-                  ${OPTIONS[@]} 
+                  ${OPTIONS[@]}
                   "SSE" "SSE" $( echo ${XTRA[@]} | grep -q "SSE" && echo "on" || echo "off" ) "Streaming SIMD (Single Instruction, Multiple Data) Extensions"
                   )
               fi
@@ -665,6 +665,5 @@ EOF
 }
 
 
-plugin_register BUILD_BUILD plugin_compiler_gcc_4_7_optimize
-plugin_register OPTIMIZE_MENU plugin_compiler_gcc_4_7_menu
-
+plugin_register BUILD_BUILD plugin_compiler_gcc_4_8_optimize
+plugin_register OPTIMIZE_MENU plugin_compiler_gcc_4_8_menu




More information about the Lunar-commits mailing list