gcc_erorr.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
  2. index 16b4165..5c77267 100644
  3. --- a/tools/winebuild/main.c
  4. +++ b/tools/winebuild/main.c
  5. @@ -48,10 +48,13 @@ int link_ext_symbols = 0;
  6. int force_pointer_size = 0;
  7. int unwind_tables = 0;
  8. +#undef FORCE_POINTER_SIZE
  9. #ifdef __i386__
  10. enum target_cpu target_cpu = CPU_x86;
  11. +#define FORCE_POINTER_SIZE
  12. #elif defined(__x86_64__)
  13. enum target_cpu target_cpu = CPU_x86_64;
  14. +#define FORCE_POINTER_SIZE
  15. #elif defined(__powerpc__)
  16. enum target_cpu target_cpu = CPU_POWERPC;
  17. #elif defined(__arm__)
  18. @@ -611,6 +614,10 @@ int main(int argc, char **argv)
  19. signal( SIGTERM, exit_on_signal );
  20. signal( SIGINT, exit_on_signal );
  21. +#ifdef FORCE_POINTER_SIZE
  22. + force_pointer_size = sizeof(size_t);
  23. +#endif
  24. +
  25. output_file = stdout;
  26. argv = parse_options( argc, argv, spec );
  27. diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
  28. index 06aa200..c44d2e3 100644
  29. --- a/tools/winegcc/winegcc.c
  30. +++ b/tools/winegcc/winegcc.c
  31. @@ -213,10 +213,13 @@ struct options
  32. strarray* files;
  33. };
  34. +#undef FORCE_POINTER_SIZE
  35. #ifdef __i386__
  36. static const enum target_cpu build_cpu = CPU_x86;
  37. +#define FORCE_POINTER_SIZE
  38. #elif defined(__x86_64__)
  39. static const enum target_cpu build_cpu = CPU_x86_64;
  40. +#define FORCE_POINTER_SIZE
  41. #elif defined(__powerpc__)
  42. static const enum target_cpu build_cpu = CPU_POWERPC;
  43. #elif defined(__arm__)
  44. @@ -1258,6 +1261,9 @@ int main(int argc, char **argv)
  45. opts.linker_args = strarray_alloc();
  46. opts.compiler_args = strarray_alloc();
  47. opts.winebuild_args = strarray_alloc();
  48. +#ifdef FORCE_POINTER_SIZE
  49. + opts.force_pointer_size = sizeof(size_t);
  50. +#endif
  51. /* determine the processor type */
  52. if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;