pkgsrc/devel/gdb/Makefile
kamil b2ac620c22 gdb: Upgrade to 8.0.1
pkgsrc specific changes
-----------------------

Set on NetBSD debug-dir to locale properly debug info of the base softwate:
    --with-separate-debug-dir=/usr/lib/debug

Disable globally binutils, gprof, gold, gas, ld. These packages are shipped
separately in other packages.

Upstream changelog
==================
GDB 8.0.1 brings the following fixes and enhancements over GDB 8.0:

  * PR breakpoint/21886 (Compressed MIPS code debugging impossible due to memory breakpoint misplacement)
  * PR symtab/22002 (Assertion on debuggee built with -gdwarf-5 -fdebug-types-section)
  * PR symtab/22003 (Incompatibility with -gdwarf-5 - DW_FORM_implicit_const)
  * PR gdb/22046 (Regression on older kernels for T (stopped) processes)
  * PR sim/20863 (gdb-7.12 powerpc-rtems4.12-gdb does not build on FreeBSD)
  * PR breakpoint/21555 ("error re-setting breakpoint" on PIE executables)
  * PR tdep/21717 ("print $fpscr" says "<unavailable>" until some VFP data register is printed)
  * PR exp/21827 (Regression: gdb command lookup became case-sensitive; but definitions are forced into lowercase)
  * PR remote/22021 (Multi-arch exec fails with a remote target)
2017-09-07 17:11:47 +00:00

90 lines
2.9 KiB
Makefile

# $NetBSD: Makefile,v 1.58 2017/09/07 17:11:47 kamil Exp $
DISTNAME= gdb-8.0.1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=gdb/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.gnu.org/software/gdb/gdb.html
COMMENT= Symbolic debugger for multiple language frontends
LICENSE= gnu-gpl-v3
USE_LANGUAGES= c c++11
BROKEN_GETTEXT_DETECTION= yes
GNU_CONFIGURE= YES
USE_PKGLOCALEDIR= YES
USE_LIBTOOL= YES
USE_TOOLS+= gmake msgfmt makeinfo perl:build
REPLACE_LOCALEDIR_PATTERNS+= Make-in
INSTALL_TARGET= install install-info
TEST_TARGET= check
INFO_FILES= yes
CONFIGURE_ENV+= CONFIG_LDFLAGS=${LDFLAGS:M*:Q}
# In gdb/configure, depcomp is parsed with sed.
SUBST_CLASSES+= fix-depcomp
SUBST_STAGE.fix-depcomp+= pre-configure
SUBST_MESSAGE.fix-depcomp+= Read depcomp directly
SUBST_FILES.fix-depcomp+= gdb/configure
SUBST_SED.fix-depcomp+= -e 's,< ./depcomp,${_OVERRIDE_PATH.depcomp},'
CONFIGURE_ARGS+= --disable-binutils
CONFIGURE_ARGS+= --disable-gprof
CONFIGURE_ARGS+= --disable-gold
CONFIGURE_ARGS+= --disable-gas
CONFIGURE_ARGS+= --disable-ld
AUTO_MKDIRS= yes
.include "options.mk"
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "SunOS"
# Work around a bug in gdb's configure
CONFIGURE_ENV+= ac_cv_header_curses_h=yes
.elif ${OPSYS} == "NetBSD"
.include "../../mk/curses.buildlink3.mk"
CONFIGURE_ARGS+= -with-curses
CONFIGURE_ENV+= gdb_cv_var_elf=yes
MAKE_ENV+= gdb_cv_var_elf=yes
CONFIGURE_ENV+= gdb_cv_struct_lwp=yes
MAKE_ENV+= gdb_cv_struct_lwp=yes
CONFIGURE_ARGS+= --with-separate-debug-dir=/usr/libdata/debug
.elif ${OPSYS} == "DragonFly"
TARGET_STR= ${MACHINE_ARCH}--dragonfly
BUILD_DEFS+= ${TARGET_STR}
## Remove "-pc" string, without this, getting following message:
## *** Gdb does not support native target i386-pc-dragonfly"
CONFIGURE_ARGS+= --target=${TARGET_STR}
TEST_ENV= DEJAGNU=${WRKDIR}/../files/dragonfly-default.exp
.endif
post-install:
${RM} -f ${DESTDIR}/${PREFIX}/lib/charset.alias
.if ${OPSYS} == "DragonFly"
# Following are installed by binutils
#. for f in ansidecl.h bfdlink.h dis-asm.h symcat.h
# (cd ${WRKSRC}/include; ${INSTALL_DATA} ${f} ${DESTDIR}${PREFIX}/include)
#. endfor
(cd ${DESTDIR}${PREFIX}/bin; ${LN} ${TARGET_STR}-gdb gdb)
(cd ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1; ${LN} ${TARGET_STR}-gdb.1 gdb.1)
.endif
#
# PATH of libiberty.a differs between clang and gcc: (and conflicts to other toolchain)
# Rename to avoid conflict to native and other toolchain
# and clang differs its path so, (the same as avr-binutils).
(cd ${DESTDIR}${PREFIX}; \
for d in ${MACHINE_ARCH}/libiberty.a libiberty.a; \
do if [ -f lib/$$d ]; then \
${MV} lib/$$d lib/gdb/libiberty.a; \
break; \
fi; \
done; )
.include "../../mk/termcap.buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"