ct-ng.comp
author Martin Lund <mgl@doredevelopment.dk>
Sat May 29 15:08:11 2010 +0200 (2010-05-29)
changeset 1986 8946b80364fb
parent 1829 bf1f86bdd79f
child 2053 2238f1167eaa
permissions -rw-r--r--
patches/gdb: Fix canadian building of GDB for powerpc

Adds patch for GDB v6.8, v7.0, v7.0.1 to fix canadian
cross building of GDB for powerpc.

See original patch information here:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=9638

The patch is not required for GDB v7.1 (fixed).

Tested in canadian combination using mingw32 and powerpc toolchains.
Tested to not affect normal cross building of GDB for powerpc target.

Signed-off-by: Martin Lund <mgl@doredevelopment.dk>
     1 # To be sourced
     2 
     3 _ct-ng () {
     4     local cur prev samples show_samples actions steps start_steps stop_steps ct_ng_opts vars
     5     COMPREPLY=()
     6     cur=$(_get_cword)
     7     prev=${COMP_WORDS[COMP_CWORD-1]}
     8 
     9     samples=$( "${COMP_WORDS[0]}" list-samples 2>/dev/null  \
    10                |tail -n +2 |sed -e '/^ /d; s/ .*//;'        \
    11              )
    12     show_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1show-/g;')
    13     build_samples=$(echo "${samples}" |sed -r -e 's/(^| )/\1build-/g;')
    14 
    15     steps=$(${COMP_WORDS[0]} list-steps 2>/dev/null |awk '$1 == "-" { print $2; }')
    16     start_steps=$(echo "${steps}" |sed -r -e 's/($| )/\1+/;')
    17     stop_steps=$(echo "${steps}" |sed -r -e 's/(^| )/+\1/;')
    18 
    19     actions='help menuconfig oldconfig saveconfig extractconfig
    20              build build. build-all build-all.
    21              list-samples list-steps show-tuple show-all show-config
    22              clean distclean wiki-samples updatetools
    23              tarball version'
    24 
    25     vars="RESTART= STOP= PREFIX= V="
    26 
    27     ct_ng_opts="${samples} ${show_samples} ${build_samples}
    28                 ${steps} ${start_steps} ${stop_steps}
    29                 ${actions} ${vars}"
    30 
    31     COMPREPLY=($(compgen -W "${ct_ng_opts}" -- "${cur}"))
    32     return 0
    33 }
    34 complete -F _ct-ng ct-ng