#!/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 L="/lib/ld-linux.so.2" SPECS_FILE=`gcc --print-file specs` case $1 in 1) cp $SPECS_FILE $SPECS_FILE.old gcc -dumpspecs | sed -e "s:$L:${TT_BOOTSTRAP_PREFIX}&:g" > $SPECS_FILE ;; 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