spu-elf.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* Copyright (C) 2006-2015 Free Software Foundation, Inc.
  2. This file is free software; you can redistribute it and/or modify it under
  3. the terms of the GNU General Public License as published by the Free
  4. Software Foundation; either version 3 of the License, or (at your option)
  5. any later version.
  6. This file is distributed in the hope that it will be useful, but WITHOUT
  7. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  8. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  9. for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with GCC; see the file COPYING3. If not see
  12. <http://www.gnu.org/licenses/>. */
  13. #ifndef OBJECT_FORMAT_ELF
  14. #error elf.h included before elfos.h
  15. #endif
  16. #define BSS_SECTION_ASM_OP "\t.section .bss"
  17. #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  18. asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
  19. /* The following macros define "native" directory locations; on the SPU,
  20. these are used only when building the compiler with --with-sysroot.
  21. This can be used to build a pair of PPU and SPU cross-compilers with
  22. a common sysroot; the SPU compiler will search for its files in
  23. ${sysroot}/include and ${sysroot}/lib. */
  24. /* STANDARD_STARTFILE_PREFIX_1 is "/lib", which we keep.
  25. STANDARD_STARTFILE_PREFIX_2 is "/usr/lib" -- we remove this. */
  26. #undef STANDARD_STARTFILE_PREFIX_2
  27. #define STANDARD_STARTFILE_PREFIX_2 ""
  28. /* We do not provide any "/usr/local/include" directory on SPU. */
  29. #undef LOCAL_INCLUDE_DIR
  30. /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
  31. the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
  32. provides part of the support for getting C++ file-scope static
  33. object constructed before entering `main'. */
  34. #undef STARTFILE_SPEC
  35. #define STARTFILE_SPEC "%{mstdmain: %{pg|p:gcrt2.o%s;:crt2.o%s}}\
  36. %{!mstdmain: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
  37. crti.o%s crtbegin.o%s"
  38. #undef ENDFILE_SPEC
  39. #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
  40. #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
  41. #define DWARF2_DEBUGGING_INFO 1
  42. #define DWARF2_ASM_LINE_DEBUG_INFO 1
  43. #define SET_ASM_OP "\t.set\t"
  44. #undef TARGET_ASM_NAMED_SECTION
  45. #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
  46. #define EH_FRAME_IN_DATA_SECTION 1
  47. #define LINK_SPEC "%{mlarge-mem: --defsym __stack=0xfffffff0 }"
  48. #define LIB_SPEC "-( %{!shared:%{g*:-lg}} -lc -lgloss -) \
  49. %{mno-atomic-updates:-lgcc_cachemgr_nonatomic; :-lgcc_cachemgr} \
  50. %{mcache-size=128:-lgcc_cache128k; \
  51. mcache-size=64 :-lgcc_cache64k; \
  52. mcache-size=32 :-lgcc_cache32k; \
  53. mcache-size=16 :-lgcc_cache16k; \
  54. mcache-size=8 :-lgcc_cache8k; \
  55. :-lgcc_cache64k}"