<commit_before>DESCRIPTION = "GNU debugger for TI C6X DSP."
SECTION = "devel"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=bf0fe2872eb3dfeebb2cbe38206fe81f"

DEPENDS = "ncurses bison-native texinfo flex-native gettext"

COMPATIBLE_MACHINE = "dra7xx|keystone"

PR = "${INC_PR}.1"

SRC_URI_append = " \
    file://init \
    file://0001-libbfd.h-suppress-GCC9-Wstringop-truncation.patch;striplevel=2 \
"

S = "${WORKDIR}/git/gdbc6x"

inherit update-rc.d
inherit gettext

do_configure () {
    cd ${S}
    ./configure --program-suffix=c6x --target=tic6x-elf-tirtos --host=${HOST_SYS} --prefix=${S}/install_gdb
}

do_install () {
    make install

    # Custom install to prevent conflict with standard GDB.
    install -d ${D}${bindir}
    install -d ${D}${includedir}
    install -m 755  ${S}/install_gdb/bin/gdbc6x ${D}${bindir} 
    cp -rf ${S}/install_gdb/include/* ${D}${includedir}

    install -d ${D}${sysconfdir}/init.d
    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/gdbserverproxy
}

RDEPENDS_${PN} = "gdbserverproxy-module-drv bash"

include gdbc6x.inc<commit_msg>gdbc6x: suppress gcc10 multiple definitions of *_varobj_ops<commit_after>DESCRIPTION = "GNU debugger for TI C6X DSP."
SECTION = "devel"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=bf0fe2872eb3dfeebb2cbe38206fe81f"

DEPENDS = "ncurses bison-native texinfo flex-native gettext"

COMPATIBLE_MACHINE = "dra7xx|keystone"

PR = "${INC_PR}.1"

SRC_URI_append = " \
    file://init \
    file://0001-libbfd.h-suppress-GCC9-Wstringop-truncation.patch;striplevel=2 \
"

S = "${WORKDIR}/git/gdbc6x"

inherit update-rc.d
inherit gettext

CFLAGS += "-fcommon"

do_configure () {
    cd ${S}
    ./configure --program-suffix=c6x --target=tic6x-elf-tirtos --host=${HOST_SYS} --prefix=${S}/install_gdb
}

do_install () {
    make install

    # Custom install to prevent conflict with standard GDB.
    install -d ${D}${bindir}
    install -d ${D}${includedir}
    install -m 755  ${S}/install_gdb/bin/gdbc6x ${D}${bindir} 
    cp -rf ${S}/install_gdb/include/* ${D}${includedir}

    install -d ${D}${sysconfdir}/init.d
    install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/gdbserverproxy
}

RDEPENDS_${PN} = "gdbserverproxy-module-drv bash"

include gdbc6x.inc
{'fraction_non_alphanumeric': 0.1606830122591944, 'fraction_numerical': 0.03371278458844133, 'mean_word_length': 3.989082969432314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6328977', 'n_tokens_mistral': 968, 'n_tokens_neox': 896, 'n_words': 165}