diff options
Diffstat (limited to 'sys-devel/gdb')
-rw-r--r-- | sys-devel/gdb/Manifest | 14 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-12.1-configure-clang16.patch | 112 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-12.1-core-file-detach.patch | 155 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch | 29 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-13.1-Wenum-constexpr-conversion-clang16.patch | 128 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-13.1-musl-lfs.patch | 23 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-12.1-r4.ebuild | 293 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-13.1-r1.ebuild | 304 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-13.1.90_p20230325.ebuild | 313 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-13.1.90_p20230429.ebuild | 314 |
10 files changed, 0 insertions, 1685 deletions
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest index 5eac1e09535d..10efb5a9e9ee 100644 --- a/sys-devel/gdb/Manifest +++ b/sys-devel/gdb/Manifest @@ -1,19 +1,5 @@ -AUX gdb-12.1-configure-clang16.patch 2893 BLAKE2B 15079fc458db3f57a99340800afccebb03a4d3067a9f14e44b8915588dc7c4f528047601d9c53257ea1e84a4b3b2eb17de08c43cc45334176e5cb37ccda0438e SHA512 c55b9afdaea5f482ceef34263b08ecda96109fa55208b2eca744734a29b4b364d44384e4e15b3a625fed6e781abe77775ead7773f1544371893f2a80ff2016d6 -AUX gdb-12.1-core-file-detach.patch 5853 BLAKE2B 4442a9d6357f751f9953236a068ffc5e8a1f57eef1bf9e118d572614164486197db44cb6e5f1ab20906ae97ca1c4805a01ce5c2c3cbd1509bb383c108b6b8b1e SHA512 e044053dec340e6373b4a3546adf36ea121bb63a5277d6a1f24f5551edb0cf408f3f862076d6760b27501d54025063afd4a9375914c3f2321f5410466a89f75b -AUX gdb-12.1-readline-8.2-build.patch 926 BLAKE2B f483dd1054b019d44dd4731ba22113551d3530a9da1af8c5e83aeae3ba820d96b8a1c2cb7758ecc3fbe8a56cdc7232cdece809d15c30dbfffadc30d81738a7ca SHA512 f865349953181fe3502abbe6042ebab249e2ebbc4c0017ebad756aadfd63e72f57b009fe2e7d036543f326e54518a656101bef572d03a7a7170c9ec305807ed8 -AUX gdb-13.1-Wenum-constexpr-conversion-clang16.patch 5795 BLAKE2B 22f8d242a13f7068ffe367d945be320e3f5e289adcfd60de24bcf53eb90a2b2334b7f3c71e3ab323064b64eb1a3b19f707fa70ab9e725d8391d05ea5d3e25035 SHA512 87c121615e6bf535c4a5988fcdc8214d8e2ddb6cd48eafd314ba963f57d9d1ac0f77b73e71e63e9cb16224d304b30baf78c7ef541b19f40b0dee796d3d640aef -AUX gdb-13.1-musl-lfs.patch 808 BLAKE2B 5379e315f551ff8aa02f812afd7d9987970a6f495c454f61e56a831989f3b793fcb0d4e2f5eb0f49b83c00971cd79d8f267e2e64d8f5625ebea3d2da59485534 SHA512 3103a3fe48368171545dcbacaa2be0cb9e25494121a0056dbff75d7ebd459e98e0bf5e81a16916ce82b119101bd6aa0c81f71630c5c13da65b7adadf4a85ae81 AUX gdb-8.3.1-verbose-build.patch 395 BLAKE2B e2e82307ceae64d16aa9b57a5e639eb5d217c4d977aed0847fdf125bb13ebc004906d9afb8e3f629c41efccca88df0040015e7799c1fd24de5fb50f62f5bbd90 SHA512 c2bb013e4fcabefddcd8042bd3cbb53471f83182cc8769fe0d19eed80ccc4a83bd84d120006fa25b3b7d0310dc2f2ec6b44a6ff74909cd312b7e491f371777a3 -DIST gdb-12.1-patches-1.tar.xz 12340 BLAKE2B 071ff492f6cf7b0969d76db6f7414eeec564daf773c3334fb0d3f669e328bb4ae403ba8c709f3e33a56caa92273f762a5597a34dd7e7a1056f473b7ede2d8e59 SHA512 dc4a1a8d501dd1adfdcd6dcbd2559f1e2cc6aadeb18eacb2e9152f6858510e7392253db9568fe782da6d160221412e3e13dfd42a47a2a4a1addba2c1804a45b5 -DIST gdb-12.1.tar.xz 22470332 BLAKE2B 7f6f853d1640908cf2c79932cdc1ba02549a07721c005d9c7ce2946a715761719cc164a4e68235a18664ec8a029afe3a2a0cfb57e1635f280076d6bed91317fd SHA512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d -DIST gdb-13.1.tar.xz 23665472 BLAKE2B ab3a77ef35d21597dd1299787eebc422c3ca9764d0866223752c3036c0f9e198bf25ab4730bf6e7025bc2db148c66e98b191e15abc2d69c3088aed146728beef SHA512 e65054ffbc0357eeed4b17e1edc5ef45aa73c9ddf3b1210651e3d859576e27c1d27b266800fe26328eda58857455ccd8632f4000cfc5f63f90854096290187ca DIST gdb-13.2.tar.xz 23664644 BLAKE2B bf5216ba2286448a46f9e0a405367c5a678e6d7540204722d355b618018b7b75a2ebc5b51353304c5ded02a3979223a81781d305f5afa5be82516cdc2863d49f SHA512 8185d3e11ab60dafff5860a5016577bfe7dd7547ef01ebc867bc247603d82b74ff74c4f29492c7d2aee57076f52be33e289f4c6b414a4b870d4b3004909f4c34 -DIST gdb-weekly-13.1.90.20230325.tar.xz 24816144 BLAKE2B 2273ca1e6b3b563721c1497b30ae9c1c1d6fa88d1a50745a528163d54b45cc0582d3a053f279339dcc5d86b17dabe16c2be63488ac72ed7636af5988919c4b5e SHA512 19a1f1e0d4fc6f7a87c421e487990e3bc6c5ad5fae933be0e4f0ba8eec06b6bc3b0fc814d55e6059dfc2b7414ef0e7191967503dd0eda9021ccabc6d55030f49 -DIST gdb-weekly-13.1.90.20230429.tar.xz 24806568 BLAKE2B 537faf7f354ac8adae879899d1a871a303d6ef8faa5ffa66970b2ab95d82750829de5f1cc9b7fb0aab12bb9f10219b3d255a52127e50dd28fef25b47ce2d9364 SHA512 1f0bad14a0862a5c119971025add895b8814421c95ab9095159382805ee8592f1695e84aad2bf5f711c807400eae50a9a6fa6ff45f329c885003f0209c44e493 -EBUILD gdb-12.1-r4.ebuild 8106 BLAKE2B b6a20b1ae36bdceb5373d73363ff17ed194cfdb6f77876ff8de95d783c35446ece3ea87e10001f97eb62a1901e4910bb5f33f28a9d6c81f21b9e4e43cdf32d05 SHA512 c8b44d109e4a5ef7fc6cd904d2dea066e07445896b84e50b08f7644a09a0c17d8d00811083d96be2a82d36b15c622746ebb34e2016243570d7930adba0dfc134 -EBUILD gdb-13.1-r1.ebuild 8342 BLAKE2B 8f73f337ab6eb6cd9488f6e40adb24983a9179214d311dc196eb856fb58ad0562dc5a12569c34e77df91087fa770c09d3767abd10be170a503e47bccf1c847c4 SHA512 126021123b282594ac9e3b13b178ef78e0e4e23e1da7c38bff81cad659f2773e5de445f6556a2c4c55b8a542f079d1c05be66950259c1f95d0f17588ca20b2f4 -EBUILD gdb-13.1.90_p20230325.ebuild 8714 BLAKE2B fe0f4d620fed5bb3686f32a7fc075efa6fdec2c0764bf8a58432e32a1647f23ee785f23c78f426826f8b7fdc04ee5900b377abfafe061875ec2c5f24d8edfe1e SHA512 44c394daaa9ab38178f7c5c35201041fc640491c17d222d80056ee57e949790595fe5935c86805fd3f562fe0aa9f9a691c30aebc65b6ef3be61bea87831472be -EBUILD gdb-13.1.90_p20230429.ebuild 8763 BLAKE2B 6341c8ac37a0a4f55b2c3201937e40e05820064e2621b1c465753ecc438d006b1d67fd7efcf65121123b397d2ed29408d3341e35ed7e0e6277a120f58ff0a48f SHA512 942a023cb2d6c755b891c771aa1fb7cf6c15a67b901964f92dc29de6ca8b6cb9149c0967d8976c4136ff5bd7eb33ad75517266e47fe7f1e968a1ee03f7c8b139 EBUILD gdb-13.2.ebuild 8648 BLAKE2B f5d2ab303fb9fbbbe83aa34627418d9d68715336b2ca4dc7a599e978dfc5dcb5b4c514fba37ec7c8dbb3dd74171a2670b232379593612f1e7f691783b1d7f9af SHA512 9fe1903c5705560be32886cb590454e93bb9bd0f5ad0dbb67379c728e5693b3535fad78dcccbe84171da06317a2d07260c354377f9cfe65e9a74d0f125cb0c7d EBUILD gdb-9999.ebuild 8656 BLAKE2B 1cae4462b766233d95bb582c5f9a55237b779285f9aa72b9d361331014eda3f608cab2435182b566acb34ed7ee326b9b4b406ba516bd6a58cac53824b3195f5b SHA512 a1e45f5ed2e6fd5e85a6447e69280d325465c71eb10772efc794e8c8b262ad78e41bce944cb8132fead0e57d4dd2a4715b075c50ae6c1d2bfc8c30bdf85feb9c MISC metadata.xml 1242 BLAKE2B 368d8798d7d3b610653f635eb36ee5517912e8a2cb392622b32ac0aa90f336e3b391ba25811dee110644e50fabec0d64f6bcf3b219cdd240ec806e709a198eed SHA512 192fa340899680413c3d6c886ecd7d2262475a33aecc452192e5fe1d8e3eb5cf17546e57181e720128cf9b39cd8e4b1b1a73cb1f0c9887866c0ce88b288636e2 diff --git a/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch b/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch deleted file mode 100644 index 3b2c15de4895..000000000000 --- a/sys-devel/gdb/files/gdb-12.1-configure-clang16.patch +++ /dev/null @@ -1,112 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0075c53724f78c78aa1692cc8e3bf1433eeb0b9f -https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=885b6660c17fb91980b5682514ef54668e544b02 -https://bugzilla.redhat.com/show_bug.cgi?id=2143992 - -From FEDORA_PATCHES Mon Sep 17 00:00:00 2001 -From: Keith Seitz <keiths@redhat.com> -Date: Tue, 29 Nov 2022 13:43:34 -0800 -Subject: gdb-rhbz2143992-libiberty-fix-c89isms-in-configure.patch - -;; libiberty: Fix C89-isms in configure tests -;; (Florian Weimer, RHBZ 2143992) - - libiberty/ - - * acinclude.m4 (ac_cv_func_strncmp_works): Add missing - int return type and parameter list to the definition of main. - Include <stdlib.h> and <string.h> for prototypes. - (ac_cv_c_stack_direction): Add missing - int return type and parameter list to the definitions of - main, find_stack_direction. Include <stdlib.h> for exit - prototype. - * configure: Regenerate. - ---- a/libiberty/acinclude.m4 -+++ b/libiberty/acinclude.m4 -@@ -24,6 +24,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works, - [AC_TRY_RUN([ - /* Test by Jim Wilson and Kaveh Ghazi. - Check whether strncmp reads past the end of its string parameters. */ -+#include <stdlib.h> -+#include <string.h> - #include <sys/types.h> - - #ifdef HAVE_FCNTL_H -@@ -51,7 +53,8 @@ AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works, - - #define MAP_LEN 0x10000 - --main () -+int -+main (void) - { - #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) - char *p; -@@ -157,7 +160,10 @@ if test $ac_cv_os_cray = yes; then - fi - - AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, --[AC_TRY_RUN([find_stack_direction () -+[AC_TRY_RUN([#include <stdlib.h> -+ -+int -+find_stack_direction (void) - { - static char *addr = 0; - auto char dummy; -@@ -169,7 +175,9 @@ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, - else - return (&dummy > addr) ? 1 : -1; - } --main () -+ -+int -+main (void) - { - exit (find_stack_direction() < 0); - }], ---- a/libiberty/configure -+++ b/libiberty/configure -@@ -6918,7 +6918,10 @@ else - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --find_stack_direction () -+#include <stdlib.h> -+ -+int -+find_stack_direction (void) - { - static char *addr = 0; - auto char dummy; -@@ -6930,7 +6933,9 @@ find_stack_direction () - else - return (&dummy > addr) ? 1 : -1; - } --main () -+ -+int -+main (void) - { - exit (find_stack_direction() < 0); - } -@@ -7755,6 +7760,8 @@ else - - /* Test by Jim Wilson and Kaveh Ghazi. - Check whether strncmp reads past the end of its string parameters. */ -+#include <stdlib.h> -+#include <string.h> - #include <sys/types.h> - - #ifdef HAVE_FCNTL_H -@@ -7782,7 +7789,8 @@ else - - #define MAP_LEN 0x10000 - --main () -+int -+main (void) - { - #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) - char *p; - diff --git a/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch b/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch deleted file mode 100644 index c0f8a8ee0269..000000000000 --- a/sys-devel/gdb/files/gdb-12.1-core-file-detach.patch +++ /dev/null @@ -1,155 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=0fe74cb9ad35add9c6da4df5c9879f254d918a6a - -From: Pedro Alves <pedro@palves.net> -Date: Wed, 22 Jun 2022 18:44:37 +0100 -Subject: [PATCH] Fix core-file -> detach -> crash (corefiles/29275) - -After loading a core file, you're supposed to be able to use "detach" -to unload the core file. That unfortunately regressed starting with -GDB 11, with these commits: - - 1192f124a308 - gdb: generalize commit_resume, avoid commit-resuming when threads have pending statuses - 408f66864a1a - detach in all-stop with threads running - -resulting in a GDB crash: - - ... - Thread 1 "gdb" received signal SIGSEGV, Segmentation fault. - 0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899 - 2899 if (proc_target->commit_resumed_state) - (top-gdb) bt - #0 0x0000555555e842bf in maybe_set_commit_resumed_all_targets () at ../../src/gdb/infrun.c:2899 - #1 0x0000555555e848bf in scoped_disable_commit_resumed::reset (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3023 - #2 0x0000555555e84a0c in scoped_disable_commit_resumed::reset_and_commit (this=0x7fffffffd440) at ../../src/gdb/infrun.c:3049 - #3 0x0000555555e739cd in detach_command (args=0x0, from_tty=1) at ../../src/gdb/infcmd.c:2791 - #4 0x0000555555c0ba46 in do_simple_func (args=0x0, from_tty=1, c=0x55555662a600) at ../../src/gdb/cli/cli-decode.c:95 - #5 0x0000555555c112b0 in cmd_func (cmd=0x55555662a600, args=0x0, from_tty=1) at ../../src/gdb/cli/cli-decode.c:2514 - #6 0x0000555556173b1f in execute_command (p=0x5555565c5916 "", from_tty=1) at ../../src/gdb/top.c:699 - -The code that crashes looks like: - - static void - maybe_set_commit_resumed_all_targets () - { - scoped_restore_current_thread restore_thread; - - for (inferior *inf : all_non_exited_inferiors ()) - { - process_stratum_target *proc_target = inf->process_target (); - - if (proc_target->commit_resumed_state) - ^^^^^^^^^^^ - -With 'proc_target' above being null. all_non_exited_inferiors filters -out inferiors that have pid==0. We get here at the end of -detach_command, after core_target::detach has already run, at which -point the inferior _should_ have pid==0 and no process target. It is -clear it no longer has a process target, but, it still has a pid!=0 -somehow. - -The reason the inferior still has pid!=0, is that core_target::detach -just unpushes, and relies on core_target::close to actually do the -getting rid of the core and exiting the inferior. The problem with -that is that detach_command grabs an extra strong reference to the -process stratum target, so the unpush_target inside -core_target::detach doesn't actually result in a call to -core_target::close. - -Fix this my moving the cleaning up the core inferior to a shared -routine called by both core_target::close and core_target::detach. We -still need to cleanup the inferior from within core_file::close -because there are paths to it that want to get rid of the core without -going through detach. E.g., "core-file" -> "run". - -This commit includes a new test added to gdb.base/corefile.exp to -cover the "core-file core" -> "detach" scenario. - -Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29275 - -Change-Id: Ic42bdd03182166b19f598428b0dbc2ce6f67c893 ---- a/gdb/corelow.c -+++ b/gdb/corelow.c -@@ -120,6 +120,9 @@ public: - - private: /* per-core data */ - -+ /* Get rid of the core inferior. */ -+ void clear_core (); -+ - /* The core's section table. Note that these target sections are - *not* mapped in the current address spaces' set of target - sections --- those should come only from pure executable or -@@ -290,10 +293,8 @@ core_target::build_file_mappings () - /* An arbitrary identifier for the core inferior. */ - #define CORELOW_PID 1 - --/* Close the core target. */ -- - void --core_target::close () -+core_target::clear_core () - { - if (core_bfd) - { -@@ -307,6 +308,14 @@ core_target::close () - - current_program_space->cbfd.reset (nullptr); - } -+} -+ -+/* Close the core target. */ -+ -+void -+core_target::close () -+{ -+ clear_core (); - - /* Core targets are heap-allocated (see core_target_open), so here - we delete ourselves. */ -@@ -592,9 +601,15 @@ core_target_open (const char *arg, int from_tty) - void - core_target::detach (inferior *inf, int from_tty) - { -- /* Note that 'this' is dangling after this call. unpush_target -- closes the target, and our close implementation deletes -- 'this'. */ -+ /* Get rid of the core. Don't rely on core_target::close doing it, -+ because target_detach may be called with core_target's refcount > 1, -+ meaning core_target::close may not be called yet by the -+ unpush_target call below. */ -+ clear_core (); -+ -+ /* Note that 'this' may be dangling after this call. unpush_target -+ closes the target if the refcount reaches 0, and our close -+ implementation deletes 'this'. */ - inf->unpush_target (this); - - /* Clear the register cache and the frame cache. */ ---- a/gdb/testsuite/gdb.base/corefile.exp -+++ b/gdb/testsuite/gdb.base/corefile.exp -@@ -207,6 +207,16 @@ gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(.*\\).*" "up in corefile.exp ( - - gdb_test "core" "No core file now." - -+# Test that we can unload the core with the "detach" command. -+ -+proc_with_prefix corefile_detach {} { -+ clean_restart $::binfile -+ -+ gdb_test "core-file $::corefile" "Core was generated by .*" "load core" -+ gdb_test "detach" "No core file now\\." "detach core" -+} -+ -+corefile_detach - - # Test a run (start) command will clear any loaded core file. - -@@ -222,6 +232,8 @@ proc corefile_test_run {} { - return - } - -+ clean_restart $::binfile -+ - gdb_test "core-file $corefile" "Core was generated by .*" "run: load core again" - gdb_test "info files" "\r\nLocal core dump file:\r\n.*" "run: sanity check we see the core file" - diff --git a/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch b/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch deleted file mode 100644 index fad27ee4ca85..000000000000 --- a/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch +++ /dev/null @@ -1,29 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=1add37b567a7dee39d99f37b37802034c3fce9c4 -https://bugs.gentoo.org/842252 - -From: Andreas Schwab <schwab@linux-m68k.org> -Date: Sun, 20 Mar 2022 14:01:54 +0100 -Subject: [PATCH] Add support for readline 8.2 - -In readline 8.2 the type of rl_completer_word_break_characters changed to -include const. ---- a/gdb/completer.c -+++ b/gdb/completer.c -@@ -36,7 +36,7 @@ - calling a hook instead so we eliminate the CLI dependency. */ - #include "gdbcmd.h" - --/* Needed for rl_completer_word_break_characters() and for -+/* Needed for rl_completer_word_break_characters and for - rl_filename_completion_function. */ - #include "readline/readline.h" - -@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw () - rl_basic_quote_characters = NULL; - } - -- return rl_completer_word_break_characters; -+ return (char *) rl_completer_word_break_characters; - } - - char * diff --git a/sys-devel/gdb/files/gdb-13.1-Wenum-constexpr-conversion-clang16.patch b/sys-devel/gdb/files/gdb-13.1-Wenum-constexpr-conversion-clang16.patch deleted file mode 100644 index adc09f83ea68..000000000000 --- a/sys-devel/gdb/files/gdb-13.1-Wenum-constexpr-conversion-clang16.patch +++ /dev/null @@ -1,128 +0,0 @@ -https://bugs.gentoo.org/894174 -https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae61525fcf456ab395d55c45492a106d1275873a - -From ae61525fcf456ab395d55c45492a106d1275873a Mon Sep 17 00:00:00 2001 -From: Simon Marchi <simon.marchi@efficios.com> -Date: Thu, 23 Feb 2023 12:35:40 -0500 -Subject: [PATCH] gdbsupport: ignore -Wenum-constexpr-conversion in - enum-flags.h - -When building with clang 16, we get: - - CXX gdb.o - In file included from /home/smarchi/src/binutils-gdb/gdb/gdb.c:19: - In file included from /home/smarchi/src/binutils-gdb/gdb/defs.h:65: - /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion] - integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type - ^ - -The error message does not make it clear in the context of which enum -flag this fails (i.e. what is T in this context), but it doesn't really -matter, we have similar warning/errors for many of them, if we let the -build go through. - -clang is right that the value -1 is invalid for the enum type we cast -1 -to. However, we do need this expression in order to select an integer -type with the appropriate signedness. That is, with the same signedness -as the underlying type of the enum. - -I first wondered if that was really needed, if we couldn't use -std::underlying_type for that. It turns out that the comment just above -says: - - /* Note that std::underlying_type<enum_type> is not what we want here, - since that returns unsigned int even when the enum decays to signed - int. */ - -I was surprised, because std::is_signed<std::underlying_type<enum_type>> -returns the right thing. So I tried replacing all this with -std::underlying_type, see if that would work. Doing so causes some -build failures in unittests/enum-flags-selftests.c: - - CXX unittests/enum-flags-selftests.o - /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:254:1: error: static assertion failed due to requirement 'gdb::is_same<selftests::enum_flags_tests::check_valid_expr254::archetype<enum_flags<s - elftests::enum_flags_tests::RE>, selftests::enum_flags_tests::RE, enum_flags<selftests::enum_flags_tests::RE2>, selftests::enum_flags_tests::RE2, enum_flags<selftests::enum_flags_tests::URE>, selftests::enum_fla - gs_tests::URE, int>, selftests::enum_flags_tests::check_valid_expr254::archetype<enum_flags<selftests::enum_flags_tests::RE>, selftests::enum_flags_tests::RE, enum_flags<selftests::enum_flags_tests::RE2>, selfte - sts::enum_flags_tests::RE2, enum_flags<selftests::enum_flags_tests::URE>, selftests::enum_flags_tests::URE, unsigned int>>::value == true': - CHECK_VALID (true, int, true ? EF () : EF2 ()) - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:91:3: note: expanded from macro 'CHECK_VALID' - CHECK_VALID_EXPR_6 (EF, RE, EF2, RE2, UEF, URE, VALID, EXPR_TYPE, EXPR) - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:105:3: note: expanded from macro 'CHECK_VALID_EXPR_6' - CHECK_VALID_EXPR_INT (ESC_PARENS (typename T1, typename T2, \ - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:66:3: note: expanded from macro 'CHECK_VALID_EXPR_INT' - static_assert (gdb::is_detected_exact<archetype<TYPES, EXPR_TYPE>, \ - ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This is a bit hard to decode, but basically enumerations have the -following funny property that they decay into a signed int, even if -their implicit underlying type is unsigned. This code: - - enum A {}; - enum B {}; - - int main() { - std::cout << std::is_signed<std::underlying_type<A>::type>::value - << std::endl; - std::cout << std::is_signed<std::underlying_type<B>::type>::value - << std::endl; - auto result = true ? A() : B(); - std::cout << std::is_signed<decltype(result)>::value << std::endl; - } - -produces: - - 0 - 0 - 1 - -So, the "CHECK_VALID" above checks that this property works for enum flags the -same way as it would if you were using their underlying enum types. And -somehow, changing integer_for_size to use std::underlying_type breaks that. - -Since the current code does what we want, and I don't see any way of doing it -differently, ignore -Wenum-constexpr-conversion around it. - -Change-Id: Ibc82ae7bbdb812102ae3f1dd099fc859dc6f3cc2 ---- a/gdbsupport/enum-flags.h -+++ b/gdbsupport/enum-flags.h -@@ -91,9 +91,12 @@ template<> struct integer_for_size<8, 1> { typedef int64_t type; }; - template<typename T> - struct enum_underlying_type - { -+ DIAGNOSTIC_PUSH -+ DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION - typedef typename - integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type - type; -+ DIAGNOSTIC_POP - }; - - namespace enum_flags_detail ---- a/include/diagnostics.h -+++ b/include/diagnostics.h -@@ -76,6 +76,11 @@ - # define DIAGNOSTIC_ERROR_SWITCH \ - DIAGNOSTIC_ERROR ("-Wswitch") - -+# if __has_warning ("-Wenum-constexpr-conversion") -+# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION \ -+ DIAGNOSTIC_IGNORE ("-Wenum-constexpr-conversion") -+# endif -+ - #elif defined (__GNUC__) /* GCC */ - - # define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS \ -@@ -155,4 +160,8 @@ - # define DIAGNOSTIC_ERROR_SWITCH - #endif - -+#ifndef DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION -+# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION -+#endif -+ - #endif /* DIAGNOSTICS_H */ --- -2.31.1 diff --git a/sys-devel/gdb/files/gdb-13.1-musl-lfs.patch b/sys-devel/gdb/files/gdb-13.1-musl-lfs.patch deleted file mode 100644 index d7778e305903..000000000000 --- a/sys-devel/gdb/files/gdb-13.1-musl-lfs.patch +++ /dev/null @@ -1,23 +0,0 @@ -https://bugs.gentoo.org/905922 -https://sourceware.org/bugzilla/show_bug.cgi?id=30450 -https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=2e977d9901393ea1bacbe1896af0929e968bc811 - -From 2e977d9901393ea1bacbe1896af0929e968bc811 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 22 Feb 2023 16:28:22 -0800 -Subject: [PATCH] gdbserver/linux-low.cc: Fix a typo in ternary operator - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/gdbserver/linux-low.cc -+++ b/gdbserver/linux-low.cc -@@ -5390,7 +5390,7 @@ proc_xfer_memory (CORE_ADDR memaddr, unsigned char *readbuf, - if (lseek (fd, memaddr, SEEK_SET) != -1) - bytes = (readbuf != nullptr - ? read (fd, readbuf, len) -- ? write (fd, writebuf, len)); -+ : write (fd, writebuf, len)); - #endif - - if (bytes < 0) --- -2.31.1 diff --git a/sys-devel/gdb/gdb-12.1-r4.ebuild b/sys-devel/gdb/gdb-12.1-r4.ebuild deleted file mode 100644 index 4126e99a43d7..000000000000 --- a/sys-devel/gdb/gdb-12.1-r4.ebuild +++ /dev/null @@ -1,293 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{9..11} ) -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_DEV="sam" -PATCH_VER="1" - -DESCRIPTION="GNU debugger" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI=" - ${SRC_URI} - ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${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 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" -fi - -IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!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 - app-alternatives/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 - "${FILESDIR}"/${P}-core-file-detach.patch - "${FILESDIR}"/${P}-configure-clang16.patch -) - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - [[ -d "${WORKDIR}"/${P}-patches-${PATCH_VER} ]] && eapply "${WORKDIR}"/${P}-patches-${PATCH_VER} - - 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 sim) - $(use_enable source-highlight) - $(use multitarget && echo --enable-targets=all) - $(use_with python python "${EPYTHON}") - $(use_with xxhash) - $(use_with guile) - ) - - # 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_test() { - # Run the unittests (nabbed invocation from Fedora's spec file) at least - emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"' - - # Too many failures - # 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" - # Also, ia64 kernel crashes when gdb testsuite is running. - #emake -k check -} - -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 - - # 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-13.1-r1.ebuild b/sys-devel/gdb/gdb-13.1-r1.ebuild deleted file mode 100644 index a19b1dd0eeee..000000000000 --- a/sys-devel/gdb/gdb-13.1-r1.ebuild +++ /dev/null @@ -1,304 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging -# tips & notes. - -PYTHON_COMPAT=( python3_{9..11} ) -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_p2???????|*.*.90_p2???????) - # Weekly snapshots - MY_PV="${PV/_p/.}" - SRC_URI=" - https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz - https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz - " - S="${WORKDIR}/${PN}-${MY_PV}" - ;; - *.*.9?) - # Prereleases - MY_PV="${PV/_p/.}" - SRC_URI=" - https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz - " - S="${WORKDIR}/${PN}-${MY_PV}" - ;; - *) - # Normal upstream release - SRC_URI=" - mirror://gnu/gdb/${P}.tar.xz - https://sourceware.org/pub/gdb/releases/${P}.tar.xz - " - - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" - ;; -esac - -PATCH_DEV="" -PATCH_VER="" -DESCRIPTION="GNU debugger" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI=" - ${SRC_URI} - ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz} - ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} -" - -LICENSE="GPL-3+ LGPL-2.1+" -SLOT="0" -IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!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 - ) - zstd? ( app-arch/zstd:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/xz-utils - sys-apps/texinfo - app-alternatives/yacc - nls? ( sys-devel/gettext ) - source-highlight? ( virtual/pkgconfig ) - test? ( dev-util/dejagnu ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch - "${FILESDIR}"/${P}-Wenum-constexpr-conversion-clang16.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,gprofng,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) - - # Helps when cross-compiling. Not to be confused with --with-sysroot. - --with-build-sysroot="${ESYSROOT}" - ) - - is_cross && myconf+=( - --with-sysroot="\${prefix}/${CTARGET}" - --includedir="\${prefix}/include/${CTARGET}" - --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 sim) - $(use_enable source-highlight) - $(use multitarget && echo --enable-targets=all) - $(use_with python python "${EPYTHON}") - $(use_with xxhash) - $(use_with guile) - $(use_with zstd) - - # Find libraries using the toolchain sysroot rather than the configured - # prefix. Needed when cross-compiling. - # - # Check which libraries to apply this to with: - # "${S}"/gdb/configure --help | grep without-lib | sort - --without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix - ) - - # 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_test() { - # Run the unittests (nabbed invocation from Fedora's spec file) at least - emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"' - - # Too many failures - # 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" - # Also, ia64 kernel crashes when gdb testsuite is running. - #emake -k check -} - -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 - - # 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-13.1.90_p20230325.ebuild b/sys-devel/gdb/gdb-13.1.90_p20230325.ebuild deleted file mode 100644 index 7f50bf391455..000000000000 --- a/sys-devel/gdb/gdb-13.1.90_p20230325.ebuild +++ /dev/null @@ -1,313 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging -# tips & notes. - -PYTHON_COMPAT=( python3_{9..11} ) -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_p2???????|*.*.90_p2???????) - # Weekly snapshots - MY_PV="${PV/_p/.}" - SRC_URI=" - https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz - https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-weekly-${MY_PV}.tar.xz - " - S="${WORKDIR}/${PN}-${MY_PV}" - - # e.g. 13.1.90_p20230325 is a snapshot on the stable branch, so it's fine - if [[ ${PV} == *.[123456789].9?_p2??????? ]] ; then - REGULAR_RELEASE=1 - fi - ;; - *.*.9?) - # Prereleases - MY_PV="${PV/_p/.}" - SRC_URI=" - https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-${MY_PV}.tar.xz - " - S="${WORKDIR}/${PN}-${MY_PV}" - ;; - *) - # Normal upstream release - SRC_URI=" - mirror://gnu/gdb/${P}.tar.xz - https://sourceware.org/pub/gdb/releases/${P}.tar.xz - " - - REGULAR_RELEASE=1 -esac - -PATCH_DEV="" -PATCH_VER="" -DESCRIPTION="GNU debugger" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI=" - ${SRC_URI} - ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz} - ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} -" - -LICENSE="GPL-3+ LGPL-2.1+" -SLOT="0" -IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd" -if [[ -n ${REGULAR_RELEASE} ]] ; then - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" -fi -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -RDEPEND=" - dev-libs/mpfr:= - dev-libs/gmp:= - >=sys-libs/ncurses-5.2-r2:= - >=sys-libs/readline-7:= - 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 - ) - zstd? ( app-arch/zstd:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/xz-utils - sys-apps/texinfo - app-alternatives/yacc - nls? ( sys-devel/gettext ) - source-highlight? ( virtual/pkgconfig ) - test? ( dev-util/dejagnu ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch - "${FILESDIR}"/${PN}-13.1-Wenum-constexpr-conversion-clang16.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,gprofng,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) - - # Helps when cross-compiling. Not to be confused with --with-sysroot. - --with-build-sysroot="${ESYSROOT}" - ) - - is_cross && myconf+=( - --with-sysroot="\${prefix}/${CTARGET}" - --includedir="\${prefix}/include/${CTARGET}" - --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 sim) - $(use_enable source-highlight) - $(use multitarget && echo --enable-targets=all) - $(use_with python python "${EPYTHON}") - $(use_with xxhash) - $(use_with guile) - $(use_with zstd) - - # Find libraries using the toolchain sysroot rather than the configured - # prefix. Needed when cross-compiling. - # - # Check which libraries to apply this to with: - # "${S}"/gdb/configure --help | grep without-lib | sort - --without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix - ) - - # 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_test() { - # Run the unittests (nabbed invocation from Fedora's spec file) at least - emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"' - - # Too many failures - # 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" - # Also, ia64 kernel crashes when gdb testsuite is running. - #emake -k check -} - -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 - - # 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-13.1.90_p20230429.ebuild b/sys-devel/gdb/gdb-13.1.90_p20230429.ebuild deleted file mode 100644 index 1593ff281134..000000000000 --- a/sys-devel/gdb/gdb-13.1.90_p20230429.ebuild +++ /dev/null @@ -1,314 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging -# tips & notes. - -PYTHON_COMPAT=( python3_{9..11} ) -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_p2???????|*.*.90_p2???????) - # Weekly snapshots - MY_PV="${PV/_p/.}" - SRC_URI=" - https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz - https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-weekly-${MY_PV}.tar.xz - " - S="${WORKDIR}/${PN}-${MY_PV}" - - # e.g. 13.1.90_p20230325 is a snapshot on the stable branch, so it's fine - if [[ ${PV} == *.[123456789].9?_p2??????? ]] ; then - REGULAR_RELEASE=1 - fi - ;; - *.*.9?) - # Prereleases - MY_PV="${PV/_p/.}" - SRC_URI=" - https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-${MY_PV}.tar.xz - " - S="${WORKDIR}/${PN}-${MY_PV}" - ;; - *) - # Normal upstream release - SRC_URI=" - mirror://gnu/gdb/${P}.tar.xz - https://sourceware.org/pub/gdb/releases/${P}.tar.xz - " - - REGULAR_RELEASE=1 -esac - -PATCH_DEV="" -PATCH_VER="" -DESCRIPTION="GNU debugger" -HOMEPAGE="https://sourceware.org/gdb/" -SRC_URI=" - ${SRC_URI} - ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz} - ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} -" - -LICENSE="GPL-3+ LGPL-2.1+" -SLOT="0" -IUSE="cet guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd" -if [[ -n ${REGULAR_RELEASE} ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" -fi -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!test? ( test )" - -RDEPEND=" - dev-libs/mpfr:= - dev-libs/gmp:= - >=sys-libs/ncurses-5.2-r2:= - >=sys-libs/readline-7:= - 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 - ) - zstd? ( app-arch/zstd:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - app-arch/xz-utils - sys-apps/texinfo - app-alternatives/yacc - nls? ( sys-devel/gettext ) - source-highlight? ( virtual/pkgconfig ) - test? ( dev-util/dejagnu ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch - "${FILESDIR}"/${PN}-13.1-Wenum-constexpr-conversion-clang16.patch - "${FILESDIR}"/${PN}-13.1-musl-lfs.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,gprofng,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) - - # Helps when cross-compiling. Not to be confused with --with-sysroot. - --with-build-sysroot="${ESYSROOT}" - ) - - is_cross && myconf+=( - --with-sysroot="\${prefix}/${CTARGET}" - --includedir="\${prefix}/include/${CTARGET}" - --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 sim) - $(use_enable source-highlight) - $(use multitarget && echo --enable-targets=all) - $(use_with python python "${EPYTHON}") - $(use_with xxhash) - $(use_with guile) - $(use_with zstd) - - # Find libraries using the toolchain sysroot rather than the configured - # prefix. Needed when cross-compiling. - # - # Check which libraries to apply this to with: - # "${S}"/gdb/configure --help | grep without-lib | sort - --without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix - ) - - # 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_test() { - # Run the unittests (nabbed invocation from Fedora's spec file) at least - emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"' - - # Too many failures - # 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" - # Also, ia64 kernel crashes when gdb testsuite is running. - #emake -k check -} - -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 - - # 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 -} |