[OpenWrt-Devel,2/2] scripts: remote-gdb: Fix sysroot detection
diff mbox

Message ID 1422009427-18667-2-git-send-email-karlp@tweak.net.au
State Superseded
Delegated to: Felix Fietkau
Headers show

Commit Message

Karl Palsson Jan. 23, 2015, 10:37 a.m. UTC
From: Karl Palsson <karlp@remake.is>

Changes in target detection results in tweaks to the sysroot detection.

Signed-off-by: Karl Palsson <karlp@remake.is>
---
This seemed to have been broken before, even the search for gdb uses
a * after the libc pattern.

 scripts/remote-gdb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox

diff --git a/scripts/remote-gdb b/scripts/remote-gdb
index fdd5008..4dd7d4d 100755
--- a/scripts/remote-gdb
+++ b/scripts/remote-gdb
@@ -62,7 +62,8 @@  if( opendir SD, "$Bin/../staging_dir" )
 		my ( $fh, $fp ) = tempfile();
 
 		# Find sysroot
-		my ($sysroot) = glob("$Bin/../staging_dir/target-${arch}_${libc}/root-*/");
+		my ($sysroot) = glob("$Bin/../staging_dir/target-${arch}_${libc}*/root-*/");
+		printf("Attempting to set sysroot: $sysroot\n");
 
 		print $fh "set sysroot $sysroot\n" if $sysroot;
 		my $cmd = "target extended-remote";