How to build apple's opensource libc?

 ̄綄美尐妖づ 提交于 2019-12-04 11:38:01

问题


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!


回答1:


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/


来源:https://stackoverflow.com/questions/7592069/how-to-build-apples-opensource-libc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!