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

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