]> git.pld-linux.org Git - packages/crossavr-gcc.git/blame - crossavr-gcc.spec
- patches to support atmega256x
[packages/crossavr-gcc.git] / crossavr-gcc.spec
CommitLineData
281bac7a 1Summary: Cross AVR GNU binary utility development utilities - gcc
c7d51c5d
ER
2Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - AVR gcc
3Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - AVR gcc
4Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla AVR - gcc
5Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - AVR gcc
6Summary(tr.UTF-8): GNU geliştirme araçları - AVR gcc
40ea5eb2 7Name: crossavr-gcc
a9577062 8Version: 4.1.2
f323cece 9Release: 2
391a0dd0
ER
10Patch0: %{name}-0b-constants.patch
11Patch1: %{name}-attribute_alias.patch
12Patch2: %{name}-bug25672.patch
13Patch3: %{name}-dwarf.patch
14Patch4: %{name}-libiberty-Makefile.in.patch
15Patch5: %{name}-newdevices.patch
16Patch6: %{name}-zz-atmega256x.patch
40ea5eb2
WK
17Epoch: 1
18License: GPL
19Group: Development/Languages
6b88a121 20Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
a9577062 21# Source0-md5: a4a3eb15c96030906d8494959eeda23c
40ea5eb2 22BuildRequires: /bin/bash
f323cece 23BuildRequires: autoconf
fdd61bcf
JB
24BuildRequires: bison
25BuildRequires: crossavr-binutils
26BuildRequires: flex
40ea5eb2 27Requires: crossavr-binutils
c2bc48fa 28Requires: gcc-dirs
40ea5eb2
WK
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
40ea5eb2 31%define target avr
40ea5eb2 32%define arch %{_prefix}/%{target}
df3c6f23
JB
33%define gccarch %{_libdir}/gcc/%{target}
34%define gcclib %{_libdir}/gcc/%{target}/%{version}
ef8212dd 35%define _noautostrip .*%{gcclib}.*/libgc.*\\.a
40ea5eb2
WK
36
37%description
38This package contains a cross-gcc which allows the creation of
7f5526fe 39binaries to be run on Atmel AVR on other machines.
40ea5eb2 40
76648510 41%description -l de.UTF-8
42Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
43anderem Rechner Code für Atmel AVR zu generieren.
40ea5eb2 44
76648510 45%description -l pl.UTF-8
46Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
47maszynach binariów do uruchamiania na Atmel AVR.
40ea5eb2 48
1c790698 49%package c++
fdd61bcf 50Summary: C++ support for avr-gcc
c7d51c5d 51Summary(pl.UTF-8): Obsługa C++ dla avr-gcc
fdd61bcf 52Group: Development/Languages
aaeaf91a 53Requires: %{name} = %{epoch}:%{version}-%{release}
1c790698 54
55%description c++
56This package adds C++ support to the GNU Compiler Collection for AVR.
57
76648510 58%description c++ -l pl.UTF-8
59Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
1c790698 60
40ea5eb2
WK
61%prep
62%setup -q -n gcc-%{version}
391a0dd0
ER
63%patch0 -p0
64%patch1 -p0
65%patch2 -p0
66%patch3 -p0
67%patch4 -p0
68%patch5 -p0
69%patch6 -p0
40ea5eb2
WK
70
71%build
72rm -rf obj-%{target}
73install -d obj-%{target}
74cd obj-%{target}
75
76CFLAGS="%{rpmcflags}" \
77CXXFLAGS="%{rpmcflags}" \
fdd61bcf
JB
78TEXCONFIG=false \
79../configure \
40ea5eb2
WK
80 --prefix=%{_prefix} \
81 --infodir=%{_infodir} \
82 --mandir=%{_mandir} \
df3c6f23
JB
83 --bindir=%{_bindir} \
84 --libdir=%{_libdir} \
85 --libexecdir=%{_libdir} \
40ea5eb2 86 --disable-shared \
69b7b918 87 --disable-libssp \
1c790698 88 --enable-languages="c,c++" \
391a0dd0 89 --with-dwarf2 \
40ea5eb2
WK
90 --with-gnu-as \
91 --with-gnu-ld \
92 --with-system-zlib \
93 --with-multilib \
94 --without-x \
ef8212dd
JB
95 --build=%{_target_platform} \
96 --host=%{_target_platform} \
40ea5eb2
WK
97 --target=%{target}
98
69b7b918 99%{__make} CFLAGS_FOR_TARGET="-Os"
40ea5eb2
WK
100
101%install
102rm -rf $RPM_BUILD_ROOT
40ea5eb2 103
ef8212dd 104%{__make} -C obj-%{target} install \
40ea5eb2
WK
105 DESTDIR=$RPM_BUILD_ROOT
106
ef8212dd
JB
107# don't want it here
108rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
f323cece
ER
109rm -rf $RPM_BUILD_ROOT%{_infodir}
110rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
111rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
112rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
113rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
114rm -f $RPM_BUILD_ROOT%{gcclib}/include/fixed
115rm -f $RPM_BUILD_ROOT%{gcclib}/include/README
116rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
40ea5eb2 117
ef8212dd 118%if 0%{!?debug:1}
df3c6f23
JB
119# strip target libraries
120%{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
121%endif
1c790698 122
40ea5eb2
WK
123%clean
124rm -rf $RPM_BUILD_ROOT
125
f323cece 126%files
40ea5eb2 127%defattr(644,root,root,755)
1c790698 128%attr(755,root,root) %{_bindir}/%{target}-gcc*
129%attr(755,root,root) %{_bindir}/%{target}-cpp
130%attr(755,root,root) %{_bindir}/%{target}-gcov
f323cece 131%dir %{arch}
40ea5eb2
WK
132%dir %{gccarch}
133%dir %{gcclib}
134%attr(755,root,root) %{gcclib}/cc1
40ea5eb2 135%attr(755,root,root) %{gcclib}/collect2
df3c6f23 136%{gcclib}/libg*.a
f1442436 137%{gcclib}/%{target}*
40ea5eb2
WK
138%dir %{gcclib}/include
139%{gcclib}/include/*.h
df3c6f23 140%{_mandir}/man1/%{target}-cpp.1*
40ea5eb2 141%{_mandir}/man1/%{target}-gcc.1*
df3c6f23 142%{_mandir}/man1/%{target}-gcov.1*
1c790698 143
144%files c++
145%defattr(644,root,root,755)
146%attr(755,root,root) %{_bindir}/%{target}-g++
147%attr(755,root,root) %{_bindir}/%{target}-c++
148%attr(755,root,root) %{gcclib}/cc1plus
149%{_mandir}/man1/%{target}-g++.1*
This page took 0.062153 seconds and 4 git commands to generate.