mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Ports: Add initial GDB 11.1 port
This builds and runs, but crashes when you attempt to try to debug something at the moment.
This commit is contained in:
parent
fcdd202741
commit
bd3bbd0329
3 changed files with 72 additions and 0 deletions
|
@ -47,6 +47,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
|||
| [`freetype`](freetype/) | FreeType | 2.10.4 | https://www.freetype.org/ |
|
||||
| [`frotz`](frotz/) | Frotz | 2.53 | https://gitlab.com/DavidGriffith/frotz |
|
||||
| [`gawk`](gawk/) | GNU awk | 5.1.0 | https://www.gnu.org/software/gawk/ |
|
||||
| [`gdb`](gdb/) | GNU Project Debugger | 11.1 | https://sourceware.org/gdb |
|
||||
| [`gcc`](gcc/) | GNU Compiler Collection | 11.2.0 | https://gcc.gnu.org/ |
|
||||
| [`genemu`](genemu/) | Genesis / MegaDrive Emulator | 3bf6f7c | https://github.com/rasky/genemu |
|
||||
| [`gettext`](gettext/) | GNU gettext | 0.21 | https://www.gnu.org/software/gettext/ |
|
||||
|
|
16
Ports/gdb/package.sh
Executable file
16
Ports/gdb/package.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=gdb
|
||||
version=11.1
|
||||
useconfigure=true
|
||||
configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/" "--with-build-sysroot=${SERENITY_INSTALL_ROOT}" "--with-newlib" "--enable-languages=c,c++" "--disable-lto" "--disable-nls" "--enable-shared" "--enable-default-pie" "--enable-host-shared" "--enable-threads=posix")
|
||||
files="https://ftpmirror.gnu.org/gnu/gdb/gdb-${version}.tar.xz gdb-${version}.tar.xz cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94"
|
||||
makeopts+=("all")
|
||||
installopts=("DESTDIR=${SERENITY_INSTALL_ROOT}")
|
||||
depends=("gmp" "binutils")
|
||||
auth_type="sha256"
|
||||
|
||||
# We only have a stub of getrusage(..)
|
||||
export ac_cv_func_getrusage=no
|
||||
|
||||
# We don't support the madvise options that are used.
|
||||
export ac_cv_func_madvise=no
|
55
Ports/gdb/patches/build-config.patch
Normal file
55
Ports/gdb/patches/build-config.patch
Normal file
|
@ -0,0 +1,55 @@
|
|||
diff --git a/bfd/config.bfd b/bfd/config.bfd
|
||||
index 30087e3..11dc114 100644
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -634,6 +634,11 @@ case "${targ}" in
|
||||
targ_selvecs=
|
||||
targ64_selvecs=x86_64_elf64_vec
|
||||
;;
|
||||
+ i[3-7]86-*-serenity*)
|
||||
+ targ_defvec=i386_elf32_vec
|
||||
+ targ_selvecs=
|
||||
+ targ64_selvecs=x86_64_elf64_vec
|
||||
+ ;;
|
||||
#ifdef BFD64
|
||||
x86_64-*-cloudabi*)
|
||||
targ_defvec=x86_64_elf64_cloudabi_vec
|
||||
@@ -694,6 +699,10 @@ case "${targ}" in
|
||||
targ_selvecs=i386_elf32_vec
|
||||
want64=true
|
||||
;;
|
||||
+ x86_64-*-serenity*)
|
||||
+ targ_defvec=x86_64_elf64_vec
|
||||
+ want64=true
|
||||
+ ;;
|
||||
#endif
|
||||
i[3-7]86-*-lynxos*)
|
||||
targ_defvec=i386_elf32_vec
|
||||
diff --git a/gdbsupport/configure b/gdbsupport/configure
|
||||
index a9dd02c..3c5bcf5 100755
|
||||
--- a/gdbsupport/configure
|
||||
+++ b/gdbsupport/configure
|
||||
@@ -8934,7 +8934,7 @@ $as_echo "$gdb_cv_cxx_std_thread" >&6; }
|
||||
|
||||
# This check must be here, while LIBS includes any necessary
|
||||
# threading library.
|
||||
- for ac_func in pthread_sigmask pthread_setname_np
|
||||
+ for ac_func in pthread_setname_np
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
diff --git a/libiberty/configure b/libiberty/configure
|
||||
index fffb91d..defc239 100755
|
||||
--- a/libiberty/configure
|
||||
+++ b/libiberty/configure
|
||||
@@ -6478,7 +6478,9 @@ case "${host}" in
|
||||
$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
|
||||
|
||||
$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
|
||||
-
|
||||
+ ;;
|
||||
+ *-*-serenity*)
|
||||
+ $as_echo "#define HAVE_PSIGNAL 1" >>confdefs.h
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in a new issue