-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathld64.README
39 lines (32 loc) · 1.29 KB
/
ld64.README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Apple ld64 85.2.1 Linux cross-toolchain patch
Mark Mentovai
2009 March 6
THE DEAL
--------
This patch allows Apple ld64 (the linker) to be built on Linux, forming a
portion of a cross toolchain able to produce Mac OS X binaries.
ACKNOWLEDGEMENTS
----------------
This is similar to odcctools, http://odcctools.darwinports.com/. odcctools
has not been updated in over two years and does not apply to the latest
toolchain, such as the 10.5/Xcode 3 toolchain. Some portions of odcctools
were consulted in developing these patches.
REQUIREMENTS
------------
This requires a suitable usr_include be located next to the ld64 directory,
for access to additional Mac headers. See usr_include_maker.README.
BUILD
-----
cd ld64
CC="gcc -m32 -std=gnu99" CXX="g++ -m32" CFLAGS="-O2" CXXFLAGS="${CFLAGS}" make -f Makefile.linux
Note: -m32 is required on x86_64 systems because ld64 is not 64-bit
tolerant. Additional libraries or library symbolic links may be needed.
Note: Although ld64 is not tolerant of running in 64-bit mode, it is
perfectly capable of dealing with 64-bit Mach-O objects.
INSTALL
-------
mkdir -p /Developer/usr/bin
cp src/ld64 src/rebase /Developer/usr/bin
ln -sf ld64 /Developer/usr/bin/ld
ln -sf ld /Developer/usr/bin/i686-apple-darwin9-ld
ln -sf ld /Developer/usr/bin/powerpc-apple-darwin9-ld