0001-gcc-5.x-MKlib_gen.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Fix gcc 5.x build failure
  2. Extracted from upstream commit
  3. http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commit;h=97bb4678dc03e753290b39bbff30ba2825df9517.
  4. + modify MKlib_gen.sh to work around change in development version of
  5. gcc introduced here:
  6. https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
  7. https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
  8. (reports by Marcus Shawcroft, Maohui Lei).
  9. Original author: Thomas E. Dickey <dickey@invisible-island.net>
  10. Signed-off-by: Mikhail Peselnik <bas@bmail.ru>
  11. [Adam Duskett: Refresh for 6.1]
  12. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  13. --- a/ncurses/base/MKlib_gen.sh 2015-08-06 20:48:24.000000000 -0400
  14. +++ b/ncurses/base/MKlib_gen.sh 2017-02-07 10:09:01.293962392 -0500
  15. @@ -505,11 +505,22 @@
  16. -e 's/gen_$//' \
  17. -e 's/ / /g' >>$TMP
  18. +cat >$ED1 <<EOF
  19. +s/ / /g
  20. +s/^ //
  21. +s/ $//
  22. +s/P_NCURSES_BOOL/NCURSES_BOOL/g
  23. +EOF
  24. +
  25. +# A patch discussed here:
  26. +# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
  27. +# introduces spurious #line markers. Work around that by ignoring the system's
  28. +# attempt to define "bool" and using our own symbol here.
  29. +sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
  30. +cat $ED2 >$TMP
  31. +
  32. $preprocessor $TMP 2>/dev/null \
  33. -| sed \
  34. - -e 's/ / /g' \
  35. - -e 's/^ //' \
  36. - -e 's/_Bool/NCURSES_BOOL/g' \
  37. +| sed -f $ED1 \
  38. | $AWK -f $AW2 \
  39. | sed -f $ED3 \
  40. | sed \