]>
Commit | Line | Data |
---|---|---|
de4c05dc ER |
1 | # DOCS |
2 | # - http://aakash-bapna.blogspot.com/2007/10/iphone-non-official-sdk-aka-toolchain.html | |
3 | # - http://code.google.com/p/iphone-dev/wiki/Building | |
4 | # - ... | |
5 | # - csu (crt1.o, dylib1.o, and bundle1.o) + bootstrap | |
6 | # - ... | |
7 | # TO MAKE TARBALL(s): | |
8 | # svn co http://iphone-dev.googlecode.com/svn/trunk/odcctools odcctools | |
9 | # tar --exclude=.svn -cjf odcctools-r280.tar.bz2 odcctools | |
10 | # TODO | |
11 | # - name of this cross platform? crossarm-darwin? crossarm-darwin9? | |
12 | # - not built from binutils source, should we name package differently? | |
7c5e6b85 | 13 | # - On 64-bit architectures there are currently compilation and linking problems with structs and typedefs; as a workaround, try the following: |
de4c05dc ER |
14 | # - export CFLAGS="-m32"; export LDFLAGS="-m32" |
15 | Summary: Cross ARM Apple Darwin development utilities - binutils | |
16 | Name: crossarmdarwin-binutils | |
17 | Version: 0.152 | |
59138232 | 18 | Release: 0.2 |
de4c05dc ER |
19 | License: GPL v2 |
20 | Group: Development/Tools | |
21 | Source0: odcctools-r280.tar.bz2 | |
22 | # Source0-md5: 8a49b63a883219705de5b4a95265ffca | |
23 | URL: http://developer.berlios.de/projects/iphone-binutils/ | |
24 | BuildRequires: bison | |
25 | BuildRequires: flex | |
89156ec2 | 26 | %ifarch %{x8664} |
7c5e6b85 | 27 | BuildRequires: gcc-multilib |
89156ec2 | 28 | %endif |
de4c05dc ER |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %define target arm-apple-darwin | |
32 | %define arch %{_prefix}/%{target} | |
33 | ||
34 | %description | |
35 | Binutils is a collection of binary utilities, including: | |
36 | - ar - create, modify and extract from archives, | |
37 | - nm - lists symbols from object files, | |
38 | - objcopy - copy and translate object files, | |
39 | - objdump - display information from object files, | |
40 | - ranlib - generate an index for the contents of an archive, | |
41 | - size - list the section sizes of an object or archive file, | |
42 | - strings - list printable strings from files, | |
43 | - strip - discard symbols, | |
44 | - c++filt - a filter for demangling encoded C++ symbols, | |
45 | - addr2line - convert addresses to file and line, | |
46 | - nlmconv - convert object code into an NLM. | |
47 | ||
48 | This is a toolchain to produce arm/Mach-O binaries. | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | Pakiet binutils zawiera zestaw narzędzi umożliwiających kompilację | |
52 | programów. Znajdują się tutaj między innymi assembler, konsolidator | |
53 | (linker), a także inne narzędzia do manipulowania binarnymi plikami | |
54 | programów i bibliotek. | |
55 | ||
56 | %prep | |
57 | %setup -qcT -a0 | |
58 | ||
59 | %build | |
60 | install -d build/odcctools | |
61 | cd build/odcctools | |
62 | ../../odcctools/%configure \ | |
89156ec2 ER |
63 | %ifarch %{x8664} |
64 | CFLAGS="%{rpmcflags} -m32" \ | |
65 | LDFLAGS="%{rpmldflags} -m32" \ | |
66 | %endif | |
de4c05dc ER |
67 | --prefix=%{arch} \ |
68 | --libexecdir=%{arch} \ | |
69 | --target=%{target} \ | |
70 | --disable-ld64 | |
71 | %{__make} | |
72 | cd - | |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | install -d $RPM_BUILD_ROOT%{_prefix} | |
77 | ||
78 | %{__make} -C build/odcctools install \ | |
79 | DESTDIR=$RPM_BUILD_ROOT | |
80 | ||
81 | # prefix manpages | |
82 | for a in $RPM_BUILD_ROOT%{_mandir}/man?/*; do | |
83 | n=${a##*/} s=${a##*.} d=${a%/*} | |
59138232 | 84 | mv $a $d/%{target}-$n |
de4c05dc ER |
85 | done |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %files | |
91 | %defattr(644,root,root,755) | |
92 | %attr(755,root,root) %{_bindir}/%{target}-* | |
93 | %dir %{arch} | |
94 | %dir %{arch}/as | |
95 | %dir %{arch}/as/* | |
96 | %attr(755,root,root) %{arch}/as/*/as | |
97 | ||
98 | %{_mandir}/man?/%{target}-* | |
99 | %dir %{_includedir}/mach-o | |
100 | %{_includedir}/mach-o/arch.h | |
101 | %{_includedir}/mach-o/fat.h | |
102 | %{_includedir}/mach-o/loader.h | |
103 | %{_includedir}/mach-o/machine.h | |
104 | %{_libdir}/libmacho.a |