]>
Commit | Line | Data |
---|---|---|
e6b7e41e | 1 | |
fafaa33a | 2 | %define toolkit_date 20060615 |
3 | %define elf2flt_date 20060608 | |
e6b7e41e | 4 | |
b043c752 | 5 | Summary: Cross GNU binary utility development utilities - binutils |
0c5867ef | 6 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - m68k binutils |
7 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - m68k binutils | |
8 | Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla m68k - binutils | |
9 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - m68k binutils | |
10 | Summary(tr.UTF-8): GNU geliţtirme araçlarý - m68k binutils | |
6ebc03b2 | 11 | Name: crossm68k-binutils |
fafaa33a | 12 | Version: 2.17.50.0.14 |
6ebc03b2 | 13 | Release: 1 |
14 | License: GPL | |
15 | Group: Development/Tools | |
fafaa33a | 16 | Source0: http://www.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2 |
17 | # Source0-md5: 4ddab973ad9c5169d8f8296bdf67b3f7 | |
18 | Source1: http://www.uclinux.org/pub/uClinux/m68k-elf-tools/tools-%{toolkit_date}/elf2flt-%{elf2flt_date}.tar.gz | |
19 | # Source1-md5: ebfb126a684b43a6cdeb17db2bae09da | |
6ebc03b2 | 20 | URL: http://sources.redhat.com/binutils/ |
21 | BuildRequires: automake | |
22 | BuildRequires: bash | |
23 | BuildRequires: bison | |
24 | BuildRequires: flex | |
e6b7e41e | 25 | BuildRequires: sed |
6ebc03b2 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
8798565e | 28 | %define target m68k-elf |
6ebc03b2 | 29 | %define arch %{_prefix}/%{target} |
30 | ||
31 | %description | |
32 | Binutils is a collection of binary utilities, including: | |
33 | - ar - create, modify and extract from archives, | |
34 | - nm - lists symbols from object files, | |
35 | - objcopy - copy and translate object files, | |
36 | - objdump - display information from object files, | |
37 | - ranlib - generate an index for the contents of an archive, | |
38 | - size - list the section sizes of an object or archive file, | |
39 | - strings - list printable strings from files, | |
40 | - strip - discard symbols, | |
41 | - c++filt - a filter for demangling encoded C++ symbols, | |
42 | - addr2line - convert addresses to file and line, | |
43 | - nlmconv - convert object code into an NLM. | |
44 | ||
45 | This package contains the cross version for m68k. | |
46 | ||
0c5867ef | 47 | %description -l pl.UTF-8 |
48 | Pakiet binutils zawiera zestaw narzędzi umożliwiających kompilację | |
49 | programów. Znajdują się tutaj między innymi assembler, konsolidator | |
50 | (linker), a także inne narzędzia do manipulowania binarnymi plikami | |
51 | programów i bibliotek. | |
6ebc03b2 | 52 | |
0c5867ef | 53 | Ten pakiet zawiera wersję skrośną generującą kod dla m68k. |
6ebc03b2 | 54 | |
55 | %prep | |
e6b7e41e | 56 | %setup -q -n binutils-%{version} -a1 |
b043c752 JB |
57 | sed -i 's/-static//g' elf2flt-%{elf2flt_date}/Makefile.in |
58 | sed -i 's@LDSCRIPTPATH="${TOOLDIR}/../lib"@LDSCRIPTPATH="${TOOLDIR}/../lib/ldscripts"@g' \ | |
59 | elf2flt-%{elf2flt_date}/ld-elf2flt.in | |
6ebc03b2 | 60 | |
61 | %build | |
62 | cp /usr/share/automake/config.sub . | |
63 | ||
64 | # ldscripts won't be generated properly if SHELL is not bash... | |
65 | CFLAGS="%{rpmcflags} -fno-strict-aliasing" \ | |
66 | LDFLAGS="%{rpmldflags}" \ | |
67 | CONFIG_SHELL="/bin/bash" \ | |
6ebc03b2 | 68 | ./configure \ |
69 | --disable-shared \ | |
70 | --disable-nls \ | |
71 | --prefix=%{_prefix} \ | |
72 | --libdir=%{_libdir} \ | |
73 | --mandir=%{_mandir} \ | |
74 | --infodir=%{_infodir} \ | |
75 | --target=%{target} | |
76 | ||
77 | %{__make} all \ | |
78 | tooldir=%{_prefix} \ | |
79 | EXEEXT="" | |
80 | ||
e6b7e41e | 81 | # Build elf2lft |
82 | cd elf2flt-%{elf2flt_date} | |
83 | ||
84 | CFLAGS="%{rpmcflags} -fno-strict-aliasing" \ | |
85 | LDFLAGS="%{rpmldflags}" \ | |
86 | ./configure \ | |
2ab370cf JB |
87 | --with-libbfd=../bfd/libbfd.a \ |
88 | --with-libiberty=../libiberty/libiberty.a \ | |
89 | --with-bfd-include-dir=../bfd \ | |
90 | --with-binutils-include-dir=../include \ | |
91 | --target=%{target} \ | |
92 | --prefix=%{_prefix} | |
e6b7e41e | 93 | |
94 | %{__make} | |
95 | ||
6ebc03b2 | 96 | %install |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | install -d $RPM_BUILD_ROOT%{_prefix} | |
99 | ||
100 | %{__make} install \ | |
101 | prefix=$RPM_BUILD_ROOT%{_prefix} \ | |
102 | mandir=$RPM_BUILD_ROOT%{_mandir} \ | |
103 | infodir=$RPM_BUILD_ROOT%{_infodir} \ | |
104 | libdir=$RPM_BUILD_ROOT%{_libdir} | |
105 | ||
106 | # remove these man pages unless we cross-build for win*/netware platforms. | |
107 | # however, this should be done in Makefiles. | |
108 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{*dlltool,*nlmconv,*windres}.1 | |
109 | ||
e6b7e41e | 110 | # Install elf2flt |
111 | mv $RPM_BUILD_ROOT%{arch}/bin/ld \ | |
112 | $RPM_BUILD_ROOT%{arch}/bin/ld.real | |
113 | ||
114 | mv $RPM_BUILD_ROOT%{_bindir}/%{target}-ld \ | |
115 | $RPM_BUILD_ROOT%{_bindir}/%{target}-ld.real | |
116 | ||
117 | for prog in flthdr elf2flt; do | |
2ab370cf JB |
118 | install elf2flt-%{elf2flt_date}/$prog \ |
119 | $RPM_BUILD_ROOT%{arch}/bin/$prog | |
120 | ln $RPM_BUILD_ROOT%{arch}/bin/$prog \ | |
121 | $RPM_BUILD_ROOT%{_bindir}/%{target}-$prog | |
e6b7e41e | 122 | done |
123 | ||
124 | install elf2flt-%{elf2flt_date}/ld-elf2flt \ | |
125 | $RPM_BUILD_ROOT%{arch}/bin/ld | |
126 | ||
2ab370cf | 127 | ln $RPM_BUILD_ROOT%{arch}/bin/ld \ |
e6b7e41e | 128 | $RPM_BUILD_ROOT%{_bindir}/%{target}-ld |
b36571fa | 129 | |
e6b7e41e | 130 | install elf2flt-%{elf2flt_date}/elf2flt.ld \ |
131 | $RPM_BUILD_ROOT%{arch}/lib/ldscripts/elf2flt.ld | |
132 | ||
6ebc03b2 | 133 | %clean |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %files | |
137 | %defattr(644,root,root,755) | |
138 | %doc README | |
139 | %attr(755,root,root) %{_bindir}/%{target}-* | |
140 | %dir %{arch} | |
141 | %dir %{arch}/bin | |
142 | %attr(755,root,root) %{arch}/bin/* | |
143 | %dir %{arch}/lib | |
144 | %dir %{arch}/lib/* | |
145 | %{arch}/lib/ldscripts/* | |
146 | %{_mandir}/man?/%{target}-* |