#!/bin/bash # Lockin new version of gcc. source `which ttPM-funcs` 2>/dev/null || exit 1 if [ $# -ne 1 ] then printMsg warning "Usage: `basename $0` 1|2" error "Enter lockin stage" fi touch ~/.Loggedin if [ "$TT_SYS_BIT" = "64" ] then L="/lib/ld-linux-x86-64.so.2" else L="/lib/ld-linux.so.2" fi SPECS_FILE=`dirname $(gcc -print-libgcc-file-name)`/specs case $1 in 1) #cp $SPECS_FILE $SPECS_FILE.old gcc -dumpspecs | sed -e "s:$L:${TT_BOOTSTRAP_PREFIX}&:g" > $SPECS_FILE # Clean up the fixed headers to avoid using them from now on # Note: This is just to be safe in case the fixincludes is not disabled during compilation GCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` ;; 2) #cp $SPECS_FILE $SPECS_FILE.old gcc -dumpspecs | sed -e '/^\*link:$/{n;s,$, -L/usr/lib,}' -e "s:$TT_BOOTSTRAP_PREFIX$L:$L:g" > $SPECS_FILE ;; *) error "Usage: `basename $0` 1|2" ;; esac # Create the log for the current version #$BASH logInstalledFiles lockinGCC-$1