Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build apple's opensource libc?

Tags:

macos

dylib

libc

I'm trying to build apple's opensource libc (from http://www.opensource.apple.com/source/Libc/Libc-763.11/) on my OS X 10.6.8 laptop. This is in an attempt to essentially get a locally generated replica of /usr/lib/libSystem.B.dylib, which I intend to experiment on further.

I see a couple basic roadblocks though (unless, obviously, I'm missing something basic):

  • No instructions on how to do the build. There are a couple of Makefiles in the URL I reference above, but they fail to build when I try to do straightforward makes:

$make -f Makefile

Makefile:14: *** missing separator. Stop.

  • I suspect the source available for download is incomplete. Not incomplete in the sense that Apple isn't revealing all of the changes, but incomplete in the sense that there are source files that were (presumably) not modified by Apple, so isn't included in the collection. For example, I don't see the implementation of the "open" call (which, in the gnu libc hierarchy, is available at io/open.c)

The closest reference I could find after some googling was this: http://www.projectosx.com/forum/index.php?showtopic=1922&st=0&p=12457&#entry12457 but it still isn't close enough for my taste!

Any pointers?

Thanks!

like image 897
Vivek Avatar asked Sep 29 '11 03:09

Vivek


1 Answers

Only some general pointers (although some links are discussing older OSX versions):

  • http://darwinbuild.macosforge.org/trac/ticket/6
  • http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-projects/darwin/overlay/sys-libs/libc-darwin/libc-darwin-391.ebuild?view=markup&sortby=log
  • http://althenia.net/wiki/darwin#standard_library_libc
  • http://dev.gentoo.org/~vapier/CROSS-COMPILE-GUTS
  • http://www.raccoonfink.com/fink/darwin-cross/
like image 131
Yahia Avatar answered Nov 08 '22 22:11

Yahia