Index: head/devel/gdb/Makefile =================================================================== --- head/devel/gdb/Makefile +++ head/devel/gdb/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= gdb -PORTVERSION= 8.0 -PORTREVISION= 3 +PORTVERSION= 8.0.1 CATEGORIES= devel MASTER_SITES= GNU @@ -11,7 +10,11 @@ COMMENT= GNU GDB of newer version than comes with the system LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING3 +# untested on sparc64, might work +ONLY_FOR_ARCHS= aarch64 amd64 armv6 i386 mips powerpc powerpc64 + TEST_DEPENDS= runtest:misc/dejagnu TEST_TARGET= check @@ -54,9 +57,6 @@ VER= ${PORTVERSION:S/.//g} PLIST_SUB= VER=${VER} - -# untested elsewhere, might work -ONLY_FOR_ARCHS= aarch64 amd64 armv6 i386 mips powerpc powerpc64 OPTIONS_DEFINE= DEBUG GDB_LINK GUILE KGDB PYTHON TUI Index: head/devel/gdb/distinfo =================================================================== --- head/devel/gdb/distinfo +++ head/devel/gdb/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1498935083 -SHA256 (gdb-8.0.tar.xz) = f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee -SIZE (gdb-8.0.tar.xz) = 19588616 +TIMESTAMP = 1505207991 +SHA256 (gdb-8.0.1.tar.xz) = 3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3 +SIZE (gdb-8.0.1.tar.xz) = 19583920 Index: head/devel/gdb/files/kgdb/kgdb-main.c =================================================================== --- head/devel/gdb/files/kgdb/kgdb-main.c +++ head/devel/gdb/files/kgdb/kgdb-main.c @@ -203,7 +203,7 @@ } static void -add_arg(struct captured_main_args *args, char *arg) +add_arg(struct captured_main_args *args, char const *arg) { args->argc++; @@ -211,7 +211,7 @@ sizeof(char *)); if (args->argv == NULL) err(1, "Out of memory building argument list"); - args->argv[args->argc] = arg; + args->argv[args->argc] = (char *)arg; } int @@ -239,9 +239,9 @@ if (s[0] == '-') s++; if (strcmp(s, "quiet") == 0) - argv[a] = "-q"; + argv[a] = (char *)"-q"; else if (strcmp(s, "fullname") == 0) - argv[a] = "-f"; + argv[a] = (char *)"-f"; } } Index: head/devel/gdb/files/patch-aarch64-fbsd =================================================================== --- head/devel/gdb/files/patch-aarch64-fbsd +++ head/devel/gdb/files/patch-aarch64-fbsd @@ -1,6 +1,4 @@ -diff --git gdb/Makefile.in gdb/Makefile.in -index 1d2dbaf3f7..d8e2b49523 100644 ---- gdb/Makefile.in +--- gdb/Makefile.in.orig 2017-09-14 09:28:17 UTC +++ gdb/Makefile.in @@ -745,6 +745,7 @@ TARGET_OBS = @TARGET_OBS@ # All target-dependent objects files that require 64-bit CORE_ADDR Index: head/devel/gdb/files/patch-armfbsd =================================================================== --- head/devel/gdb/files/patch-armfbsd +++ head/devel/gdb/files/patch-armfbsd @@ -1,7 +1,4 @@ -diff --git gdb/arm-fbsd-nat.c gdb/arm-fbsd-nat.c -new file mode 100644 -index 0000000000..b883411ceb ---- /dev/null +--- gdb/arm-fbsd-nat.c.orig 2017-09-14 09:28:17 UTC +++ gdb/arm-fbsd-nat.c @@ -0,0 +1,215 @@ +/* Native-dependent code for BSD Unix running on ARM's, for GDB. Index: head/devel/gdb/files/patch-fixes =================================================================== --- head/devel/gdb/files/patch-fixes +++ head/devel/gdb/files/patch-fixes @@ -1,6 +1,4 @@ -diff --git gdb/compile/compile-loc2c.c gdb/compile/compile-loc2c.c -index a53214f2e5..67af62bb58 100644 ---- gdb/compile/compile-loc2c.c +--- gdb/compile/compile-loc2c.c.orig 2017-09-14 09:28:17 UTC +++ gdb/compile/compile-loc2c.c @@ -669,6 +669,7 @@ do_compile_dwarf_expr_to_c (int indent, string_file &stream, uint64_t uoffset, reg; Index: head/devel/gdb/files/patch-gdb-amd64-bsd-nat.c =================================================================== --- head/devel/gdb/files/patch-gdb-amd64-bsd-nat.c +++ head/devel/gdb/files/patch-gdb-amd64-bsd-nat.c @@ -1,32 +0,0 @@ -diff --git gdb/amd64-bsd-nat.c gdb/amd64-bsd-nat.c -index ca61a3551b..0f875f8296 100644 ---- gdb/amd64-bsd-nat.c -+++ gdb/amd64-bsd-nat.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - - #include "amd64-tdep.h" - #include "amd64-nat.h" -@@ -95,12 +96,19 @@ amd64bsd_store_inferior_registers (struct target_ops *ops, - if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum)) - { - struct reg regs; -+ register_t old_rflags; - - if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) - perror_with_name (_("Couldn't get registers")); - -+ old_rflags = regs.r_rflags; - amd64_collect_native_gregset (regcache, ®s, regnum); - -+ /* This is a workaround about the PSL_USERCHANGE posix limitation. */ -+ if ((regs.r_rflags ^ old_rflags ) & ~PSL_USERCHANGE) -+ { -+ regs.r_rflags ^= (regs.r_rflags ^ old_rflags ) & ~PSL_USERCHANGE; -+ } - if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) - perror_with_name (_("Couldn't write registers")); - Index: head/devel/gdb/files/patch-gdb-configure =================================================================== --- head/devel/gdb/files/patch-gdb-configure +++ head/devel/gdb/files/patch-gdb-configure @@ -1,20 +0,0 @@ -diff --git gdb/configure gdb/configure -index 9f05b4bb7e..e14886b67d 100755 ---- gdb/configure -+++ gdb/configure -@@ -15103,12 +15103,10 @@ if test "${ERROR_ON_WARNING}" = yes ; then - WERROR_CFLAGS="-Werror" - fi - --# The options we'll try to enable. -+# These options work in either C or C++ modes. - build_warnings="-Wall -Wpointer-arith \ ---Wno-unused -Wunused-value -Wunused-function \ ---Wno-switch -Wno-char-subscripts \ ---Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ ---Wno-sign-compare -Wno-narrowing" -+-Wno-unused -Wno-switch -Wno-char-subscripts \ -+-Wempty-body -Wno-sign-compare -Wno-narrowing" - - # Enable -Wno-format by default when using gcc on mingw since many - # GCC versions complain about %I64. Index: head/devel/gdb/files/patch-gdb-configure.host =================================================================== --- head/devel/gdb/files/patch-gdb-configure.host +++ head/devel/gdb/files/patch-gdb-configure.host @@ -1,12 +0,0 @@ -diff --git gdb/configure.host gdb/configure.host -index 48714f4..53989d3 100644 ---- gdb/configure.host -+++ gdb/configure.host -@@ -90,6 +90,7 @@ alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu) - gdb_host=nbsd ;; - alpha*-*-openbsd*) gdb_host=nbsd ;; - -+arm*-*-freebsd*) gdb_host=fbsd ;; - arm*-*-linux*) gdb_host=linux ;; - arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu) - gdb_host=nbsdelf ;; Index: head/devel/gdb/files/patch-gdb-corelow.c =================================================================== --- head/devel/gdb/files/patch-gdb-corelow.c +++ head/devel/gdb/files/patch-gdb-corelow.c @@ -1,11 +0,0 @@ ---- gdb/corelow.c.orig 2017-07-29 11:06:52.922688000 -0700 -+++ gdb/corelow.c 2017-07-29 11:07:23.883255000 -0700 -@@ -517,7 +517,7 @@ get_core_register_section (struct regcache *regcache, - bool variable_size_section = (regset != NULL - && regset->flags & REGSET_VARIABLE_SIZE); - -- thread_section_name section_name (name, regcache->ptid ()); -+ thread_section_name section_name (name, regcache_get_ptid (regcache)); - - section = bfd_get_section_by_name (core_bfd, section_name.c_str ()); - if (! section) Index: head/devel/gdb/files/patch-gdb-fbsd-nat.c =================================================================== --- head/devel/gdb/files/patch-gdb-fbsd-nat.c +++ head/devel/gdb/files/patch-gdb-fbsd-nat.c @@ -1,19 +0,0 @@ -diff --git gdb/fbsd-nat.c gdb/fbsd-nat.c -index ef5ad1ec92..dedb1ba59c 100644 ---- gdb/fbsd-nat.c -+++ gdb/fbsd-nat.c -@@ -682,6 +682,14 @@ fbsd_resume (struct target_ops *ops, - struct thread_info *tp; - int request; - -+#ifndef PT_LWP_EVENTS -+ /* When LWP events are not supported, a new thread might already be -+ running that has not yet reported an event when GDB wishes to -+ only run a single thread. Force an update of the thread list -+ to ensure that any such threads are suspended before the process -+ is resumed. */ -+ fbsd_add_threads (ptid_get_pid (ptid)); -+#endif - ALL_NON_EXITED_THREADS (tp) - { - if (ptid_get_pid (tp->ptid) != ptid_get_pid (ptid)) Index: head/devel/gdb/files/patch-gdb-gdb_wchar.h =================================================================== --- head/devel/gdb/files/patch-gdb-gdb_wchar.h +++ head/devel/gdb/files/patch-gdb-gdb_wchar.h @@ -1,22 +0,0 @@ -diff --git gdb/gdb_wchar.h gdb/gdb_wchar.h -index 868fe04..1311080 100644 ---- gdb/gdb_wchar.h -+++ gdb/gdb_wchar.h -@@ -59,7 +59,7 @@ - iconvlist. */ - #if defined (HAVE_ICONV) && defined (HAVE_BTOWC) \ - && (defined (__STDC_ISO_10646__) \ -- || (defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108)) -+ || (!defined (LIBICONV_PLUG) && defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108)) - - typedef wchar_t gdb_wchar_t; - typedef wint_t gdb_wint_t; -@@ -82,7 +82,7 @@ typedef wint_t gdb_wint_t; - #define INTERMEDIATE_ENCODING intermediate_encoding () - const char *intermediate_encoding (void); - --#elif defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108 -+#elif !defined (LIBICONV_PLUG) && defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108 - #define INTERMEDIATE_ENCODING "wchar_t" - #else - /* This shouldn't happen, because the earlier #if should have filtered Index: head/devel/gdb/files/patch-gdb-gnulib-import-stddef.in.h =================================================================== --- head/devel/gdb/files/patch-gdb-gnulib-import-stddef.in.h +++ head/devel/gdb/files/patch-gdb-gnulib-import-stddef.in.h @@ -1,13 +0,0 @@ -diff --git gdb/gnulib/import/stddef.in.h gdb/gnulib/import/stddef.in.h -index f4c4a1070d..023ea2064d 100644 ---- gdb/gnulib/import/stddef.in.h -+++ gdb/gnulib/import/stddef.in.h -@@ -84,7 +84,7 @@ - /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is - a hack in case the configure-time test was done with g++ even though - we are currently compiling with gcc. */ --#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) -+#if 0 - /* On the x86, the maximum storage alignment of double, long, etc. is 4, - but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, - and the C11 standard allows this. Work around this problem by Index: head/devel/gdb/files/patch-gdb-i386-fbsd-nat.c =================================================================== --- head/devel/gdb/files/patch-gdb-i386-fbsd-nat.c +++ head/devel/gdb/files/patch-gdb-i386-fbsd-nat.c @@ -1,12 +0,0 @@ -diff --git gdb/i386-fbsd-nat.c gdb/i386-fbsd-nat.c -index dca6c0162b..6629950feb 100644 ---- gdb/i386-fbsd-nat.c -+++ gdb/i386-fbsd-nat.c -@@ -163,7 +163,6 @@ _initialize_i386fbsd_nat (void) - t->to_read_description = i386fbsd_read_description; - #endif - -- t->to_resume = i386fbsd_resume; - fbsd_nat_add_target (t); - - /* Support debugging kernel virtual memory images. */ Index: head/devel/gdb/files/patch-gdb-python-python-config.py =================================================================== --- head/devel/gdb/files/patch-gdb-python-python-config.py +++ head/devel/gdb/files/patch-gdb-python-python-config.py @@ -1,13 +0,0 @@ -diff --git gdb/python/python-config.py gdb/python/python-config.py -index c2b2969..39af8d9 100644 ---- gdb/python/python-config.py -+++ gdb/python/python-config.py -@@ -59,6 +59,8 @@ for opt in opt_flags: - - elif opt in ('--libs', '--ldflags'): - libs = [] -+ if getvar('LDFLAGS') is not None: -+ libs.extend(getvar('LDFLAGS').split()) - if getvar('LIBS') is not None: - libs.extend(getvar('LIBS').split()) - if getvar('SYSLIBS') is not None: Index: head/devel/gdb/files/patch-gdb_amd64-bsd-nat.c =================================================================== --- head/devel/gdb/files/patch-gdb_amd64-bsd-nat.c +++ head/devel/gdb/files/patch-gdb_amd64-bsd-nat.c @@ -0,0 +1,30 @@ +--- gdb/amd64-bsd-nat.c.orig 2017-09-14 09:28:17 UTC ++++ gdb/amd64-bsd-nat.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include "amd64-tdep.h" + #include "amd64-nat.h" +@@ -95,12 +96,19 @@ amd64bsd_store_inferior_registers (struct target_ops *ops, + if (regnum == -1 || amd64_native_gregset_supplies_p (gdbarch, regnum)) + { + struct reg regs; ++ register_t old_rflags; + + if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + perror_with_name (_("Couldn't get registers")); + ++ old_rflags = regs.r_rflags; + amd64_collect_native_gregset (regcache, ®s, regnum); + ++ /* This is a workaround about the PSL_USERCHANGE posix limitation. */ ++ if ((regs.r_rflags ^ old_rflags ) & ~PSL_USERCHANGE) ++ { ++ regs.r_rflags ^= (regs.r_rflags ^ old_rflags ) & ~PSL_USERCHANGE; ++ } + if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1) + perror_with_name (_("Couldn't write registers")); + Index: head/devel/gdb/files/patch-gdb_common_common-defs.h =================================================================== --- head/devel/gdb/files/patch-gdb_common_common-defs.h +++ head/devel/gdb/files/patch-gdb_common_common-defs.h @@ -0,0 +1,18 @@ +--- gdb/common/common-defs.h.orig 2017-09-12 12:25:12 UTC ++++ gdb/common/common-defs.h +@@ -44,9 +44,15 @@ + + Must do this before including any system header, since other system + headers may include stdint.h/inttypes.h. */ ++#ifndef __STDC_CONSTANT_MACROS + #define __STDC_CONSTANT_MACROS 1 ++#endif ++#ifndef __STDC_LIMIT_MACROS + #define __STDC_LIMIT_MACROS 1 ++#endif ++#ifndef __STDC_FORMAT_MACROS + #define __STDC_FORMAT_MACROS 1 ++#endif + + #include + #include Index: head/devel/gdb/files/patch-gdb_configure =================================================================== --- head/devel/gdb/files/patch-gdb_configure +++ head/devel/gdb/files/patch-gdb_configure @@ -0,0 +1,18 @@ +--- gdb/configure.orig 2017-09-14 09:28:17 UTC ++++ gdb/configure +@@ -15103,12 +15103,10 @@ if test "${ERROR_ON_WARNING}" = yes ; then + WERROR_CFLAGS="-Werror" + fi + +-# The options we'll try to enable. ++# These options work in either C or C++ modes. + build_warnings="-Wall -Wpointer-arith \ +--Wno-unused -Wunused-value -Wunused-function \ +--Wno-switch -Wno-char-subscripts \ +--Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ +--Wno-sign-compare -Wno-narrowing" ++-Wno-unused -Wno-switch -Wno-char-subscripts \ ++-Wempty-body -Wno-sign-compare -Wno-narrowing -Wno-mismatched-tags" + + # Enable -Wno-format by default when using gcc on mingw since many + # GCC versions complain about %I64. Index: head/devel/gdb/files/patch-gdb_configure.host =================================================================== --- head/devel/gdb/files/patch-gdb_configure.host +++ head/devel/gdb/files/patch-gdb_configure.host @@ -0,0 +1,10 @@ +--- gdb/configure.host.orig 2017-09-14 09:28:17 UTC ++++ gdb/configure.host +@@ -90,6 +90,7 @@ alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu) + gdb_host=nbsd ;; + alpha*-*-openbsd*) gdb_host=nbsd ;; + ++arm*-*-freebsd*) gdb_host=fbsd ;; + arm*-*-linux*) gdb_host=linux ;; + arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu) + gdb_host=nbsdelf ;; Index: head/devel/gdb/files/patch-gdb_corelow.c =================================================================== --- head/devel/gdb/files/patch-gdb_corelow.c +++ head/devel/gdb/files/patch-gdb_corelow.c @@ -0,0 +1,11 @@ +--- gdb/corelow.c.orig 2017-07-29 11:06:52 UTC ++++ gdb/corelow.c +@@ -517,7 +517,7 @@ get_core_register_section (struct regcache *regcache, + bool variable_size_section = (regset != NULL + && regset->flags & REGSET_VARIABLE_SIZE); + +- thread_section_name section_name (name, regcache->ptid ()); ++ thread_section_name section_name (name, regcache_get_ptid (regcache)); + + section = bfd_get_section_by_name (core_bfd, section_name.c_str ()); + if (! section) Index: head/devel/gdb/files/patch-gdb_fbsd-nat.c =================================================================== --- head/devel/gdb/files/patch-gdb_fbsd-nat.c +++ head/devel/gdb/files/patch-gdb_fbsd-nat.c @@ -0,0 +1,17 @@ +--- gdb/fbsd-nat.c.orig 2017-09-14 09:28:17 UTC ++++ gdb/fbsd-nat.c +@@ -682,6 +682,14 @@ fbsd_resume (struct target_ops *ops, + struct thread_info *tp; + int request; + ++#ifndef PT_LWP_EVENTS ++ /* When LWP events are not supported, a new thread might already be ++ running that has not yet reported an event when GDB wishes to ++ only run a single thread. Force an update of the thread list ++ to ensure that any such threads are suspended before the process ++ is resumed. */ ++ fbsd_add_threads (ptid_get_pid (ptid)); ++#endif + ALL_NON_EXITED_THREADS (tp) + { + if (ptid_get_pid (tp->ptid) != ptid_get_pid (ptid)) Index: head/devel/gdb/files/patch-gdb_gdb__wchar.h =================================================================== --- head/devel/gdb/files/patch-gdb_gdb__wchar.h +++ head/devel/gdb/files/patch-gdb_gdb__wchar.h @@ -0,0 +1,20 @@ +--- gdb/gdb_wchar.h.orig 2017-09-14 09:28:17 UTC ++++ gdb/gdb_wchar.h +@@ -59,7 +59,7 @@ + iconvlist. */ + #if defined (HAVE_ICONV) && defined (HAVE_BTOWC) \ + && (defined (__STDC_ISO_10646__) \ +- || (defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108)) ++ || (!defined (LIBICONV_PLUG) && defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108)) + + typedef wchar_t gdb_wchar_t; + typedef wint_t gdb_wint_t; +@@ -82,7 +82,7 @@ typedef wint_t gdb_wint_t; + #define INTERMEDIATE_ENCODING intermediate_encoding () + const char *intermediate_encoding (void); + +-#elif defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108 ++#elif !defined (LIBICONV_PLUG) && defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108 + #define INTERMEDIATE_ENCODING "wchar_t" + #else + /* This shouldn't happen, because the earlier #if should have filtered Index: head/devel/gdb/files/patch-gdb_gnulib_import_stddef.in.h =================================================================== --- head/devel/gdb/files/patch-gdb_gnulib_import_stddef.in.h +++ head/devel/gdb/files/patch-gdb_gnulib_import_stddef.in.h @@ -0,0 +1,11 @@ +--- gdb/gnulib/import/stddef.in.h.orig 2017-09-14 09:28:17 UTC ++++ gdb/gnulib/import/stddef.in.h +@@ -84,7 +84,7 @@ + /* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is + a hack in case the configure-time test was done with g++ even though + we are currently compiling with gcc. */ +-#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) ++#if 0 + /* On the x86, the maximum storage alignment of double, long, etc. is 4, + but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, + and the C11 standard allows this. Work around this problem by Index: head/devel/gdb/files/patch-gdb_i386-fbsd-nat.c =================================================================== --- head/devel/gdb/files/patch-gdb_i386-fbsd-nat.c +++ head/devel/gdb/files/patch-gdb_i386-fbsd-nat.c @@ -0,0 +1,10 @@ +--- gdb/i386-fbsd-nat.c 2017-09-14 09:28:17 UTC ++++ gdb/i386-fbsd-nat.c +@@ -163,7 +163,6 @@ _initialize_i386fbsd_nat (void) + t->to_read_description = i386fbsd_read_description; + #endif + +- t->to_resume = i386fbsd_resume; + fbsd_nat_add_target (t); + + /* Support debugging kernel virtual memory images. */ Index: head/devel/gdb/files/patch-gdb_python_python-config.py =================================================================== --- head/devel/gdb/files/patch-gdb_python_python-config.py +++ head/devel/gdb/files/patch-gdb_python_python-config.py @@ -0,0 +1,11 @@ +--- gdb/python/python-config.py 2017-09-14 09:28:17 UTC ++++ gdb/python/python-config.py +@@ -59,6 +59,8 @@ for opt in opt_flags: + + elif opt in ('--libs', '--ldflags'): + libs = [] ++ if getvar('LDFLAGS') is not None: ++ libs.extend(getvar('LDFLAGS').split()) + if getvar('LIBS') is not None: + libs.extend(getvar('LIBS').split()) + if getvar('SYSLIBS') is not None: Index: head/devel/gdb/files/patch-include_libiberty.h =================================================================== --- head/devel/gdb/files/patch-include_libiberty.h +++ head/devel/gdb/files/patch-include_libiberty.h @@ -0,0 +1,11 @@ +--- include/libiberty.h 2017-09-14 09:28:17 UTC ++++ include/libiberty.h +@@ -109,7 +109,7 @@ + || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) \ + || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) \ + || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME) +-extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1); ++#include + #else + /* Do not allow basename to be used if there is no prototype seen. We + either need to use the above prototype or have one from Index: head/devel/gdb/files/patch-libiberty-basename =================================================================== --- head/devel/gdb/files/patch-libiberty-basename +++ head/devel/gdb/files/patch-libiberty-basename @@ -1,11 +0,0 @@ ---- include/libiberty.h -+++ include/libiberty.h -@@ -109,7 +109,7 @@ - || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) \ - || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) \ - || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME) --extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1); -+#include - #else - /* Do not allow basename to be used if there is no prototype seen. We - either need to use the above prototype or have one from Index: head/devel/gdb/files/patch-libiberty_configure =================================================================== --- head/devel/gdb/files/patch-libiberty_configure +++ head/devel/gdb/files/patch-libiberty_configure @@ -0,0 +1,12 @@ +--- libiberty/configure.orig 2017-09-12 12:10:11 UTC ++++ libiberty/configure +@@ -4398,8 +4398,7 @@ + ac_libiberty_warn_cflags= + save_CFLAGS="$CFLAGS" + for real_option in -W -Wall -Wwrite-strings -Wc++-compat \ +- -Wstrict-prototypes \ +- -Wshadow=local; do ++ -Wstrict-prototypes ; do + # Do the check with the no- prefix removed since gcc silently + # accepts any -Wno-* option on purpose + case $real_option in Index: head/devel/gdb/files/patch-nowarning =================================================================== --- head/devel/gdb/files/patch-nowarning +++ head/devel/gdb/files/patch-nowarning @@ -1,5 +1,5 @@ ---- gdb/arm-tdep.c.orig 2016-07-08 15:42:17.131392993 +0200 -+++ gdb/arm-tdep.c 2016-07-08 15:44:10.506386463 +0200 +--- gdb/arm-tdep.c.orig 2016-07-08 15:42:17 UTC ++++ gdb/arm-tdep.c @@ -9880,7 +9880,7 @@ && !INSN_RECORDED(arm_insn_r)) { Index: head/devel/gdb/files/patch-unified =================================================================== --- head/devel/gdb/files/patch-unified +++ head/devel/gdb/files/patch-unified @@ -1,6 +1,4 @@ -diff --git gdb/gdb.c gdb/gdb.c -index e554015..dcb9925 100644 ---- gdb/gdb.c +--- gdb/gdb.c.orig 2017-09-14 09:28:17 UTC +++ gdb/gdb.c @@ -28,6 +28,12 @@ main (int argc, char **argv) memset (&args, 0, sizeof args);