logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

gcc-10-libgcc-builtin-macros.patch (1731B)


  1. SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
  2. SPDX-FileCopyrightText: 2014 Joseph Myers <joseph@codesourcery.com>
  3. SPDX-License-Identifier: GPL-3.0-or-later
  4. GCC 10 uses a variety of compiler builtin macros in libgcc.
  5. These macros do not exist in GCC 4.7, so we add them in.
  6. (Taken straight from GCC 10).
  7. (We could -D them in GCC 10, but this is a simpler unobtrusive
  8. solution, and is arguably more correct).
  9. --- gcc-4.7.4/gcc/c-family/c-cppbuiltin.c 2023-01-25 16:56:44.122222376 +1100
  10. +++ gcc-4.7.4/gcc/c-family/c-cppbuiltin.c 2023-01-25 17:01:52.500855016 +1100
  11. @@ -850,6 +850,30 @@
  12. builtin_define_with_int_value ("__LIBGCC_TRAMPOLINE_SIZE__",
  13. TRAMPOLINE_SIZE);
  14. + /* For libgcc unwinder code. */
  15. +#ifdef DONT_USE_BUILTIN_SETJMP
  16. + cpp_define (pfile, "__LIBGCC_DONT_USE_BUILTIN_SETJMP__");
  17. +#endif
  18. +#ifdef DWARF_ALT_FRAME_RETURN_COLUMN
  19. + builtin_define_with_int_value ("__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__",
  20. + DWARF_ALT_FRAME_RETURN_COLUMN);
  21. +#endif
  22. + builtin_define_with_int_value ("__LIBGCC_DWARF_FRAME_REGISTERS__",
  23. + DWARF_FRAME_REGISTERS);
  24. +#ifdef EH_RETURN_STACKADJ_RTX
  25. + cpp_define (pfile, "__LIBGCC_EH_RETURN_STACKADJ_RTX__");
  26. +#endif
  27. +#ifdef JMP_BUF_SIZE
  28. + builtin_define_with_int_value ("__LIBGCC_JMP_BUF_SIZE__",
  29. + JMP_BUF_SIZE);
  30. +#endif
  31. + builtin_define_with_int_value ("__LIBGCC_STACK_POINTER_REGNUM__",
  32. + STACK_POINTER_REGNUM);
  33. +
  34. + /* For libgcov. */
  35. + builtin_define_with_int_value ("__LIBGCC_VTABLE_USES_DESCRIPTORS__",
  36. + TARGET_VTABLE_USES_DESCRIPTORS);
  37. +
  38. /* For use in assembly language. */
  39. builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
  40. builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);