OpenSDE Framework (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.

62 lines
1.7 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: architecture/sparc64/parse-config
  5. # Copyright (C) 2006 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. alter_arch()
  16. {
  17. case "$SDECFG_SPARC64_OPT" in
  18. generic) x=v9 ;;
  19. *) x=v9b ;;
  20. esac
  21. echo_status "Altering arch_{machine,target} to sparc$x ..."
  22. # tweak target and other defines
  23. arch_machine=${arch_machine/64/$x}
  24. arch_target=${arch_target/64/$x}
  25. atstage native && arch_build=${arch_build/64/$x}
  26. # let the libdir and configure options regenerate
  27. set_confopt
  28. }
  29. if [ "$SDECFG_SPARC64_32BIT" = 1 ]; then
  30. # TODO: make dietlibc parse-config -7 (or so) and this one -9 (or so) ,-)
  31. x="${pkg//-/_}" ; x="${x//+/_}"
  32. eval x=\$SDECFG_DIETLIBC_$x
  33. if [ "$x" = 1 ]; then
  34. echo_status "Building package for 64bit ..."
  35. var_append GCC_WRAPPER_INSERT ' ' '-m64'
  36. else
  37. case $pkg in
  38. gcc|binutils)
  39. echo_status "Patching package to default to 32bit ..."
  40. var_append patchfiles ' ' \
  41. "$base/architecture/$arch/pkg_$pkg.diff"
  42. ;;
  43. glibc|module-init-tools|modutils|iptables|strace|gdb)
  44. echo_status "Building for 64bit ..."
  45. var_append GCC_WRAPPER_INSERT ' ' '-m64'
  46. ;;
  47. linux2*)
  48. ;;
  49. ncurses)
  50. var_append GCC_WRAPPER_INSERT ' ' '-m64'
  51. ;;
  52. *) # including glibc32
  53. alter_arch
  54. ;;
  55. esac
  56. fi
  57. fi