From 6c832fd08bed6c3ba2eb4ba18a60659b40143e49 Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov Date: Sat, 1 May 2021 05:21:55 +1100 Subject: [PATCH 1/4] guile: devel needs dependency on libatomic_ops-devel on some targets --- srcpkgs/guile/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/guile/template b/srcpkgs/guile/template index f9ce43c06709..8ea13881c73e 100644 --- a/srcpkgs/guile/template +++ b/srcpkgs/guile/template @@ -7,7 +7,7 @@ configure_args="--disable-static --disable-error-on-warning" hostmakedepends="pkg-config texinfo" makedepends="gc-devel gmp-devel libatomic_ops-devel libffi-devel libltdl-devel libunistring-devel readline-devel" -short_desc="A portable, embeddable Scheme implementation written in C" +short_desc="Portable, embeddable Scheme implementation written in C" maintainer="Orphaned " license="GPL-3.0-or-later, LGPL-3.0-or-later" homepage="http://www.gnu.org/software/guile" @@ -40,7 +40,7 @@ libguile_package() { guile-devel_package() { short_desc+=" - development files" - depends="gmp-devel gc-devel guile>=${version}_${revision}" + depends="gmp-devel gc-devel guile>=${version}_${revision} libatomic_ops-devel" pkg_install() { vmove usr/bin/guile-config vmove usr/include From 44e62c06e60dfc6bae3bd2ba6ac8ae5494278966 Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov Date: Wed, 10 Mar 2021 23:26:08 +1100 Subject: [PATCH 2/4] gdb: clean up Also added build option for Guile. --- srcpkgs/gdb-common | 1 + srcpkgs/gdb/patches/gdb-mips-linux-nat.patch | 11 ++++ srcpkgs/gdb/template | 61 +++++++++----------- 3 files changed, 40 insertions(+), 33 deletions(-) create mode 120000 srcpkgs/gdb-common create mode 100644 srcpkgs/gdb/patches/gdb-mips-linux-nat.patch diff --git a/srcpkgs/gdb-common b/srcpkgs/gdb-common new file mode 120000 index 000000000000..f3e03e3f1a44 --- /dev/null +++ b/srcpkgs/gdb-common @@ -0,0 +1 @@ +gdb \ No newline at end of file diff --git a/srcpkgs/gdb/patches/gdb-mips-linux-nat.patch b/srcpkgs/gdb/patches/gdb-mips-linux-nat.patch new file mode 100644 index 000000000000..ec4e9c2666f5 --- /dev/null +++ b/srcpkgs/gdb/patches/gdb-mips-linux-nat.patch @@ -0,0 +1,11 @@ +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template index 9648e927efad..5deb3c3c5301 100644 --- a/srcpkgs/gdb/template +++ b/srcpkgs/gdb/template @@ -8,20 +8,29 @@ configure_args="--disable-werror --disable-nls --with-system-readline --with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib $(vopt_enable gdbserver) $(vopt_if multiarch --enable-targets=all) $(vopt_if static 'CFLAGS=-static CXXFLAGS=-static LDFLAGS=-static') - $(vopt_if python --with-python=/usr/bin/python3) + $(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3) $(vopt_with debuginfod)" -hostmakedepends="texinfo perl pkg-config $(vopt_if python python3-devel)" -makedepends="ncurses-devel zlib-devel readline-devel expat-devel - $(vopt_if python 'python3-devel gettext-devel') - $(vopt_if debuginfod elfutils-devel)" +hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)" +makedepends="expat-devel ncurses-devel readline-devel zlib-devel $(vopt_if guile guile-devel) + $(vopt_if python 'python3-devel gettext-devel') $(vopt_if debuginfod elfutils-devel)" +depends="gdb-common>=${version}_${revision}" +checkdepends="dejagnu" short_desc="GNU Debugger" maintainer="Anthony Iliopoulos " license="GPL-3.0-or-later" -homepage="https://www.gnu.org/software/gdb/" -distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz" +homepage="https://www.gnu.org/software/gdb" +distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz" checksum=aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29 +make_check=extended # Tests take too long, not all of them pass. python_version=3 patch_args="-Np1" +ignore_elf_files=" + /usr/share/gdb/guile/gdb/support.go + /usr/share/gdb/guile/gdb/experimental.go + /usr/share/gdb/guile/gdb/iterator.go + /usr/share/gdb/guile/gdb/types.go + /usr/share/gdb/guile/gdb/printing.go + /usr/share/gdb/guile/gdb.go" if [ "${CROSS_BUILD}" ]; then # Make python3.x detection work in cross builds @@ -29,36 +38,22 @@ if [ "${CROSS_BUILD}" ]; then CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" fi -build_options="gdbserver multiarch static python debuginfod" +build_options="debuginfod gdbserver guile multiarch python static" +desc_option_gdbserver="Enable support for building GDB server" desc_option_debuginfod="Enable support for libdebuginfod" desc_option_multiarch="Enable support for all architectures" -desc_option_gdbserver="Enable support for building GDB server" -build_options_default="gdbserver python debuginfod" +build_options_default="debuginfod gdbserver python" vopt_conflict gdbserver static vopt_conflict debuginfod static -post_extract() { - vsed -i 's,sgidefs.h,asm/sgidefs.h,' gdb/mips-linux-nat.c - mkdir -p build -} -do_configure() { - cd build - ../configure ${configure_args/with-sysroot/with-build-sysroot} \ - CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD} -fcommon" - export gl_cv_func_gettimeofday_clobber=no - export gl_cv_func_working_strerror=yes - export gl_cv_func_strerror_0_works=yes -} -do_build() { - cd build - make ${makejobs} all -} -do_install() { - cd build - make DESTDIR=${DESTDIR} ${makejobs} install +post_install() { # resolve conflicts with binutils - rm -rf ${DESTDIR}/usr/{include,lib,lib64} - for f in bfd configure standards; do - rm -f ${DESTDIR}/usr/share/info/${f}.info* - done + rm -r ${DESTDIR}/usr/{include,lib,share/info/bfd.info*} +} + +gdb-common_package() { + short_desc+=" - common files" + pkg_install() { + vmove usr/share + } } From c94aefc325c80ba251b2e70ecab57769ddff9677 Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov Date: Thu, 11 Mar 2021 01:12:29 +1100 Subject: [PATCH 3/4] avr-gdb: update to 10.2; clean up Also added build option for Guile. --- .../avr-gdb/patches/gdb-mips-linux-nat.patch | 11 +++ srcpkgs/avr-gdb/template | 74 ++++--------------- 2 files changed, 27 insertions(+), 58 deletions(-) create mode 100644 srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch diff --git a/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch b/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch new file mode 100644 index 000000000000..ec4e9c2666f5 --- /dev/null +++ b/srcpkgs/avr-gdb/patches/gdb-mips-linux-nat.patch @@ -0,0 +1,11 @@ +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" diff --git a/srcpkgs/avr-gdb/template b/srcpkgs/avr-gdb/template index 73d9f9ac7456..bf97ef0be3c9 100644 --- a/srcpkgs/avr-gdb/template +++ b/srcpkgs/avr-gdb/template @@ -1,79 +1,37 @@ # Template file for 'avr-gdb' pkgname=avr-gdb -version=10.1 +version=10.2 revision=1 wrksrc=gdb-${version} build_style=gnu-configure -pycompile_dirs="/usr/share/gdb/python" -configure_args="\ - --target=avr \ - --program-prefix=avr- \ - --disable-werror \ - --disable-nls \ - --with-system-readline \ - --with-system-gdbinit=/etc/gdb/gdbinit \ - --with-system-zlib $(vopt_enable gdbserver) \ - $(vopt_if static 'CFLAGS=-static CXXFLAGS=-static LDFLAGS=-static') \ - $(vopt_if python --with-python=/usr/bin/python3)" -hostmakedepends="texinfo perl $(vopt_if python python3-devel)" -makedepends="ncurses-devel zlib-devel readline-devel expat-devel +configure_args="--target=avr --disable-werror --disable-nls --with-system-readline + --with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib + $(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3)" +hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)" +makedepends="expat-devel ncurses-devel readline-devel zlib-devel $(vopt_if guile guile-devel) $(vopt_if python 'python3-devel gettext-devel')" -depends=gdb +depends="gdb-common" short_desc="GNU Debugger for AVR" maintainer="Artur Sinila " license="GPL-3.0-or-later" -homepage="https://www.gnu.org/software/gdb/" +homepage="https://www.gnu.org/software/gdb" distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz" -checksum=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0 -python_version=3 +checksum=aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29 +make_check=no # See gdb/template. replaces="cross-avr-gdb>=0" +patch_args="-Np1" if [ "${CROSS_BUILD}" ]; then # Make python3.x detection work in cross builds CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" fi -CFLAGS+=" -fcommon" -CXXFLAGS+=" -fcommon" -# Package build options -build_options="gdbserver static python" -desc_option_gdbserver="Enable support for building GDB server" -# By default, don't enable any of build options -#build_options_default="gdbserver" -# Both options cannot be enabled at the same time -vopt_conflict gdbserver static - -post_extract() { - vsed -i 's,sgidefs.h,asm/sgidefs.h,' gdb/mips-linux-nat.c - mkdir -p build -} - -do_configure() { - cd build - ../configure ${configure_args/with-sysroot/with-build-sysroot} \ - CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD} -fcommon" - export gl_cv_func_gettimeofday_clobber=no - export gl_cv_func_working_strerror=yes - export gl_cv_func_strerror_0_works=yes -} -do_build() { - cd build - make ${makejobs} all -} - -do_install() { - cd build - make DESTDIR=${DESTDIR} ${makejobs} install - # resolve conflicts with binutils - rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib - rm -rf ${DESTDIR}/usr/lib64 - for f in bfd configure standards; do - rm -f ${DESTDIR}/usr/share/info/${f}.info* - done -} +# Package build options +build_options="guile python" +build_options_default="python" post_install() { - # resolve conflicts with binutils and native gdb - rm -fr usr/{share/{locale,gdb,info},include} + # resolve conflicts with gdb-common + rm -r ${DESTDIR}/usr/{share/{gdb,info},include} } From 01bae33763c26d8fcfcb7e4a88c5098398af801e Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov Date: Thu, 11 Mar 2021 01:14:22 +1100 Subject: [PATCH 4/4] cross-arm-none-eabi-gdb: update to 10.2, clean up --- .../patches/gdb-mips-linux-nat.patch | 11 +++ srcpkgs/cross-arm-none-eabi-gdb/template | 68 ++++++++----------- 2 files changed, 39 insertions(+), 40 deletions(-) create mode 100644 srcpkgs/cross-arm-none-eabi-gdb/patches/gdb-mips-linux-nat.patch diff --git a/srcpkgs/cross-arm-none-eabi-gdb/patches/gdb-mips-linux-nat.patch b/srcpkgs/cross-arm-none-eabi-gdb/patches/gdb-mips-linux-nat.patch new file mode 100644 index 000000000000..ec4e9c2666f5 --- /dev/null +++ b/srcpkgs/cross-arm-none-eabi-gdb/patches/gdb-mips-linux-nat.patch @@ -0,0 +1,11 @@ +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" diff --git a/srcpkgs/cross-arm-none-eabi-gdb/template b/srcpkgs/cross-arm-none-eabi-gdb/template index ac8e6837d72c..854b9f83b30d 100644 --- a/srcpkgs/cross-arm-none-eabi-gdb/template +++ b/srcpkgs/cross-arm-none-eabi-gdb/template @@ -1,48 +1,36 @@ -# Template file for 'cross-${_triplet}-${_pkgname}' -_triplet=arm-none-eabi -_pkgname=gdb -pkgname=cross-${_triplet}-${_pkgname} -version=8.3 +# Template file for 'cross-arm-none-eabi-gdb' +pkgname=cross-arm-none-eabi-gdb +version=10.2 revision=1 -wrksrc="${_pkgname}-${version}" +wrksrc=gdb-${version} build_style=gnu-configure -pycompile_dirs="/usr/share/${_pkgname}" -configure_args=" - --disable-gdbserver - --disable-nls - --disable-werror - --host=${XBPS_CROSS_TRIPLE} - --prefix=/usr - --target=${_triplet} - --with-babeltrace - --with-expat - --with-mpfr - --with-system-readline - --with-system-zlib - --without-isl - $(vopt_with guile) - $(vopt_with python) -" -hostmakedepends="autoconf automake bison flex pkg-config texinfo" -makedepends="babeltrace-devel expat-devel mpfr-devel ncurses-devel - readline-devel zlib-devel $(vopt_if guile guile-devel) - $(vopt_if python 'python3-devel gettext-devel')" -short_desc="GNU Debugger" +configure_args="--target=arm-none-eabi --disable-werror --disable-nls --with-system-readline + --with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib --without-isl + $(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3)" +hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)" +makedepends="expat-devel ncurses-devel readline-devel zlib-devel $(vopt_if guile guile-devel) + $(vopt_if python 'python3-devel gettext-devel') babeltrace-devel mpfr-devel" +depends="gdb-common" +short_desc="GNU Debugger for ARM" maintainer="Ivan Sokolov " license="GPL-3.0-or-later" -homepage="https://www.gnu.org/software/${_pkgname}" -distfiles="${GNU_SITE}/${_pkgname}/${_pkgname}-${version}.tar.xz" -checksum=802f7ee309dcc547d65a68d61ebd6526762d26c3051f52caebe2189ac1ffd72e -python_version=2 #unverified -build_options="guile python" -# don't enable guile and python interfaces until they are moved into -# platform independent packages -build_options_default=" " -nocross=yes +homepage="https://www.gnu.org/software/gdb" +distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz" +checksum=aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29 +make_check=no # See gdb/template. +patch_args="-Np1" + +if [ "${CROSS_BUILD}" ]; then + # Make python3.x detection work in cross builds + CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" + CXXFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}" +fi -CFLAGS="-fcommon" +# Package build options +build_options="guile python" +build_options_default="python" post_install() { - # resolve conflicts with binutils and native gdb - rm -fr ${DESTDIR}/usr/{share/{locale,gdb,info},include} + # resolve conflicts with gdb-common + rm -r ${DESTDIR}/usr/{share/{gdb,info},include} }