scripts/build/debug/300-gdb.sh
author Michael Hope <michael.hope@linaro.org>
Wed Nov 16 10:06:21 2011 +1300 (2011-11-16)
changeset 2765 6c5658b8b588
parent 2751 bd17cca444ae
child 2784 258160822e35
permissions -rw-r--r--
scripts: add support for building manuals

Add support for building the HTML and PDF manuals for the major
components. Implement for binutils, GCC, GDB, and GLIBC.

Always build all manuals and install a subset. Be explicit about the
subset to reduce the clutter and to avoid getting copies of common
manuals like bfd from all of the sourceware based components. Downside of
being explicit is that you need to update it when a new component
comes along.

Build the manuals as part of the last GCC build, namely 'cc' for glibc
based ones and cc_core_pass_2 for baremetal.

An example of the output is at:
http://people.linaro.org/~michaelh/incoming/crosstool-NG/

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: depends on ! remove docs; gold manual install]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@479
     1
# Build script for the gdb debug facility
yann@479
     2
yann@1743
     3
# The version of ncurses to use. Yes, it's hard-coded.
yann@1743
     4
# It's used only internally by crosstool-NG, and is
yann@1743
     5
# not exposed outside, so we don't care about providing
yann@1743
     6
# config options for this.
yann@2616
     7
CT_DEBUG_GDB_NCURSES_VERSION="5.9"
yann@1743
     8
yann@2101
     9
# Ditto for the expat library
yann@2101
    10
CT_DEBUG_GDB_EXPAT_VERSION="2.0.1"
yann@2101
    11
yann@821
    12
do_debug_gdb_parts() {
yann@821
    13
    do_gdb=
yann@821
    14
    do_ncurses=
yann@2101
    15
    do_expat=
yann@821
    16
yann@821
    17
    if [ "${CT_GDB_CROSS}" = y ]; then
yann@1916
    18
        do_gdb=y
yann@821
    19
    fi
yann@821
    20
yann@821
    21
    if [ "${CT_GDB_GDBSERVER}" = "y" ]; then
yann@821
    22
        do_gdb=y
yann@821
    23
    fi
yann@821
    24
yann@821
    25
    if [ "${CT_GDB_NATIVE}" = "y" ]; then
yann@821
    26
        do_gdb=y
linux@2021
    27
        # GDB on Mingw depends on PDcurses, not ncurses
linux@2021
    28
        if [ "${CT_MINGW32}" != "y" ]; then
linux@2021
    29
            do_ncurses=y
linux@2021
    30
        fi
yann@2101
    31
        do_expat=y
yann@821
    32
    fi
yann@821
    33
}
yann@821
    34
yann@479
    35
do_debug_gdb_get() {
yann@2303
    36
    local linaro_version
yann@2303
    37
    local linaro_series
yann@2303
    38
    local linaro_base_url="http://launchpad.net/gdb-linaro"
yann@2303
    39
yann@2303
    40
    # Account for the Linaro versioning
yann@2303
    41
    linaro_version="$( echo "${CT_GDB_VERSION}"      \
yann@2303
    42
                       |sed -r -e 's/^linaro-//;'   \
yann@2303
    43
                     )"
yann@2303
    44
    linaro_series="$( echo "${linaro_version}"      \
yann@2303
    45
                      |sed -r -e 's/-.*//;'         \
yann@2303
    46
                    )"
yann@2303
    47
yann@821
    48
    do_debug_gdb_parts
yann@821
    49
yann@821
    50
    if [ "${do_gdb}" = "y" ]; then
yann@1899
    51
        CT_GetFile "gdb-${CT_GDB_VERSION}"                          \
yann@1899
    52
                   {ftp,http}://ftp.gnu.org/pub/gnu/gdb             \
yann@2303
    53
                   ftp://sources.redhat.com/pub/gdb/{,old-}releases \
yann@2303
    54
                   "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
yann@821
    55
    fi
yann@821
    56
yann@821
    57
    if [ "${do_ncurses}" = "y" ]; then
yann@1743
    58
        CT_GetFile "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}" .tar.gz  \
yann@573
    59
                   {ftp,http}://ftp.gnu.org/pub/gnu/ncurses \
yann@573
    60
                   ftp://invisible-island.net/ncurses
yann@573
    61
    fi
yann@2101
    62
yann@2101
    63
    if [ "${do_expat}" = "y" ]; then
yann@2101
    64
        CT_GetFile "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" .tar.gz    \
yann@2101
    65
                   http://mesh.dl.sourceforge.net/sourceforge/expat/expat/${CT_DEBUG_GDB_EXPAT_VERSION}
yann@2101
    66
    fi
yann@479
    67
}
yann@479
    68
yann@479
    69
do_debug_gdb_extract() {
yann@821
    70
    do_debug_gdb_parts
yann@821
    71
yann@821
    72
    if [ "${do_gdb}" = "y" ]; then
yann@1899
    73
        CT_Extract "gdb-${CT_GDB_VERSION}"
yann@1901
    74
        CT_Patch "gdb" "${CT_GDB_VERSION}"
yann@821
    75
    fi
yann@821
    76
yann@821
    77
    if [ "${do_ncurses}" = "y" ]; then
yann@1743
    78
        CT_Extract "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}"
yann@2326
    79
        CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}"
yann@1901
    80
        CT_Patch "ncurses" "${CT_DEBUG_GDB_NCURSES_VERSION}"
yann@598
    81
    fi
yann@2101
    82
yann@2101
    83
    if [ "${do_expat}" = "y" ]; then
yann@2101
    84
        CT_Extract "expat-${CT_DEBUG_GDB_EXPAT_VERSION}"
yann@2101
    85
        CT_Patch "expat" "${CT_DEBUG_GDB_EXPAT_VERSION}"
yann@2101
    86
    fi
yann@479
    87
}
yann@479
    88
yann@479
    89
do_debug_gdb_build() {
yann@1481
    90
    local -a extra_config
yann@1481
    91
linux@2021
    92
    do_debug_gdb_parts
linux@2021
    93
yann@1899
    94
    gdb_src_dir="${CT_SRC_DIR}/gdb-${CT_GDB_VERSION}"
yann@479
    95
yann@479
    96
    # Version 6.3 and below behave badly with gdbmi
yann@479
    97
    case "${CT_GDB_VERSION}" in
yann@1481
    98
        6.2*|6.3)   extra_config+=("--disable-gdbmi");;
yann@479
    99
    esac
yann@479
   100
benoit@2490
   101
    if [ "${CT_GDB_HAS_PKGVERSION_BUGURL}" = "y" ]; then
benoit@2503
   102
        extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
benoit@2503
   103
        [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
benoit@2490
   104
    fi
benoit@2490
   105
yann@479
   106
    if [ "${CT_GDB_CROSS}" = "y" ]; then
yann@1481
   107
        local -a cross_extra_config
yann@2570
   108
        local gcc_version
yann@1481
   109
yann@479
   110
        CT_DoStep INFO "Installing cross-gdb"
yann@479
   111
        CT_DoLog EXTRA "Configuring cross-gdb"
yann@479
   112
yann@479
   113
        mkdir -p "${CT_BUILD_DIR}/build-gdb-cross"
yann@479
   114
        cd "${CT_BUILD_DIR}/build-gdb-cross"
yann@479
   115
yann@1481
   116
        cross_extra_config=("${extra_config[@]}")
yann@583
   117
        case "${CT_THREADS}" in
yann@1481
   118
            none)   cross_extra_config+=("--disable-threads");;
yann@1481
   119
            *)      cross_extra_config+=("--enable-threads");;
yann@583
   120
        esac
yann@2703
   121
        if [ "${CT_GDB_CROSS_PYTHON}" = "y" ]; then
yann@2703
   122
            cross_extra_config+=( "--with-python=yes" )
yann@2703
   123
        else
yann@2703
   124
            cross_extra_config+=( "--with-python=no" )
yann@2703
   125
        fi
yann@583
   126
yann@479
   127
        CC_for_gdb=
yann@479
   128
        LD_for_gdb=
yann@583
   129
        if [ "${CT_GDB_CROSS_STATIC}" = "y" ]; then
yann@479
   130
            CC_for_gdb="gcc -static"
yann@479
   131
            LD_for_gdb="ld -static"
yann@479
   132
        fi
yann@479
   133
yann@821
   134
        gdb_cross_configure="${gdb_src_dir}/configure"
yann@821
   135
yann@1481
   136
        CT_DoLog DEBUG "Extra config passed: '${cross_extra_config[*]}'"
yann@602
   137
yann@2344
   138
        CT_DoExecLog CFG                                \
yann@479
   139
        CC="${CC_for_gdb}"                              \
yann@583
   140
        LD="${LD_for_gdb}"                              \
yann@821
   141
        "${gdb_cross_configure}"                        \
yann@479
   142
            --build=${CT_BUILD}                         \
yann@479
   143
            --host=${CT_HOST}                           \
yann@479
   144
            --target=${CT_TARGET}                       \
yann@479
   145
            --prefix="${CT_PREFIX_DIR}"                 \
yann@479
   146
            --with-build-sysroot="${CT_SYSROOT_DIR}"    \
benoit@2476
   147
            --with-sysroot="${CT_SYSROOT_DIR}"          \
benoit@2508
   148
            --with-expat=yes                            \
yann@801
   149
            --disable-werror                            \
yann@1481
   150
            "${cross_extra_config[@]}"
yann@479
   151
yann@479
   152
        CT_DoLog EXTRA "Building cross-gdb"
yann@2275
   153
        CT_DoExecLog ALL make ${JOBSFLAGS}
yann@479
   154
yann@479
   155
        CT_DoLog EXTRA "Installing cross-gdb"
yann@669
   156
        CT_DoExecLog ALL make install
yann@479
   157
michael@2765
   158
        if [ "${CT_BUILD_MANUALS}" = "y" ]; then
michael@2765
   159
            CT_DoLog EXTRA "Building and installing the cross-GDB manuals"
michael@2765
   160
            CT_DoExecLog ALL make ${JOBSFLAGS} pdf html
michael@2765
   161
            CT_DoExecLog ALL make install-{pdf,html}-gdb
michael@2765
   162
        fi
michael@2765
   163
yann@2575
   164
        if [ "${CT_GDB_INSTALL_GDBINIT}" = "y" ]; then
yann@2575
   165
            CT_DoLog EXTRA "Install '.gdbinit' template"
yann@2575
   166
            # See in scripts/build/internals.sh for why we do this
yann@2575
   167
            if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then
yann@2575
   168
                gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" )
yann@2575
   169
            else
yann@2575
   170
                gcc_version=$( sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \
yann@2575
   171
                                   "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/version.c"   \
yann@2575
   172
                             )
yann@2575
   173
            fi
yann@2575
   174
            ${sed} -r                                               \
yann@2575
   175
                   -e "s:@@PREFIX@@:${CT_PREFIX_DIR}:;"             \
yann@2575
   176
                   -e "s:@@VERSION@@:${gcc_version}:;"              \
yann@2575
   177
                   "${CT_LIB_DIR}/scripts/build/debug/gdbinit.in"   \
yann@2575
   178
                   >"${CT_PREFIX_DIR}/share/gdb/gdbinit"
yann@2575
   179
        fi # Install gdbinit sample
yann@2570
   180
yann@479
   181
        CT_EndStep
yann@479
   182
    fi
yann@479
   183
yann@479
   184
    if [ "${CT_GDB_NATIVE}" = "y" ]; then
yann@1481
   185
        local -a native_extra_config
yann@1481
   186
        local -a ncurses_opt
yann@2100
   187
        local -a gdb_native_CFLAGS
yann@1481
   188
yann@573
   189
        CT_DoStep INFO "Installing native gdb"
yann@573
   190
yann@2100
   191
        native_extra_config=("${extra_config[@]}")
yann@2100
   192
linux@2021
   193
        # GDB on Mingw depends on PDcurses, not ncurses
linux@2021
   194
        if [ "${do_ncurses}" = "y" ]; then
linux@2021
   195
            CT_DoLog EXTRA "Building static target ncurses"
yann@1281
   196
linux@2021
   197
            [ "${CT_CC_LANG_CXX}" = "y" ] || ncurses_opts+=("--without-cxx" "--without-cxx-binding")
linux@2021
   198
            [ "${CT_CC_LANG_ADA}" = "y" ] || ncurses_opts+=("--without-ada")
yann@1281
   199
linux@2021
   200
            mkdir -p "${CT_BUILD_DIR}/build-ncurses-build-tic"
linux@2021
   201
            cd "${CT_BUILD_DIR}/build-ncurses-build-tic"
yann@1264
   202
linux@2021
   203
            # Use build = CT_REAL_BUILD so that configure thinks it is
linux@2021
   204
            # cross-compiling, and thus will use the ${CT_BUILD}-*
linux@2021
   205
            # tools instead of searching for the native ones...
anthony@2154
   206
            CT_DoExecLog CFG                                                    \
linux@2021
   207
            "${CT_SRC_DIR}/ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}/configure"   \
linux@2021
   208
                --build=${CT_BUILD}                                             \
linux@2021
   209
                --host=${CT_BUILD}                                              \
linux@2021
   210
                --prefix=/usr                                                   \
linux@2021
   211
                --enable-symlinks                                               \
linux@2021
   212
                --with-build-cc=${CT_REAL_BUILD}-gcc                            \
linux@2021
   213
                --with-build-cpp=${CT_REAL_BUILD}-gcc                           \
linux@2021
   214
                --with-build-cflags="${CT_CFLAGS_FOR_HOST}"                     \
linux@2021
   215
                "${ncurses_opts[@]}"
yann@1264
   216
yann@2617
   217
            # ncurses insists on linking tic statically. It does not work
yann@2617
   218
            # on some OSes (eg. MacOS-X/Darwin/whatever-you-call-it).
yann@2617
   219
            CT_DoExecLog DEBUG sed -r -i -e 's/-static//g;' "progs/Makefile"
yann@2617
   220
linux@2021
   221
            # Under some operating systems (eg. Winblows), there is an
linux@2021
   222
            # extension appended to executables. Find that.
linux@2021
   223
            tic_ext=$(grep -E '^x[[:space:]]*=' progs/Makefile |sed -r -e 's/^.*=[[:space:]]*//;')
yann@1267
   224
yann@2275
   225
            CT_DoExecLog ALL make ${JOBSFLAGS} -C include
yann@2275
   226
            CT_DoExecLog ALL make ${JOBSFLAGS} -C progs "tic${tic_ext}"
yann@1264
   227
w@2751
   228
            CT_DoExecLog ALL install -d -m 0755 "${CT_BUILDTOOLS_PREFIX_DIR}/bin"
w@2751
   229
            CT_DoExecLog ALL install -m 0755 "progs/tic${tic_ext}" "${CT_BUILDTOOLS_PREFIX_DIR}/bin"
yann@1264
   230
linux@2021
   231
            mkdir -p "${CT_BUILD_DIR}/build-ncurses"
linux@2021
   232
            cd "${CT_BUILD_DIR}/build-ncurses"
yann@573
   233
anthony@2154
   234
            CT_DoExecLog CFG                                                    \
w@2751
   235
            TIC_PATH="${CT_BUILDTOOLS_PREFIX_DIR}/bin/tic${tic_ext}"            \
linux@2021
   236
            "${CT_SRC_DIR}/ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}/configure"   \
linux@2021
   237
                --build=${CT_BUILD}                                             \
linux@2021
   238
                --host=${CT_TARGET}                                             \
linux@2021
   239
                --with-build-cc=${CT_BUILD}-gcc                                 \
linux@2021
   240
                --with-build-cpp=${CT_BUILD}-gcc                                \
linux@2021
   241
                --with-build-cflags="${CT_CFLAGS_FOR_HOST}"                     \
yann@2100
   242
                --prefix="${CT_BUILD_DIR}/static-target"                        \
linux@2021
   243
                --without-shared                                                \
linux@2021
   244
                --without-sysmouse                                              \
linux@2021
   245
                --without-progs                                                 \
linux@2021
   246
                --enable-termcap                                                \
linux@2021
   247
                "${ncurses_opts[@]}"
yann@573
   248
yann@2275
   249
            CT_DoExecLog ALL make ${JOBSFLAGS}
yann@573
   250
linux@2021
   251
            CT_DoExecLog ALL make install
yann@573
   252
yann@2100
   253
            native_extra_config+=("--with-curses")
yann@2100
   254
            # There's no better way to tell gdb where to find -lcurses... :-(
yann@2100
   255
            gdb_native_CFLAGS+=("-I${CT_BUILD_DIR}/static-target/include")
yann@2100
   256
            gdb_native_CFLAGS+=("-L${CT_BUILD_DIR}/static-target/lib")
linux@2021
   257
        fi # do_ncurses
yann@1281
   258
yann@2101
   259
        if [ "${do_expat}" = "y" ]; then
yann@2101
   260
            CT_DoLog EXTRA "Building static target expat"
yann@2101
   261
yann@2101
   262
            mkdir -p "${CT_BUILD_DIR}/expat-build"
yann@2101
   263
            cd "${CT_BUILD_DIR}/expat-build"
yann@2101
   264
anthony@2154
   265
            CT_DoExecLog CFG                                                \
yann@2101
   266
            "${CT_SRC_DIR}/expat-${CT_DEBUG_GDB_EXPAT_VERSION}/configure"   \
yann@2101
   267
                --build=${CT_BUILD}                                         \
yann@2101
   268
                --host=${CT_TARGET}                                         \
yann@2101
   269
                --prefix="${CT_BUILD_DIR}/static-target"                    \
yann@2101
   270
                --enable-static                                             \
yann@2101
   271
                --disable-shared
yann@2101
   272
yann@2275
   273
            CT_DoExecLog ALL make ${JOBSFLAGS}
yann@2101
   274
            CT_DoExecLog ALL make install
yann@2101
   275
yann@2101
   276
            native_extra_config+=("--with-expat")
yann@2101
   277
            native_extra_config+=("--with-libexpat-prefix=${CT_BUILD_DIR}/static-target")
yann@2101
   278
        fi # do_expat
yann@2101
   279
yann@479
   280
        CT_DoLog EXTRA "Configuring native gdb"
yann@479
   281
yann@479
   282
        mkdir -p "${CT_BUILD_DIR}/build-gdb-native"
yann@479
   283
        cd "${CT_BUILD_DIR}/build-gdb-native"
yann@479
   284
yann@583
   285
        case "${CT_THREADS}" in
yann@1481
   286
            none)   native_extra_config+=("--disable-threads");;
yann@1481
   287
            *)      native_extra_config+=("--enable-threads");;
yann@583
   288
        esac
yann@583
   289
yann@583
   290
        if [ "${CT_GDB_NATIVE_STATIC}" = "y" ]; then
yann@583
   291
            CC_for_gdb="${CT_TARGET}-gcc -static"
yann@583
   292
            LD_for_gdb="${CT_TARGET}-ld -static"
yann@626
   293
        else
yann@626
   294
            CC_for_gdb="${CT_TARGET}-gcc"
yann@626
   295
            LD_for_gdb="${CT_TARGET}-ld"
yann@583
   296
        fi
yann@583
   297
yann@583
   298
        export ac_cv_func_strncmp_works=yes
yann@583
   299
yann@1481
   300
        CT_DoLog DEBUG "Extra config passed: '${native_extra_config[*]}'"
yann@602
   301
yann@2344
   302
        CT_DoExecLog CFG                                \
yann@583
   303
        CC="${CC_for_gdb}"                              \
yann@583
   304
        LD="${LD_for_gdb}"                              \
yann@2344
   305
        CFLAGS="${gdb_native_CFLAGS[*]}"                \
yann@479
   306
        "${gdb_src_dir}/configure"                      \
yann@479
   307
            --build=${CT_BUILD}                         \
yann@479
   308
            --host=${CT_TARGET}                         \
yann@479
   309
            --target=${CT_TARGET}                       \
yann@479
   310
            --prefix=/usr                               \
yann@479
   311
            --with-build-sysroot="${CT_SYSROOT_DIR}"    \
yann@479
   312
            --without-uiout                             \
yann@479
   313
            --disable-tui                               \
yann@479
   314
            --disable-gdbtk                             \
yann@479
   315
            --without-x                                 \
yann@479
   316
            --disable-sim                               \
yann@583
   317
            --disable-werror                            \
yann@479
   318
            --without-included-gettext                  \
yann@583
   319
            --without-develop                           \
yann@1481
   320
            "${native_extra_config[@]}"
yann@479
   321
yann@479
   322
        CT_DoLog EXTRA "Building native gdb"
yann@2275
   323
        CT_DoExecLog ALL make ${JOBSFLAGS} CC=${CT_TARGET}-${CT_CC}
yann@479
   324
yann@479
   325
        CT_DoLog EXTRA "Installing native gdb"
yann@1219
   326
        CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install
yann@479
   327
yann@583
   328
        # Building a native gdb also builds a gdbserver
yann@1219
   329
        find "${CT_DEBUGROOT_DIR}" -type f -name gdbserver -exec rm -fv {} \; 2>&1 |CT_DoLog ALL
yann@583
   330
yann@583
   331
        unset ac_cv_func_strncmp_works
yann@583
   332
linux@2021
   333
        # GDB on Mingw depends on PDcurses, not ncurses
linux@2021
   334
        if [ "${CT_MINGW32}" != "y" ]; then
linux@2021
   335
            CT_DoLog EXTRA "Cleaning up ncurses"
linux@2021
   336
            cd "${CT_BUILD_DIR}/build-ncurses"
linux@2021
   337
            CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" uninstall
yann@1555
   338
linux@2021
   339
            CT_DoExecLog DEBUG rm -rf "${CT_BUILD_DIR}/ncurses"
linux@2021
   340
        fi
yann@1733
   341
yann@1281
   342
        CT_EndStep # native gdb build
yann@583
   343
    fi
yann@583
   344
yann@583
   345
    if [ "${CT_GDB_GDBSERVER}" = "y" ]; then
yann@1481
   346
        local -a gdbserver_extra_config
yann@1481
   347
yann@583
   348
        CT_DoStep INFO "Installing gdbserver"
yann@583
   349
        CT_DoLog EXTRA "Configuring gdbserver"
yann@583
   350
yann@583
   351
        mkdir -p "${CT_BUILD_DIR}/build-gdb-gdbserver"
yann@583
   352
        cd "${CT_BUILD_DIR}/build-gdb-gdbserver"
yann@583
   353
yann@583
   354
        # Workaround for bad versions, where the configure
yann@583
   355
        # script for gdbserver is not executable...
yann@583
   356
        # Bah, GNU folks strike again... :-(
yann@583
   357
        chmod +x "${gdb_src_dir}/gdb/gdbserver/configure"
yann@583
   358
yann@583
   359
        gdbserver_LDFLAGS=
yann@583
   360
        if [ "${CT_GDB_GDBSERVER_STATIC}" = "y" ]; then
yann@583
   361
            gdbserver_LDFLAGS=-static
yann@583
   362
        fi
yann@583
   363
yann@1481
   364
        gdbserver_extra_config=("${extra_config[@]}")
yann@602
   365
yann@2344
   366
        CT_DoExecLog CFG                                \
yann@583
   367
        LDFLAGS="${gdbserver_LDFLAGS}"                  \
yann@583
   368
        "${gdb_src_dir}/gdb/gdbserver/configure"        \
yann@583
   369
            --build=${CT_BUILD}                         \
yann@583
   370
            --host=${CT_TARGET}                         \
yann@583
   371
            --target=${CT_TARGET}                       \
yann@583
   372
            --prefix=/usr                               \
yann@583
   373
            --sysconfdir=/etc                           \
yann@583
   374
            --localstatedir=/var                        \
yann@583
   375
            --includedir="${CT_HEADERS_DIR}"            \
yann@583
   376
            --with-build-sysroot="${CT_SYSROOT_DIR}"    \
yann@583
   377
            --program-prefix=                           \
yann@583
   378
            --without-uiout                             \
yann@583
   379
            --disable-tui                               \
yann@583
   380
            --disable-gdbtk                             \
yann@583
   381
            --without-x                                 \
yann@583
   382
            --without-included-gettext                  \
yann@583
   383
            --without-develop                           \
yann@801
   384
            --disable-werror                            \
yann@1481
   385
            "${gdbserver_extra_config[@]}"
yann@583
   386
yann@583
   387
        CT_DoLog EXTRA "Building gdbserver"
yann@2275
   388
        CT_DoExecLog ALL make ${JOBSFLAGS} CC=${CT_TARGET}-${CT_CC}
yann@583
   389
yann@583
   390
        CT_DoLog EXTRA "Installing gdbserver"
yann@1219
   391
        CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install
yann@583
   392
yann@479
   393
        CT_EndStep
yann@479
   394
    fi
yann@479
   395
}