0001-libgcc_s.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From f09a0caf978b7aca4a95dd96bc0bdcd9016b933d Mon Sep 17 00:00:00 2001
  2. From: Szabolcs Nagy <nsz@port70.net>
  3. Date: Sat, 20 Aug 2016 21:16:00 +0000
  4. Subject: [PATCH 1/8] libgcc_s
  5. ---
  6. gcc/config/i386/i386.c | 4 ++--
  7. libgcc/config/i386/cpuinfo.c | 6 +++---
  8. libgcc/config/i386/t-linux | 2 +-
  9. 3 files changed, 6 insertions(+), 6 deletions(-)
  10. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
  11. index 2639c8c..88c7ebe 100644
  12. --- a/gcc/config/i386/i386.c
  13. +++ b/gcc/config/i386/i386.c
  14. @@ -36049,10 +36049,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
  15. {
  16. case IX86_BUILTIN_CPU_INIT:
  17. {
  18. - /* Make it call __cpu_indicator_init in libgcc. */
  19. + /* Make it call __cpu_indicator_init_local in libgcc.a. */
  20. tree call_expr, fndecl, type;
  21. type = build_function_type_list (integer_type_node, NULL_TREE);
  22. - fndecl = build_fn_decl ("__cpu_indicator_init", type);
  23. + fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
  24. call_expr = build_call_expr (fndecl, 0);
  25. return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
  26. }
  27. diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
  28. index 8c2248d..6c82f15 100644
  29. --- a/libgcc/config/i386/cpuinfo.c
  30. +++ b/libgcc/config/i386/cpuinfo.c
  31. @@ -485,7 +485,7 @@ __cpu_indicator_init (void)
  32. return 0;
  33. }
  34. -#if defined SHARED && defined USE_ELF_SYMVER
  35. -__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
  36. -__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
  37. +#ifndef SHARED
  38. +int __cpu_indicator_init_local (void)
  39. + __attribute__ ((weak, alias ("__cpu_indicator_init")));
  40. #endif
  41. diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
  42. index 11bb46e..4f47f7b 100644
  43. --- a/libgcc/config/i386/t-linux
  44. +++ b/libgcc/config/i386/t-linux
  45. @@ -3,4 +3,4 @@
  46. # t-slibgcc-elf-ver and t-linux
  47. SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
  48. -HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
  49. +HOST_LIBGCC2_CFLAGS += -mlong-double-80
  50. --
  51. 2.8.1