summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch')
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch b/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch
new file mode 100644
index 000000000000..5442ba8ba636
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch
@@ -0,0 +1,15 @@
+* configure checks for /usr/bin/arch to determine whether "arch" is ok
+ to use, so don't rely on the path at runtime, since GNU arch doesn't
+ understand -arch at all (and only returns the current arch name)
+
+--- src/gdb/fork-child.c
++++ src/gdb/fork-child.c
+@@ -243,7 +243,7 @@
+ arch_string = "x86_64";
+ #endif
+ if (arch_string != NULL)
+- sprintf (shell_command, "%s exec arch -arch %s ", shell_command, arch_string);
++ sprintf (shell_command, "%s exec /usr/bin/arch -arch %s ", shell_command, arch_string);
+ else
+ strcat (shell_command, "exec ");
+ }