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.

55 lines
1.6 KiB

  1. #!/bin/sh
  2. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # T2 SDE: package/.../gcc/wrappers.in
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. gcc_build_wrapper() {
  17. local x="$1" y z ; shift
  18. local p="$1" ; shift
  19. for y ; do
  20. local ver=`$y -dumpversion 2> /dev/null`
  21. [ $? != 0 ] && continue
  22. [ "$x" != "$p" ] && z="$x,$p" || z="$x"
  23. case "$ver" in
  24. 2.*) z="$z,${p}2" ;;
  25. 3.*) z="$z,${p}3" ;;
  26. 4.*) z="$z,${p}4" ;;
  27. *) continue ;;
  28. esac
  29. if [ $x = KCC ] ; then
  30. build_wrapper $x $y
  31. else
  32. build_wrapper $z $y
  33. fi
  34. done
  35. }
  36. gcc_build_wrapper CC GCC ${arch_target}-cc ${arch_target}-gcc{-2,-3,-33,-x,}
  37. gcc_build_wrapper KCC GCC ${arch_target}-kcc{-2,-3,-33,-x,}
  38. if atstage native || [ "$SDECFG_USE_CROSSCC" = 0 ] ; then
  39. gcc_build_wrapper CC GCC cc gcc{-2,-3,-33,-x,}
  40. gcc_build_wrapper CXX GCC {c,g}++{-2,-3,-33,-x,}
  41. gcc_build_wrapper F77 GCC {g,f}77{-2,-3,-33,-x,}
  42. gcc_build_wrapper KCC GCC kcc{-2,-3,-33,-x,}
  43. gcc_build_wrapper CPP CPP cpp{-2,-3,-33,-x,}
  44. else
  45. # system compiler used in stage 0 - mostly for ccache
  46. gcc_build_wrapper SYSCC SYSGCC {,g}cc
  47. gcc_build_wrapper SYSCXX SYSGCC {c,g}++
  48. gcc_build_wrapper SYSCPP SYSCPP cpp
  49. fi