mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
850 B

pfile=$( echo "$3" | grep protector | tr ' ' '\t' | tr -s '\t' | cut -f2 )
if [ "$pfile" ]
then
tar='tar --use-compress-program=bzip2'
pdif=$($tar -tf $archdir/${pfile/.gz/.bz2} | \
grep '\.dif$' | grep -v 'protectonly\.dif'; )
$tar -xf $archdir/${pfile/.gz/.bz2}
# Patch protector.dif a bit to apply against current gcc-3
if test -f $1/package/base/gcc/$2/protector-hotfix.diff; then
echo "Hotfixing the protector patch .."
patch -p1 < $1/package/base/gcc/$2/protector-hotfix.diff
fi
# be careful if you enable this, you have to respect $pkg.
# Set -fstack-protector as default?
# [ $ROCKCFG_PKG_GCC[23]_STACKPRO = 1 ] && patch -p0 < protectonly.dif
echo "Applying the protector patch .."
patch -p0 < $pdif
if [ $2 != gcc34 ]; then
mv protector.{c,h} gcc/
fi
else
echo "No stack-protector available for $2 ..."
fi