[uClibc] Building utils on Mac OS X/Darwin

David DeHaven daved at bacomatic.org
Thu Mar 3 08:18:57 UTC 2005


Patchfile follows.

In a nutshell:
- #ifndef'ed features.h, <bits/*> and dlfcn.h out. They don't seem to 
be necessary under Darwin/Mac OS X anyways.
- utils/Makefile conditionally creates a symlink to ../include/link.h, 
same file is used by both host and target builds anyways, so it should 
be safe
- clean target updated to remove link.h symlink appropriately
- link.h modified to explicitely define __ELF_NATIVE_CLASS, in the 
absence of <bits/*> headers
- fixed "#define __BYTE_ORDER = BYTE_ORDER"... was this intended???
- bswap_xx are #defined to native byte swap routines defined in 
<architecture/byte_order.h>
- added __ppc__ to architecture type check since __powerpc__ isn't 
defined by this build system

Builds and seems to work now:
daved$ ./readelf.host ~/foo
Type:           EXEC (Executable file)
Machine:        PowerPC
Class:          ELF32
Data:           2's complement, big endian
Version:        1 (current)
OS/ABI:         UNIX - System V
ABI Version:    0

(run on host system: PowerBook G4 running Panther, "foo" is built using 
cross compiler for ppc405)

-DrD-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: uClibc.patch
Type: application/octet-stream
Size: 3145 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20050303/bd91b780/attachment.obj 
-------------- next part --------------



More information about the uClibc mailing list