PageRenderTime 60ms CodeModel.GetById 32ms RepoModel.GetById 0ms app.codeStats 0ms

/patches/binutils-2.18-werror.patch

https://github.com/epronk/gub
Patch | 164 lines | 148 code | 16 blank | 0 comment | 0 complexity | f9715775871c232a23369889a16b5a55 MD5 | raw file
  1. gcc -DHAVE_CONFIG_H -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas -I. -D_GNU_SOURCE -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas -I../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/config -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/../include -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/.. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/../bfd -DLOCALEDIR="\"/home/janneke/vc/gub/target/mingw/root/usr/cross/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/remap.c
  2. cc1: warnings being treated as errors
  3. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/read.c: In function do_s_func:
  4. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/read.c:5631: error: ignoring return value of asprintf, declared with attribute warn_unused_result
  5. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/read.c:5638: error: ignoring return value of asprintf, declared with attribute warn_unused_result
  6. make[5]: *** [read.o] Fout 1
  7. gcc -DHAVE_CONFIG_H -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas -I. -D_GNU_SOURCE -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas -I../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/config -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/../include -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/.. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/../bfd -DLOCALEDIR="\"/home/janneke/vc/gub/target/mingw/root/usr/cross/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/stabs.c
  8. cc1: warnings being treated as errors
  9. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/stabs.c: In function stabs_generate_asm_func:
  10. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/stabs.c:670: error: ignoring return value of asprintf, declared with attribute warn_unused_result
  11. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/stabs.c: In function stabs_generate_asm_endfunc:
  12. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/stabs.c:696: error: ignoring return value of asprintf, declared with attribute warn_unused_result
  13. make[2]: *** [stabs.o] Fout 1
  14. make[2]: Map '/home/janneke/vc/gub/target/mingw/build/cross/binutils-2.18/gas' wordt verlaten
  15. make[1]: *** [all-recursive] Fout 1
  16. make[1]: Map '/home/janneke/vc/gub/target/mingw/build/cross/binutils-2.18/gas' wordt verlaten
  17. make: *** [all] Fout 2
  18. [2]12:09:09 janneke@peder:~/vc/gub/target/mingw/build/cross/binutils-2.18/gas
  19. gcc -DHAVE_CONFIG_H -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas -I. -D_GNU_SOURCE -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas -I../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/config -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/../include -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/.. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/../bfd -DLOCALEDIR="\"/home/janneke/vc/gub/target/mingw/root/usr/cross/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/gas/atof-generic.c
  20. cc1: warnings being treated as errors
  21. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/objdump.c: In function print_line:
  22. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/objdump.c:1138: error: ignoring return value of fwrite, declared with attribute warn_unused_result
  23. gcc -DHAVE_CONFIG_H -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils -I. -D_GNU_SOURCE -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils -I../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/../include -DLOCALEDIR="\"/home/janneke/vc/gub/target/mingw/root/usr/cross/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -DDLLTOOL_I386 -DDLLTOOL_DEFAULT_I386 /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/dlltool.c
  24. cc1: warnings being treated as errors
  25. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/dlltool.c: In function run:
  26. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/dlltool.c:1209: error: format not a string literal and no format arguments
  27. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/dlltool.c: In function gen_exp_file:
  28. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/dlltool.c:1995: error: ignoring return value of fread, declared with attribute warn_unused_result
  29. make[2]: *** [dlltool.o] Fout 1
  30. make[2]: Map '/home/janneke/vc/gub/target/mingw/build/cross/binutils-2.18/binutils' wordt verlaten
  31. make[1]: *** [all-recursive] Fout 1
  32. make[1]: Map '/home/janneke/vc/gub/target/mingw/build/cross/binutils-2.18/binutils' wordt verlaten
  33. make: *** [all] Fout 2
  34. [2]12:22:01 janneke@peder:~/vc/gub/target/mingw/build/cross/binutils-2.18/binutils
  35. $
  36. gcc -DHAVE_CONFIG_H -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils -I. -D_GNU_SOURCE -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils -I../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/../include -DLOCALEDIR="\"/home/janneke/vc/gub/target/mingw/root/usr/cross/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/windmc.c
  37. cc1: warnings being treated as errors
  38. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/windmc.c: In function main:
  39. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/windmc.c:1150: error: ignoring return value of fread, declared with attribute warn_unused_result
  40. make[2]: *** [windmc.o] Fout 1
  41. make[2]: Map '/home/janneke/vc/gub/target/mingw/build/cross/binutils-2.18/binutils' wordt verlaten
  42. make[1]: *** [all-recursive] Fout 1
  43. make[1]: Map '/home/janneke/vc/gub/target/mingw/build/cross/binutils-2.18/binutils' wordt verlaten
  44. make: *** [all] Fout 2
  45. [2]12:24:49 janneke@peder:~/vc/gub/target/mingw/build/cross/binutils-2.18/binutils
  46. gcc -DHAVE_CONFIG_H -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils -I. -D_GNU_SOURCE -I. -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils -I../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/../bfd -I/home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/../include -DLOCALEDIR="\"/home/janneke/vc/gub/target/mingw/root/usr/cross/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/cxxfilt.c
  47. cc1: warnings being treated as errors
  48. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/cxxfilt.c: In function demangle_it:
  49. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/cxxfilt.c:66: error: format not a string literal and no format arguments
  50. /home/janneke/vc/gub/target/mingw/src/cross/binutils-2.18/binutils/cxxfilt.c:71: error: format not a string literal and no format arguments
  51. make[2]: *** [cxxfilt.o] Fout 1
  52. make[2]: Map '/home/janneke/vc/gub/target/mingw/build/cross/binutils-2.18/binutils' wordt verlaten
  53. make[1]: *** [all-recursive] Fout 1
  54. make[1]: Map '/home/janneke/vc/gub/target/mingw/build/cross/binutils-2.18/binutils' wordt verlaten
  55. make: *** [all] Fout 2
  56. [2]12:26:08 janneke@peder:~/vc/gub/target/mingw/build/cross/binutils-2.18/binutils
  57. --- binutils-2.18/gas/read.c.orig 2008-10-15 12:06:50.000000000 +0200
  58. +++ binutils-2.18/gas/read.c 2008-10-15 12:09:05.000000000 +0200
  59. @@ -5628,14 +5628,14 @@
  60. if (*input_line_pointer != ',')
  61. {
  62. if (default_prefix)
  63. - asprintf (&label, "%s%s", default_prefix, name);
  64. + errno = asprintf (&label, "%s%s", default_prefix, name);
  65. else
  66. {
  67. char leading_char = bfd_get_symbol_leading_char (stdoutput);
  68. /* Missing entry point, use function's name with the leading
  69. char prepended. */
  70. if (leading_char)
  71. - asprintf (&label, "%c%s", leading_char, name);
  72. + errno = asprintf (&label, "%c%s", leading_char, name);
  73. else
  74. label = name;
  75. }
  76. --- binutils-2.18/gas/stabs.c.orig 2008-10-15 12:13:01.000000000 +0200
  77. +++ binutils-2.18/gas/stabs.c 2008-10-15 12:13:24.000000000 +0200
  78. @@ -667,8 +667,8 @@
  79. }
  80. as_where (&file, &lineno);
  81. - asprintf (&buf, "\"%s:F1\",%d,0,%d,%s",
  82. - funcname, N_FUN, lineno + 1, startlabname);
  83. + errno = asprintf (&buf, "\"%s:F1\",%d,0,%d,%s",
  84. + funcname, N_FUN, lineno + 1, startlabname);
  85. input_line_pointer = buf;
  86. s_stab ('s');
  87. free (buf);
  88. @@ -693,7 +693,7 @@
  89. ++label_count;
  90. colon (sym);
  91. - asprintf (&buf, "\"\",%d,0,0,%s-%s", N_FUN, sym, startlabname);
  92. + errno = asprintf (&buf, "\"\",%d,0,0,%s-%s", N_FUN, sym, startlabname);
  93. input_line_pointer = buf;
  94. s_stab ('s');
  95. free (buf);
  96. --- binutils-2.18/binutils/objdump.c.orig 2008-10-15 12:20:05.000000000 +0200
  97. +++ binutils-2.18/binutils/objdump.c 2008-10-15 12:20:22.000000000 +0200
  98. @@ -1135,7 +1135,7 @@
  99. if (line >= p->maxline)
  100. return;
  101. l = p->linemap [line];
  102. - fwrite (l, 1, strcspn (l, "\n\r"), stdout);
  103. + errno = fwrite (l, 1, strcspn (l, "\n\r"), stdout);
  104. putchar ('\n');
  105. }
  106. --- binutils-2.18/binutils/dlltool.c.orig 2008-10-15 12:23:35.000000000 +0200
  107. +++ binutils-2.18/binutils/dlltool.c 2008-10-15 12:24:35.000000000 +0200
  108. @@ -1206,7 +1206,7 @@
  109. if (pid == -1)
  110. {
  111. - inform (strerror (errno));
  112. + inform ("%s", strerror (errno));
  113. fatal (errmsg_fmt, errmsg_arg);
  114. }
  115. @@ -1992,7 +1992,7 @@
  116. numbytes = ftell (base_file);
  117. fseek (base_file, 0, SEEK_SET);
  118. copy = xmalloc (numbytes);
  119. - fread (copy, 1, numbytes, base_file);
  120. + errno = fread (copy, 1, numbytes, base_file);
  121. num_entries = numbytes / sizeof (long);
  122. --- binutils-2.18/binutils/windmc.c.orig 2008-10-15 12:25:30.000000000 +0200
  123. +++ binutils-2.18/binutils/windmc.c 2008-10-15 12:25:37.000000000 +0200
  124. @@ -1147,7 +1147,7 @@
  125. fseek (fp, 0, SEEK_SET);
  126. buff = malloc (flen + 3);
  127. memset (buff, 0, flen + 3);
  128. - fread (buff, 1, flen, fp);
  129. + errno = fread (buff, 1, flen, fp);
  130. fclose (fp);
  131. if (mcset_text_in_is_unicode != 1)
  132. {
  133. --- binutils-2.18/binutils/cxxfilt.c.orig 2008-10-15 12:26:28.000000000 +0200
  134. +++ binutils-2.18/binutils/cxxfilt.c 2008-10-15 12:26:45.000000000 +0200
  135. @@ -63,12 +63,12 @@
  136. result = cplus_demangle (mangled_name + skip_first, flags);
  137. if (result == NULL)
  138. - printf (mangled_name);
  139. + printf ("%s", mangled_name);
  140. else
  141. {
  142. if (mangled_name[0] == '.')
  143. putchar ('.');
  144. - printf (result);
  145. + printf ("%s", result);
  146. free (result);
  147. }
  148. }