Subject: Patch for building NetBSD 3.0 m68k cross tools on OS X 10.4.3 (Darwin 8.3.0)
To: None <port-m68k@NetBSD.org>
From: Tim McIntosh <tmcintos@avalon.net>
List: port-m68k
Date: 02/04/2006 15:23:43
--Apple-Mail-45--280250148
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
In case this is useful to anyone, here is a patch containing the
modifications that I had to make in order to get the cross
development tools to build under Mac OS X with GCC 4.0.
build.sh results:
===> Tools built to /Exports/Users/tmcintos/Development/NetBSD/src/
tooldir.Darwin-8.3.0-powerpc
===> build.sh started: Sat Feb 4 14:59:47 CST 2006
===> build.sh ended: Sat Feb 4 15:01:59 CST 2006
===> Summary of results:
build.sh command: ./build.sh -j 4 -U -u -m next68k tools
build.sh started: Sat Feb 4 14:59:47 CST 2006
No nonexistent/bin/nbmake, needs building.
Bootstrapping nbmake
MACHINE: next68k
MACHINE_ARCH: m68k
TOOLDIR path: /Exports/Users/tmcintos/Development/
NetBSD/src/tooldir.Darwin-8.3.0-powerpc
DESTDIR path: /Exports/Users/tmcintos/Development/
NetBSD/src/destdir.next68k
RELEASEDIR path: /Exports/Users/tmcintos/Development/
NetBSD/src/releasedir
Created /Exports/Users/tmcintos/Development/NetBSD/src/
tooldir.Darwin-8.3.0-powerpc/bin/nbmake
makewrapper: /Exports/Users/tmcintos/Development/
NetBSD/src/tooldir.Darwin-8.3.0-powerpc/bin/nbmake-next68k
Updated /Exports/Users/tmcintos/Development/NetBSD/src/
tooldir.Darwin-8.3.0-powerpc/bin/nbmake-next68k
Tools built to /Exports/Users/tmcintos/Development/NetBSD/
src/tooldir.Darwin-8.3.0-powerpc
build.sh started: Sat Feb 4 14:59:47 CST 2006
build.sh ended: Sat Feb 4 15:01:59 CST 2006
===> .
uname -a:
Darwin localhost 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3
20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power
Macintosh powerpc
gcc --version:
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc.
build 5026)
--Apple-Mail-45--280250148
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="osx-cross.patch"
Content-Disposition: attachment;
filename=osx-cross.patch
? tooldir.Darwin-8.3.0-powerpc
? gnu/dist/cvs/Entries
? gnu/dist/cvs/Repository
? gnu/dist/cvs/Root
? gnu/dist/cvs/Tag
? gnu/usr.bin/cvs/Entries
? gnu/usr.bin/cvs/Repository
? gnu/usr.bin/cvs/Root
? gnu/usr.bin/cvs/Tag
? gnu/usr.bin/cvs/cvs/Entries
? gnu/usr.bin/cvs/cvs/Repository
? gnu/usr.bin/cvs/cvs/Root
? gnu/usr.bin/cvs/cvs/Tag
? tools/obj
? tools/asn1_compile/obj
? tools/binstall/obj
? tools/binutils/obj
? tools/cap_mkdb/obj
? tools/cat/obj
? tools/cksum/obj
? tools/compat/obj
? tools/compile_et/obj
? tools/config/obj
? tools/crunchgen/obj
? tools/ctags/obj
? tools/db/obj
? tools/dbsym/obj
? tools/file/obj
? tools/gcc/obj
? tools/gencat/obj
? tools/groff/obj
? tools/hexdump/obj
? tools/host-mkdep/obj
? tools/installboot/obj
? tools/lex/obj
? tools/lint/obj
? tools/lint1/obj
? tools/lint2/obj
? tools/lorder/obj
? tools/m4/obj
? tools/makefs/obj
? tools/makewhatis/obj
? tools/mdsetimage/obj
? tools/menuc/obj
? tools/mkcsmapper/obj
? tools/mkdep/obj
? tools/mkesdb/obj
? tools/mklocale/obj
? tools/mknod/obj
? tools/mktemp/obj
? tools/msgc/obj
? tools/mtree/obj
? tools/pax/obj
? tools/pwd_mkdb/obj
? tools/rpcgen/obj
? tools/stat/obj
? tools/sunlabel/obj
? tools/texinfo/obj
? tools/tsort/obj
? tools/uudecode/obj
? tools/yacc/obj
? tools/zic/obj
Index: gnu/dist/binutils/gas/as.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/as.h,v
retrieving revision 1.1.1.2
diff -r1.1.1.2 as.h
624a625,640
> struct relax_type
> {
> /* Forward reach. Signed number. > 0. */
> long rlx_forward;
> /* Backward reach. Signed number. < 0. */
> long rlx_backward;
>
> /* Bytes length of this address. */
> unsigned char rlx_length;
>
> /* Next longer relax-state. 0 means there is no 'next' relax-state. */
> relax_substateT rlx_more;
> };
>
> typedef struct relax_type relax_typeS;
>
Index: gnu/dist/binutils/gas/tc.h
===================================================================
RCS file: /cvsroot/src/gnu/dist/binutils/gas/tc.h,v
retrieving revision 1.1.1.2
diff -r1.1.1.2 tc.h
27,45d26
< /* JF moved this here from as.h under the theory that nobody except MACHINE.c
< and write.c care about it anyway. */
<
< struct relax_type
< {
< /* Forward reach. Signed number. > 0. */
< long rlx_forward;
< /* Backward reach. Signed number. < 0. */
< long rlx_backward;
<
< /* Bytes length of this address. */
< unsigned char rlx_length;
<
< /* Next longer relax-state. 0 means there is no 'next' relax-state. */
< relax_substateT rlx_more;
< };
<
< typedef struct relax_type relax_typeS;
<
Index: usr.bin/mkesdb/yacc.y
===================================================================
RCS file: /cvsroot/src/usr.bin/mkesdb/yacc.y,v
retrieving revision 1.3
diff -r1.3 yacc.y
60c60,61
< static int debug = 0, num_csids = 0;
---
> int debug = 0;
> static int num_csids = 0;
Index: usr.sbin/makefs/ffs/ffs_alloc.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/makefs/ffs/ffs_alloc.c,v
retrieving revision 1.14
diff -r1.14 ffs_alloc.c
123c123
< DIP(ip, blocks) += size / DEV_BSIZE;
---
> DIP_ASSIGN(ip, blocks, (DIP(ip, blocks) + size / DEV_BSIZE));
Index: usr.sbin/makefs/ffs/ufs_inode.h
===================================================================
RCS file: /cvsroot/src/usr.sbin/makefs/ffs/ufs_inode.h,v
retrieving revision 1.3
diff -r1.3 ufs_inode.h
96a97,104
>
> #define DIP_ASSIGN(ip, field, value) \
> do { \
> if ((ip)->i_fs->fs_magic == FS_UFS1_MAGIC) \
> (ip)->i_ffs1_##field = (value); \
> else \
> (ip)->i_ffs2_##field = (value); \
> } while (0);
--Apple-Mail-45--280250148--