openbsd-ports/lang/rust/patches/patch-src_etc_rust-gdb
landry ba61ea94c0 Update to rust 1.15.1.
- switch to rustbuild build system instead of configure (the world
  definitely needed one more build system!)
- the build still takes +INF hours, this is being investigated

Note that rust will be a hard-requirement for gecko 54... sigh.

Tested by semarie@ and myself on i386 & amd64.

All the hard work and countless build hours by semarie@, thanks!
2017-02-15 12:52:35 +00:00

24 lines
838 B
Plaintext

$OpenBSD: patch-src_etc_rust-gdb,v 1.2 2017/02/15 12:52:35 landry Exp $
only compatible with egdb (gdb from ports)
--- src/etc/rust-gdb.orig Tue Jan 31 01:29:51 2017
+++ src/etc/rust-gdb Sun Feb 5 15:40:37 2017
@@ -12,12 +12,17 @@
# Exit if anything fails
set -e
+if ! command -v egdb; then
+ echo "error: rust-gdb requires devel/gdb to be installed" >&2
+ exit 1
+fi
+
# Find out where the pretty printer Python module is
RUSTC_SYSROOT=`rustc --print=sysroot`
GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
# Run GDB with the additional arguments that load the pretty printers
-PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" gdb \
+PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" egdb \
-d "$GDB_PYTHON_MODULE_DIRECTORY" \
-iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
"$@"