(少なくともTiger以前には)binutilsがない.

ことの起こりは

問題は,先週末の合宿中に発覚.

  • TOPPERS/ASPでは,OSXで動作するエミュレータが添付となる予定.
  • またコンフィギュレータは完全に差し替えとなり,S-recordを使って静的な解決を行う.

てなわけで,OSX上でMach-OからS-recordが作れなければならない.objcopyの出番.
しかし,Tigerは,gcc, GNU ld, gas, gdb まで揃っているのに,binutilsに含まれるツールが存在しない.
代替ツールもどうやら存在しない.なんてことだ.

CVS mainline

DarwinPorts のパッチを真似て,sourceware.org の CVS mainline に,以下のパッチを当てると,
普通に動くっぽい.

Index: configure
===================================================================
RCS file: /cvs/src/src/configure,v
retrieving revision 1.258
diff -u -p -r1.258 configure
--- configure   19 Feb 2007 17:24:25 -0000      1.258
+++ configure   28 Feb 2007 01:49:25 -0000
@@ -2111,7 +2111,7 @@ case "${target}" in
     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     ;;
   powerpc-*-darwin* | i[3456789]86-*-darwin*)
-    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
+    noconfigdirs="$noconfigdirs ld gas gdb gprof"
     noconfigdirs="$noconfigdirs sim target-rda"
     ;;
   *-*-darwin*)

でもNickは…

You could edit the top level configure file to allow it, but really the point of the refusal to build is that it is known that the binutils do not (currently) work for darwin.

言っている

とりあえず

「試したけど動くみたいっすよ」と投げておき,様子見.