OpenSDE Packages Database (without history before r20070)
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.

34 lines
1.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../gcc/apply-protector.sh
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. # only try to apply protector if available
  15. pfile=`match_source_file -p protector` || true
  16. if [ "$pfile" ] ; then
  17. echo "Inserting SPP ..."
  18. ppatch=`tar -v $taropt $pfile | grep 'dif\$' | head -n 1`
  19. if [ "$ppatch" -a -f $ppatch ]; then
  20. [ -f $confdir/protector-adapter.diff ] &&
  21. patch -p0 $ppatch $confdir/protector-adapter.diff
  22. patch -p0 < $ppatch
  23. else
  24. abort "Protector patch not found"
  25. fi
  26. if [ -f protector.c ] ; then
  27. mv protector.{c,h} gcc/
  28. fi
  29. else
  30. echo "No stack-protector available for $pkg ..."
  31. fi