diff --git a/srcpkgs/gdb/patches/musl.patch b/srcpkgs/gdb/patches/musl.patch new file mode 100644 index 00000000000000..b1aeb22fdd121a --- /dev/null +++ b/srcpkgs/gdb/patches/musl.patch @@ -0,0 +1,23 @@ +--- a/gdb/ser-unix.c ++++ b/gdb/ser-unix.c +@@ -529,12 +529,20 @@ + /* Clear the current output baud rate and fill a new value. */ + tio.c_cflag &= ~CBAUD; + tio.c_cflag |= BOTHER; ++#ifdef __GLIBC__ + tio.c_ospeed = rate; ++#else ++ tio.__c_ospeed = rate; ++#endif + + /* Clear the current input baud rate and fill a new value. */ + tio.c_cflag &= ~(CBAUD << IBSHIFT); + tio.c_cflag |= BOTHER << IBSHIFT; ++#ifdef __GLIBC__ + tio.c_ispeed = rate; ++#else ++ tio.__c_ispeed = rate; ++#endif + + if (ioctl (fd, req_set, &tio) < 0) + perror_with_name (_("Can not set custom baud rate")); diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template index a960dfa3d2c0a8..b77bbfd14f030e 100644 --- a/srcpkgs/gdb/template +++ b/srcpkgs/gdb/template @@ -1,7 +1,7 @@ # Template file for 'gdb' pkgname=gdb -version=16.3 -revision=2 +version=17.2 +revision=1 build_style=gnu-configure pycompile_dirs="/usr/share/gdb/python" configure_args="--disable-werror --disable-nls --with-system-readline @@ -22,7 +22,7 @@ license="GPL-3.0-or-later" homepage="https://www.gnu.org/software/gdb" changelog="https://sourceware.org/git/?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=HEAD" distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz" -checksum=bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5 +checksum=1c036c0d72e4b3d1fb5c94c88632add6f9d76f4d7c4d2ea793c12a9f19a3228c make_check=extended # Tests take too long, not all of them pass. python_version="3" @@ -60,6 +60,12 @@ if [ "$build_option_multiarch" ]; then subpackages="gdb-multiarch ${subpackages}" fi +pre_configure() { + # --with-sysroot sets the runtime sysroot used by GDB, whereas --with-build-sysroot + # only sets the sysroot used at compile time + configure_args="${configure_args//--with-sysroot/--with-build-sysroot}" +} + post_install() { # resolve conflicts with binutils rm -rf ${DESTDIR}/usr/{include,lib}