Explorar el Código

Handle collect2 -plugin option and avoid error output on non-existing gdb.exe

git-svn-id: trunk@32221 -
pierre hace 9 años
padre
commit
51d849ae3b
Se han modificado 1 ficheros con 17 adiciones y 3 borrados
  1. 17 3
      packages/gdbint/gen-gdblib-inc.sh

+ 17 - 3
packages/gdbint/gen-gdblib-inc.sh

@@ -387,6 +387,11 @@ BEGIN {
       print "echo dynamic linker " list[i] " skipped";
       continue
     }
+    if ( list[i] ~ /^-plugin$/ ) {
+      i++;
+      print "echo collect2 -plugin " list[i] " skipped";
+      continue
+    }
     if ( list[i] ~ /lib[^ ]*\.so/ ) {
       dynamiclib = gensub (/([^ ]*)(lib[^ ]*\.so)/,"\\1\\2 ","g",list[i]);
       print "echo " dynamiclib " found";
@@ -424,9 +429,13 @@ chmod u+x ./copy-libs.sh
 
 # Check if mingw executable contains
 # __cpu_features_init function
-has_cpu_features_init=`objdump -t gdb.exe | grep cpu_features_init `
-if [ "X$has_cpu_features_init" == "X" ] ; then
-  mingw_no_cpu_features_init=1
+if [ -f gdb.exe ] ; then
+  has_cpu_features_init=`objdump -t gdb.exe | grep cpu_features_init `
+  if [ "X$has_cpu_features_init" == "X" ] ; then
+    mingw_no_cpu_features_init=1
+  else
+    mingw_no_cpu_features_init=0
+  fi
 else
   mingw_no_cpu_features_init=0
 fi
@@ -472,6 +481,11 @@ BEGIN {
       print "{ Dynamic linker found " list[i] " }";
       continue
     }
+    if ( list[i] ~ /^-plugin$/ ) {
+      i++;
+      print "{ collect2 -plugin " list[i] " ignored }";
+      continue
+    }
     if ( list[i] ~ /-D__USE_MINGW_/ ) {
       use_mingw=1
     }