From 0f558761aa2dee1017b4751e4017205e015a9560 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 29 Jun 2022 12:04:12 +0100 Subject: gentoo resync : 29.12.2022 --- sys-devel/gdb/Manifest | 7 +- sys-devel/gdb/gdb-11.2.ebuild | 29 +++- sys-devel/gdb/gdb-12.1-r1.ebuild | 296 +++++++++++++++++++++++++++++++++++++++ sys-devel/gdb/gdb-12.1.ebuild | 27 +++- sys-devel/gdb/gdb-9999.ebuild | 38 ++++- 5 files changed, 373 insertions(+), 24 deletions(-) create mode 100644 sys-devel/gdb/gdb-12.1-r1.ebuild (limited to 'sys-devel/gdb') diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest index c61d06cda6f5..d63690bbaea8 100644 --- a/sys-devel/gdb/Manifest +++ b/sys-devel/gdb/Manifest @@ -3,7 +3,8 @@ AUX gdb-12.1-readline-8.2-build.patch 926 BLAKE2B f483dd1054b019d44dd4731ba22113 AUX gdb-8.3.1-verbose-build.patch 395 BLAKE2B e2e82307ceae64d16aa9b57a5e639eb5d217c4d977aed0847fdf125bb13ebc004906d9afb8e3f629c41efccca88df0040015e7799c1fd24de5fb50f62f5bbd90 SHA512 c2bb013e4fcabefddcd8042bd3cbb53471f83182cc8769fe0d19eed80ccc4a83bd84d120006fa25b3b7d0310dc2f2ec6b44a6ff74909cd312b7e491f371777a3 DIST gdb-11.2.tar.xz 22039420 BLAKE2B 66ce7e12c99c33c8b4e6ababa673204aab525e72c90ba54cc34a5fd69948a09dc2a9ef2050764b2464544231b1d1a6431279c2877388551ca6fbf384a3f9b464 SHA512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 DIST gdb-12.1.tar.xz 22470332 BLAKE2B 7f6f853d1640908cf2c79932cdc1ba02549a07721c005d9c7ce2946a715761719cc164a4e68235a18664ec8a029afe3a2a0cfb57e1635f280076d6bed91317fd SHA512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d -EBUILD gdb-11.2.ebuild 7236 BLAKE2B 3b14ca50368353fb9f1a8b4f1fcbb8be6b461a1f0a5f9dc32540ed62f791bb1abd32ae380d0339df49c6ea047453073d592ede4d2cf5eea2f01ed89b048bd8ec SHA512 58d4c20618ad9016722327ccf26963cea7f39ad65bde4483e8524dc39fb63aecedaf3241cdfe9ee9f5192bb73014e9c64b9d341a6558ee43082169d0f7cc2cd3 -EBUILD gdb-12.1.ebuild 7255 BLAKE2B 424e51c4f466d30eb5aac836cec992d4339b794d8fc6b2a57386e8f82050b5b07077bfe57eaa1ea79308e288f3054f400611b302bde3ac737a547c2730fd8239 SHA512 61963b0c79ca68fe4ca107c6e9314226e70f04fcda189e373bf2f6b3da1f90fb9b55513a2ede562cbb98c3115f23258ea1d2600bb418d925f6a13443087ccf22 -EBUILD gdb-9999.ebuild 7210 BLAKE2B f05546667b7ff2b4cb8ce25d70fe2fe4ccf86a65dbbfed6736f9f51abadfa7fd004f3a003360dff384ebb662f662473006d58928695940a838e34ceb446b181b SHA512 e1c892f70d65eeb1d77258f8d08e7f030ad7313977e1fd6ae4ae155a4cb24017384b6189d0c4091ae1c0472d2fd72bffacef3e8cc1cf232e8c3ea05c5053afca +EBUILD gdb-11.2.ebuild 7722 BLAKE2B 1bcbff793ff193619bb8a8d0fc066b4feadb66fde7561386b7cee2a4a21a2589e19581beaad9730d2d39542e34e62e030b4dcf0a27f3494963c61e890873e70b SHA512 2ec73b48268062d058757656a76a3b8c8934cf474850c0f580f7e6a0931c775cf649cbfa812aa2a70c707efb0ae74d0fef78c3faa7780499764adb5f04333e59 +EBUILD gdb-12.1-r1.ebuild 8183 BLAKE2B c5db7255d56993b78f66efc9b48bd577e3795b262ce9d53da118e4d6cbb1178a920a25f399162e21e2e9e38d2e85a10e3ab32275e76b083583fab083e8d04523 SHA512 1bddb8504f158c24d8f6b77b7fdf19821132e21eeea8f546905b6e2951c9555f729c7ecd0251b50519fb9ab50d3b5797163e298adcb0605d0344a851b42f59bd +EBUILD gdb-12.1.ebuild 7708 BLAKE2B 13e0a83a1f30c21d973c8bdaa018406b7a60563fec76e73052ccb388308f88acbd613a3c0e115a02f2fa61ff1c2733d79203750e93c815ef85f5f75bd76b23b4 SHA512 3e9e0fd46b7680daf8c8a67200af8fcfb1d0422d372820e758d5a5e8bc0d674b7ae977e600446e2201d645be7e2a930a2165bcb6a09fce5113088aaa2f7bb2ca +EBUILD gdb-9999.ebuild 8138 BLAKE2B b8a224bbaf457e8fe2df9dabdc8ca3a42ab5e04970d4f56c66b8ef9e76f8216a7eb02fba378f50a0b5966437ed71818dc0947ab6ae70fe1e3b6f633a4f9fa0b5 SHA512 86598fa68479b7cf165d35f1f1dcc70d543ffcac18c79efa0e05f83d9b8a999be04fed4ba4b4a7bb1e08af847db8d26dbb8bc5864b17b843c6901a24f4af483f MISC metadata.xml 1103 BLAKE2B e63ea2e52649ac2f4ac21381cadb7cc76525792e99a4a6581535475480b6c45e654c8222b0b58585435d4c858cf3eef00dcaecf7edecae2b2fd336f1b56e6e56 SHA512 f7f1b4da71b18cb68a2f32aa6faae6251528047069071c9bee1be504267d0baf2cbac4fb928e0cbe9df100e3a681e2c3b6c7be14514a45a2f52d30364a8626f4 diff --git a/sys-devel/gdb/gdb-11.2.ebuild b/sys-devel/gdb/gdb-11.2.ebuild index 9b5d95603631..a7deb8517553 100644 --- a/sys-devel/gdb/gdb-11.2.ebuild +++ b/sys-devel/gdb/gdb-11.2.ebuild @@ -43,7 +43,7 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} " -LICENSE="GPL-2 LGPL-2" +LICENSE="GPL-3+ LGPL-2.1+" SLOT="0" if [[ ${PV} != 9999* ]] ; then @@ -53,6 +53,9 @@ fi IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# In fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" # ia64 kernel crashes when gdb testsuite is running # in fact, gdb's test suite needs some work to get passing. # See e.g. https://sourceware.org/gdb/wiki/TestingGDB. @@ -103,9 +106,8 @@ src_prepare() { default strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD="$(tc-getBUILD_CC)" - # avoid using ancient termcap from host on Prefix systems + # Avoid using ancient termcap from host on Prefix systems sed -i -e 's/termcap tinfow/tinfow/g' \ gdb/configure{.ac,} || die } @@ -125,6 +127,11 @@ gdb_branding() { src_configure() { strip-unsupported-flags + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + local myconf=( # portage's econf() does not detect presence of --d-d-t # because it greps only top-level ./configure. But not @@ -134,13 +141,15 @@ src_configure() { --with-pkgversion="$(gdb_branding)" --with-bugurl='https://bugs.gentoo.org/' --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree. bug #490566 --disable-{binutils,etc,gas,gold,gprof,ld} # avoid automagic dependency on (currently prefix) systems # systems with debuginfod library, bug #754753 --without-debuginfod + $(use_enable test unit-tests) + # Allow user to opt into CET for host libraries. # Ideally we would like automagic-or-disabled here. # But the check does not quite work on i686: bug #760926. @@ -197,18 +206,24 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + # ensure proper compiler is detected for Clang builds: bug #831202 export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" econf "${myconf[@]}" } +src_compile() { + emake V=1 +} + src_install() { - default + emake V=1 DESTDIR="${D}" install find "${ED}"/usr -name libiberty.a -delete || die - # Delete translations that conflict with binutils-libs. #528088 + # Delete translations that conflict with binutils-libs. bug #528088 # Note: Should figure out how to store these in an internal gdb dir. if use nls ; then find "${ED}" \ @@ -252,7 +267,7 @@ src_install() { # Remove shared info pages rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* - if use python; then + if use python ; then python_optimize "${ED}"/usr/share/gdb/python/gdb fi } diff --git a/sys-devel/gdb/gdb-12.1-r1.ebuild b/sys-devel/gdb/gdb-12.1-r1.ebuild new file mode 100644 index 000000000000..993eca47f83f --- /dev/null +++ b/sys-devel/gdb/gdb-12.1-r1.ebuild @@ -0,0 +1,296 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8,9,10} ) +inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs + +export CTARGET=${CTARGET:-${CHOST}} + +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +case ${PV} in + 9999*) + # live git tree + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + inherit git-r3 + SRC_URI="" + ;; + *.*.50.2???????) + # weekly snapshots + SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz" + ;; + *) + # Normal upstream release + SRC_URI="mirror://gnu/gdb/${P}.tar.xz + ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz" + ;; +esac + +PATCH_VER="" +PATCH_DEV="" +DESCRIPTION="GNU debugger" +HOMEPAGE="https://sourceware.org/gdb/" +SRC_URI="${SRC_URI} + ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz} + ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} +" + +LICENSE="GPL-3+ LGPL-2.1+" +SLOT="0" + +if [[ ${PV} != 9999* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# In fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" +# ia64 kernel crashes when gdb testsuite is running +# in fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" +RESTRICT=" + ia64? ( test ) + !test? ( test ) + test +" + +RDEPEND=" + dev-libs/mpfr:0= + dev-libs/gmp:= + >=sys-libs/ncurses-5.2-r2:0= + >=sys-libs/readline-7:0= + sys-libs/zlib + elibc_glibc? ( net-libs/libnsl:= ) + lzma? ( app-arch/xz-utils ) + python? ( ${PYTHON_DEPS} ) + guile? ( >=dev-scheme/guile-2.0 ) + xml? ( dev-libs/expat ) + source-highlight? ( + dev-util/source-highlight + ) + xxhash? ( + dev-libs/xxhash + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-arch/xz-utils + sys-apps/texinfo + virtual/yacc + nls? ( sys-devel/gettext ) + source-highlight? ( virtual/pkgconfig ) + test? ( dev-util/dejagnu ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch + "${FILESDIR}"/${P}-readline-8.2-build.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + strip-linguas -u bfd/po opcodes/po + + # Avoid using ancient termcap from host on Prefix systems + sed -i -e 's/termcap tinfow/tinfow/g' \ + gdb/configure{.ac,} || die +} + +gdb_branding() { + printf "Gentoo ${PV} " + + if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then + printf "p${PATCH_VER}" + else + printf "vanilla" + fi + + [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}" +} + +src_configure() { + strip-unsupported-flags + + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + local myconf=( + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # gnulib's or gdb's configure. + --disable-dependency-tracking + + --with-pkgversion="$(gdb_branding)" + --with-bugurl='https://bugs.gentoo.org/' + --disable-werror + # Disable modules that are in a combined binutils/gdb tree. bug #490566 + --disable-{binutils,etc,gas,gold,gprof,ld} + + # avoid automagic dependency on (currently prefix) systems + # systems with debuginfod library, bug #754753 + --without-debuginfod + + $(use_enable test unit-tests) + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + + # We need to set both configure options, --with-sysroot and --libdir, + # to fix cross build issues that happen when configuring gmp. + # We explicitly need --libdir. Having only --with-sysroot without + # --libdir would not fix the build issues. + # For some reason, it is not enough to set only --with-sysroot, + # also not enough to pass --with-gmp-xxx options. + --with-sysroot="${ESYSROOT}" + --libdir="${ESYSROOT}/usr/$(get_libdir)" + ) + + local sysroot="${EPREFIX}/usr/${CTARGET}" + + is_cross && myconf+=( + --with-sysroot="${sysroot}" + --includedir="${sysroot}/usr/include" + --with-gdb-datadir="\${datadir}/gdb/${CTARGET}" + ) + + # gdbserver only works for native targets (CHOST==CTARGET). + # it also doesn't support all targets, so rather than duplicate + # the target list (which changes between versions), use the + # "auto" value when things are turned on, which is triggered + # whenever no --enable or --disable is given + if is_cross || use !server ; then + myconf+=( --disable-gdbserver ) + fi + + myconf+=( + --enable-64-bit-bfd + --disable-install-libbfd + --disable-install-libiberty + --enable-obsolete + # This only disables building in the readline subdir. + # For gdb itself, it'll use the system version. + --disable-readline + --with-system-readline + # This only disables building in the zlib subdir. + # For gdb itself, it'll use the system version. + --without-zlib + --with-system-zlib + --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug + $(use_with xml expat) + $(use_with lzma) + $(use_enable nls) + $(use_enable source-highlight) + $(use multitarget && echo --enable-targets=all) + $(use_with python python "${EPYTHON}") + $(use_with xxhash) + $(use_with guile) + ) + + if use sparc-solaris || use x86-solaris ; then + # Disable largefile support + # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html + myconf+=( --disable-largefile ) + fi + + # source-highlight is detected with pkg-config: bug #716558 + export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + + # ensure proper compiler is detected for Clang builds: bug #831202 + export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" + + econf "${myconf[@]}" +} + +src_compile() { + emake V=1 +} + +src_install() { + emake V=1 DESTDIR="${D}" install + + find "${ED}"/usr -name libiberty.a -delete || die + + # Delete translations that conflict with binutils-libs. bug #528088 + # Note: Should figure out how to store these in an internal gdb dir. + if use nls ; then + find "${ED}" \ + -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \ + -delete || die + fi + + # Don't install docs when building a cross-gdb + if [[ ${CTARGET} != ${CHOST} ]] ; then + rm -rf "${ED}"/usr/share/{doc,info,locale} || die + local f + for f in "${ED}"/usr/share/man/*/* ; do + if [[ ${f##*/} != ${CTARGET}-* ]] ; then + mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die + fi + done + return 0 + fi + + # Install it by hand for now: + # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html + # Only install if it exists due to the twisted behavior (see + # notes in src_configure above). + [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay + + docinto gdb + dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ + gdb/NEWS gdb/PROBLEMS + docinto sim + dodoc sim/{MAINTAINERS,README-HACKING} + + if use server ; then + docinto gdbserver + dodoc gdbserver/README + fi + + if [[ -n ${PATCH_VER} ]] ; then + dodoc "${WORKDIR}"/extra/gdbinit.sample + fi + + # Remove shared info pages + rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info* + + if use python ; then + python_optimize "${ED}"/usr/share/gdb/python/gdb + fi +} + +pkg_postinst() { + # Portage doesn't unmerge files in /etc + rm -vf "${EROOT}"/etc/skel/.gdbinit + + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then + ewarn "gdb is unable to get a mach task port when installed by Prefix" + ewarn "Portage, unprivileged. To make gdb fully functional you'll" + ewarn "have to perform the following steps:" + ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb" + ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb" + fi +} diff --git a/sys-devel/gdb/gdb-12.1.ebuild b/sys-devel/gdb/gdb-12.1.ebuild index b7ca1edd1937..0accf1af301f 100644 --- a/sys-devel/gdb/gdb-12.1.ebuild +++ b/sys-devel/gdb/gdb-12.1.ebuild @@ -43,7 +43,7 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} " -LICENSE="GPL-2 LGPL-2" +LICENSE="GPL-3+ LGPL-2.1+" SLOT="0" if [[ ${PV} != 9999* ]] ; then @@ -53,6 +53,9 @@ fi IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# In fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" # ia64 kernel crashes when gdb testsuite is running # in fact, gdb's test suite needs some work to get passing. # See e.g. https://sourceware.org/gdb/wiki/TestingGDB. @@ -104,9 +107,8 @@ src_prepare() { default strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD="$(tc-getBUILD_CC)" - # avoid using ancient termcap from host on Prefix systems + # Avoid using ancient termcap from host on Prefix systems sed -i -e 's/termcap tinfow/tinfow/g' \ gdb/configure{.ac,} || die } @@ -126,6 +128,11 @@ gdb_branding() { src_configure() { strip-unsupported-flags + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + local myconf=( # portage's econf() does not detect presence of --d-d-t # because it greps only top-level ./configure. But not @@ -135,7 +142,7 @@ src_configure() { --with-pkgversion="$(gdb_branding)" --with-bugurl='https://bugs.gentoo.org/' --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree. bug #490566 --disable-{binutils,etc,gas,gold,gprof,ld} # avoid automagic dependency on (currently prefix) systems @@ -198,18 +205,24 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + # ensure proper compiler is detected for Clang builds: bug #831202 export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" econf "${myconf[@]}" } +src_compile() { + emake V=1 +} + src_install() { - default + emake V=1 DESTDIR="${D}" install find "${ED}"/usr -name libiberty.a -delete || die - # Delete translations that conflict with binutils-libs. #528088 + # Delete translations that conflict with binutils-libs. bug #528088 # Note: Should figure out how to store these in an internal gdb dir. if use nls ; then find "${ED}" \ @@ -253,7 +266,7 @@ src_install() { # Remove shared info pages rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info* - if use python; then + if use python ; then python_optimize "${ED}"/usr/share/gdb/python/gdb fi } diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild index 8e18279f8752..a431465d7f6a 100644 --- a/sys-devel/gdb/gdb-9999.ebuild +++ b/sys-devel/gdb/gdb-9999.ebuild @@ -43,7 +43,7 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} " -LICENSE="GPL-2 LGPL-2" +LICENSE="GPL-3+ LGPL-2.1+" SLOT="0" if [[ ${PV} != 9999* ]] ; then @@ -53,6 +53,9 @@ fi IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# In fact, gdb's test suite needs some work to get passing. +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB. +# As of 11.2, on amd64: "# of unexpected failures 8600" # ia64 kernel crashes when gdb testsuite is running # in fact, gdb's test suite needs some work to get passing. # See e.g. https://sourceware.org/gdb/wiki/TestingGDB. @@ -103,9 +106,8 @@ src_prepare() { default strip-linguas -u bfd/po opcodes/po - export CC_FOR_BUILD="$(tc-getBUILD_CC)" - # avoid using ancient termcap from host on Prefix systems + # Avoid using ancient termcap from host on Prefix systems sed -i -e 's/termcap tinfow/tinfow/g' \ gdb/configure{.ac,} || die } @@ -125,6 +127,11 @@ gdb_branding() { src_configure() { strip-unsupported-flags + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + local myconf=( # portage's econf() does not detect presence of --d-d-t # because it greps only top-level ./configure. But not @@ -134,17 +141,28 @@ src_configure() { --with-pkgversion="$(gdb_branding)" --with-bugurl='https://bugs.gentoo.org/' --disable-werror - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree. bug #490566 --disable-{binutils,etc,gas,gold,gprof,ld} # avoid automagic dependency on (currently prefix) systems # systems with debuginfod library, bug #754753 --without-debuginfod + $(use_enable test unit-tests) + # Allow user to opt into CET for host libraries. # Ideally we would like automagic-or-disabled here. # But the check does not quite work on i686: bug #760926. $(use_enable cet) + + # We need to set both configure options, --with-sysroot and --libdir, + # to fix cross build issues that happen when configuring gmp. + # We explicitly need --libdir. Having only --with-sysroot without + # --libdir would not fix the build issues. + # For some reason, it is not enough to set only --with-sysroot, + # also not enough to pass --with-gmp-xxx options. + --with-sysroot="${ESYSROOT}" + --libdir="${ESYSROOT}/usr/$(get_libdir)" ) local sysroot="${EPREFIX}/usr/${CTARGET}" @@ -197,18 +215,24 @@ src_configure() { # source-highlight is detected with pkg-config: bug #716558 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + # ensure proper compiler is detected for Clang builds: bug #831202 export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" econf "${myconf[@]}" } +src_compile() { + emake V=1 +} + src_install() { - default + emake V=1 DESTDIR="${D}" install find "${ED}"/usr -name libiberty.a -delete || die - # Delete translations that conflict with binutils-libs. #528088 + # Delete translations that conflict with binutils-libs. bug #528088 # Note: Should figure out how to store these in an internal gdb dir. if use nls ; then find "${ED}" \ @@ -252,7 +276,7 @@ src_install() { # Remove shared info pages rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info* - if use python; then + if use python ; then python_optimize "${ED}"/usr/share/gdb/python/gdb fi } -- cgit v1.2.3