mti-linux.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Target macros for mips*-mti-linux* targets.
  2. Copyright (C) 2012-2015 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. GCC is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. /* This target is a multilib target, specify the sysroot paths. */
  16. #undef SYSROOT_SUFFIX_SPEC
  17. #if MIPS_ISA_DEFAULT == 33 /* mips32r2 is the default */
  18. #define SYSROOT_SUFFIX_SPEC \
  19. "%{mips32:/mips32}%{mips64:/mips64}%{mips64r2:/mips64r2}%{mips32r6:/mips32r6}%{mips64r6:/mips64r6}%{mips16:/mips16}%{mmicromips:/micromips}%{mabi=64:/64}%{mel|EL:/el}%{msoft-float:/sof}%{!mips32r6:%{!mips64r6:%{mnan=2008:/nan2008}}}"
  20. #elif MIPS_ISA_DEFAULT == 37 /* mips32r6 is the default */
  21. #define SYSROOT_SUFFIX_SPEC \
  22. "%{mips32:/mips32}%{mips64:/mips64}%{mips32r2:/mips32r2}%{mips64r2:/mips64r2}%{mips64r6:/mips64r6}%{mips16:/mips16}%{mmicromips:/micromips}%{mabi=64:/64}%{mel|EL:/el}%{msoft-float:/sof}%{!mips32r6:%{!mips64r6:%{mnan=2008:/nan2008}}}"
  23. #else /* Unexpected default ISA. */
  24. #error No SYSROOT_SUFFIX_SPEC exists for this default ISA
  25. #endif
  26. #undef DRIVER_SELF_SPECS
  27. #define DRIVER_SELF_SPECS \
  28. /* Set the ISA for the default multilib. */ \
  29. MIPS_DEFAULT_ISA_LEVEL_SPEC, \
  30. \
  31. /* Make sure a -mips option is present. This helps us to pick \
  32. the right multilib, and also makes the later specs easier \
  33. to write. */ \
  34. MIPS_ISA_LEVEL_SPEC, \
  35. \
  36. /* Infer the default float setting from -march. */ \
  37. MIPS_ARCH_FLOAT_SPEC, \
  38. \
  39. /* Infer the -msynci setting from -march if not explicitly set. */ \
  40. MIPS_ISA_SYNCI_SPEC, \
  41. \
  42. /* If no ABI option is specified, infer one from the ISA level \
  43. or -mgp setting. */ \
  44. "%{!mabi=*: %{" MIPS_32BIT_OPTION_SPEC ": -mabi=32;: -mabi=n32}}", \
  45. \
  46. /* If no FP ABI option is specified, infer one from the \
  47. ABI/ISA level. */ \
  48. "%{!msoft-float: %{!msingle-float: %{!mfp*: %{mabi=32: %{" \
  49. MIPS_FPXX_OPTION_SPEC ": -mfpxx}}}}}", \
  50. \
  51. /* Base SPECs. */ \
  52. BASE_DRIVER_SELF_SPECS \
  53. \
  54. /* Use the standard linux specs for everything else. */ \
  55. LINUX_DRIVER_SELF_SPECS