The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / ncurses / 0002-gcc-5.x-MKlib_gen.patch
1 Fix GCC 5.x preprocessor failure
2
3 Building ncurses 5.9 with GCC 5.x fails with a syntax error, caused by
4 earlier preprocessing. This failure is more likely when building for
5 host (e.g. host-ncurses) that recently updated to GCC 5.x.
6
7 This patch is taken from the following link (more information is also
8 available here):
9 https://groups.google.com/forum/#!topic/sage-trac/U31shviuqzk
10
11 Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
12
13 Index: b/ncurses/base/MKlib_gen.sh
14 ===================================================================
15 --- a/ncurses/base/MKlib_gen.sh
16 +++ b/ncurses/base/MKlib_gen.sh
17 @@ -62,7 +62,15 @@ if test "${LC_MESSAGES+set}" = set; then
18  if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
19  if test "${LC_COLLATE+set}"  = set; then LC_COLLATE=C;  export LC_COLLATE;  fi
20  
21 -preprocessor="$1 -DNCURSES_INTERNALS -I../include"
22 +# Work around "unexpected" output of GCC 5.1.0's cpp w.r.t. #line directives
23 +# by simply suppressing them:
24 +case `$1 -dumpversion 2>/dev/null` in
25 +       5.[01].*)  # assume a "broken" one
26 +               preprocessor="$1 -P -DNCURSES_INTERNALS -I../include"
27 +               ;;
28 +       *)
29 +               preprocessor="$1 -DNCURSES_INTERNALS -I../include"
30 +esac
31  AWK="$2"
32  USE="$3"
33