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.

26 lines
736 B

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