一般論
組合せ
  gcc2 or gcc3
例題
  kuro-box
    binutils
    glibc
    gcc
    sample compile
      compile on Host
      open on target
  kernel
  NetBSD/macppc

Last Update: "2007/05/11 20:49:35 makoto"

sample compile

cross compile of samba, samba-3.0.5. This verison requires minor modification to cross-compile.
lib/time.c: In function `GetTimeOfDay':
lib/time.c:66: error: too few arguments to function `gettimeofday'
make: *** [lib/time.o] Error 1
HAVE_GETTIMEOFDAY_TZ macro is not collected properly by configure, make interim fix on lib/time.c
#ifdef HAVE_GETTIMEOFDAY_TZ
 gettimegettimeofday(tval,NULL);
#else
 gettimegettimeofday(tval,NULL);
#endif
compile on Host
We have configure.in modified with above patch, we need autoconf to generate configure
autoconf
env CC=powerpc--linux-gcc \ ./configure --target=powerpc--linux --host=i686-pc-linux --enable-cross env CC=powerpc--linux-gcc make sudo make install cd /usr/local find . -cmin -10 -type f > ! /tmp/list tar zcvfT /export/samba-3.0.5-glib-2.2.3.tar.gz /tmp/list
open on target
cd /usr/local tar zvxf /root/samba-3.0.5-glib-2.2.3.tar.gz
Also, another patch is required to run correctly.
   #8 /usr/local/samba/sbin/smbd(smb_panic+0x14) [0x1018bed8]
   #9 /usr/local/samba/sbin/smbd(non_root_mode+0x1e0) [0x10191124]
   #10 /usr/local/samba/sbin/smbd(set_effective_gid+0x18) [0x101911f0]
Last Update: Sat, 07 Jun 2014 13:16:17 GMT 1.66 2008/03/08