0001-libgcc_s.diff 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
  2. index c1bdcc7..ef69c96 100644
  3. --- a/gcc/config/i386/i386.c
  4. +++ b/gcc/config/i386/i386.c
  5. @@ -40325,10 +40325,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
  6. {
  7. case IX86_BUILTIN_CPU_INIT:
  8. {
  9. - /* Make it call __cpu_indicator_init in libgcc. */
  10. + /* Make it call __cpu_indicator_init_local in libgcc.a. */
  11. tree call_expr, fndecl, type;
  12. type = build_function_type_list (integer_type_node, NULL_TREE);
  13. - fndecl = build_fn_decl ("__cpu_indicator_init", type);
  14. + fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
  15. call_expr = build_call_expr (fndecl, 0);
  16. return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
  17. }
  18. diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
  19. index 8c2248d..6c82f15 100644
  20. --- a/libgcc/config/i386/cpuinfo.c
  21. +++ b/libgcc/config/i386/cpuinfo.c
  22. @@ -485,7 +485,7 @@ __cpu_indicator_init (void)
  23. return 0;
  24. }
  25. -#if defined SHARED && defined USE_ELF_SYMVER
  26. -__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
  27. -__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
  28. +#ifndef SHARED
  29. +int __cpu_indicator_init_local (void)
  30. + __attribute__ ((weak, alias ("__cpu_indicator_init")));
  31. #endif
  32. diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
  33. index 11bb46e..4f47f7b 100644
  34. --- a/libgcc/config/i386/t-linux
  35. +++ b/libgcc/config/i386/t-linux
  36. @@ -3,4 +3,4 @@
  37. # t-slibgcc-elf-ver and t-linux
  38. SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
  39. -HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
  40. +HOST_LIBGCC2_CFLAGS += -mlong-double-80