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.

66 lines
2.4 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../libstdc++-v3-32/libstdc++-v3-32.conf
  5. # Copyright (C) 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. # --- T2-COPYRIGHT-NOTE-END ---
  14. function setup_xgcc_wrapper() {
  15. mkdir -p gcc ; pushd gcc
  16. cat <<-EOF > xgcc-wrapper
  17. #!/bin/bash
  18. # place the xgcc in the path
  19. export PATH="$PWD:\$PATH"
  20. [ "\$GCC_WRAPPER_DEBUG" = 1 ] && export CMD_WRAPPER_DEBUG=1
  21. mycmd=\$1
  22. if [ "\${mycmd%gcj}" != "\$mycmd" ]; then
  23. export CMD_WRAPPER_OTHERS="\$GCJ_WRAPPER_OTHERS"
  24. export CMD_WRAPPER_INSERT="\$GCJ_WRAPPER_INSERT"
  25. export CMD_WRAPPER_REMOVE="\$GCJ_WRAPPER_REMOVE"
  26. export CMD_WRAPPER_APPEND="\$GCJ_WRAPPER_APPEND"
  27. export CMD_WRAPPER_FILTER="\$GCJ_WRAPPER_FILTER"
  28. elif [ "\${mycmd%gfortran}" != "\$mycmd" ]; then
  29. export CMD_WRAPPER_OTHERS="\$F95_WRAPPER_OTHERS"
  30. export CMD_WRAPPER_INSERT="\$F95_WRAPPER_INSERT"
  31. export CMD_WRAPPER_REMOVE="\$F95_WRAPPER_REMOVE"
  32. export CMD_WRAPPER_APPEND="\$F95_WRAPPER_APPEND"
  33. export CMD_WRAPPER_FILTER="\$F95_WRAPPER_FILTER"
  34. else
  35. export CMD_WRAPPER_OTHERS="\$CC_WRAPPER_OTHERS:\$GCC_WRAPPER_OTHERS:\$GCC3_WRAPPER_OTHERS"
  36. export CMD_WRAPPER_INSERT="\$CC_WRAPPER_INSERT \$GCC_WRAPPER_INSERT \$GCC3_WRAPPER_INSERT"
  37. export CMD_WRAPPER_REMOVE="\$CC_WRAPPER_REMOVE \$GCC_WRAPPER_REMOVE \$GCC3_WRAPPER_REMOVE"
  38. export CMD_WRAPPER_APPEND="\$CC_WRAPPER_APPEND \$GCC_WRAPPER_APPEND \$GCC3_WRAPPER_APPEND"
  39. export CMD_WRAPPER_FILTER="\$CC_WRAPPER_FILTER|\$GCC_WRAPPER_FILTER|\$GCC3_WRAPPER_FILTER"
  40. fi
  41. exec cmd_wrapper "\$@"
  42. EOF
  43. chmod 0755 xgcc-wrapper
  44. export STAGE_CC_WRAPPER=$PWD/xgcc-wrapper
  45. popd
  46. }
  47. # we need -m32 ... - still needed?
  48. var_insert GCC_WRAPPER_INSERT " " "-m32 -Wa,--32"
  49. arch_target="`echo $arch_target | arch2arch32`"
  50. arch_build="`echo $arch_build | arch2arch32`"
  51. arch_machine="`echo $arch_machine | arch2arch32`"
  52. echo_status "Set arch_target to $arch_target ..."
  53. set_confopt
  54. # do what libstdc++-v3 does
  55. . $base/package/*/libstdc++-v3/libstdc++-v3.conf
  56. hook_add premake 5 setup_xgcc_wrapper