re PR bootstrap/41245 (Bootstrap broken on I386-apple-darwin9 at revision 151373)
authorIain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
Thu, 10 Sep 2009 14:32:51 +0000 (14:32 +0000)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 10 Sep 2009 14:32:51 +0000 (16:32 +0200)
PR bootstrap/41245
* compare-debug: Handle stripping of dwarf debug sections from darwin
mach-o objects.

From-SVN: r151594

contrib/ChangeLog
contrib/compare-debug

index 3174cfff58e4d69d45d35daab32e63909516698e..b4627d293b650b8a92dd8779c812dd4215fe2a42 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-10  Iain Sandoe  <iain.sandoe@sandoe-acoustics.co.uk>
+
+       PR bootstrap/41245
+       * compare-debug: Handle stripping of dwarf debug sections from darwin
+       mach-o objects.
+
 2009-09-04  Alexandre Oliva  <aoliva@redhat.com>
 
        * compare-debug: Grep for blank before dash to avoid grep -e.
index 6f2b4abfb5c907b650ffc860ba4ac6a886d01eb6..98c80f93e98d05b3a275bc5d5a9b4a1e3794aaca 100755 (executable)
@@ -57,11 +57,19 @@ done
 
 trap 'rm -f "$1.$suf1" "$2.$suf2"' 0 1 2 15
 
-cp "$1" "$1.$suf1"
-strip "$1.$suf1"
+case `uname -s` in
+Darwin)
+  ld -S -x -r -no_uuid "$1" -o "$1.$suf1"
+  ld -S -x -r -no_uuid "$2" -o "$2.$suf2"
+  ;;
+*)
+  cp "$1" "$1.$suf1"
+  strip "$1.$suf1"
 
-cp "$2" "$2.$suf2"
-strip "$2.$suf2"
+  cp "$2" "$2.$suf2"
+  strip "$2.$suf2"
+  ;;
+esac
 
 if cmp "$1.$suf1" "$2.$suf2"; then
   status=0