[2d9201a] | 1 | # |
---|
| 2 | # Please send bugfixes or comments to |
---|
| 3 | # http://www.rtems.org/bugzilla |
---|
| 4 | # |
---|
| 5 | |
---|
| 6 | %define _prefix /opt/rtems-4.9 |
---|
| 7 | %define _infodir %{_prefix}/info |
---|
| 8 | %define _mandir %{_prefix}/man |
---|
| 9 | |
---|
| 10 | %ifos cygwin cygwin32 mingw mingw32 |
---|
| 11 | %define _exeext .exe |
---|
| 12 | %else |
---|
| 13 | %define _exeext %{nil} |
---|
| 14 | %endif |
---|
| 15 | |
---|
[5633d25f] | 16 | %ifos cygwin cygwin32 |
---|
| 17 | %define optflags -O3 -pipe -march=i486 -funroll-loops |
---|
| 18 | %define _libdir %{_exec_prefix}/lib |
---|
| 19 | %define debug_package %{nil} |
---|
| 20 | %endif |
---|
| 21 | |
---|
| 22 | %if "%{_build}" != "%{_host}" |
---|
| 23 | %define _host_rpmprefix rtems-4.9-%{_host}- |
---|
| 24 | %else |
---|
| 25 | %define _host_rpmprefix %{nil} |
---|
| 26 | %endif |
---|
| 27 | |
---|
[2d9201a] | 28 | |
---|
[211c22eb] | 29 | %define gcc_pkgvers 4.3.0 |
---|
[069046a7] | 30 | %define gcc_version 4.3.0 |
---|
| 31 | %define gcc_rpmvers %{expand:%(echo "4.3.0" | tr - _ )} |
---|
[2d9201a] | 32 | |
---|
[ab56160] | 33 | %define newlib_version 1.16.0 |
---|
[2d9201a] | 34 | %define gccnewlib_version gcc%{gcc_version}newlib%{newlib_version} |
---|
| 35 | |
---|
[069046a7] | 36 | %define mpfr_version 2.3.1 |
---|
| 37 | |
---|
[2d9201a] | 38 | Name: rtems-4.9-mips-rtems4.9-gcc |
---|
| 39 | Summary: mips-rtems4.9 gcc |
---|
| 40 | |
---|
| 41 | Group: Development/Tools |
---|
| 42 | Version: %{gcc_rpmvers} |
---|
[5633d25f] | 43 | Release: 12%{?dist} |
---|
[2d9201a] | 44 | License: GPL |
---|
| 45 | URL: http://gcc.gnu.org |
---|
| 46 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
| 47 | |
---|
| 48 | %define _use_internal_dependency_generator 0 |
---|
| 49 | |
---|
[5633d25f] | 50 | BuildRequires: %{_host_rpmprefix}gcc |
---|
| 51 | |
---|
[069046a7] | 52 | %if "%{gcc_version}" >= "4.3.0" |
---|
| 53 | BuildRequires: gmp-devel >= 4.1 |
---|
[5633d25f] | 54 | %if "%{_build}" != "%{_host}" |
---|
| 55 | BuildRequires: %{_host_rpmprefix}gmp-devel |
---|
| 56 | BuildRequires: %{_host_rpmprefix}mpfr-devel |
---|
| 57 | %endif |
---|
[069046a7] | 58 | %if "%{?fedora}" >= "8" |
---|
| 59 | BuildRequires: mpfr-devel >= 2.3.0 |
---|
| 60 | %endif |
---|
[e122f592] | 61 | %if "%{?suse}" > "10.3" |
---|
[069046a7] | 62 | BuildRequires: mpfr-devel >= 2.3.0 |
---|
| 63 | %endif |
---|
| 64 | # These distros ship an insufficient mpfr |
---|
| 65 | %{?el4:%define _build_mpfr 1} |
---|
[e122f592] | 66 | %{?suse10_2:%define _build_mpfr 1} |
---|
| 67 | %{?suse10_3:%define _build_mpfr 1} |
---|
[069046a7] | 68 | %endif |
---|
| 69 | |
---|
[5633d25f] | 70 | %if "%{_build}" != "%{_host}" |
---|
| 71 | BuildRequires: rtems-4.9-mips-rtems4.9-gcc |
---|
| 72 | %endif |
---|
| 73 | |
---|
[2d9201a] | 74 | %if "%{gcc_version}" >= "4.2.0" |
---|
| 75 | BuildRequires: flex bison |
---|
| 76 | %endif |
---|
| 77 | |
---|
[211c22eb] | 78 | |
---|
[2d9201a] | 79 | BuildRequires: texinfo >= 4.2 |
---|
| 80 | BuildRequires: rtems-4.9-mips-rtems4.9-binutils |
---|
| 81 | |
---|
| 82 | Requires: rtems-4.9-gcc-common |
---|
| 83 | Requires: rtems-4.9-mips-rtems4.9-binutils |
---|
| 84 | Requires: rtems-4.9-mips-rtems4.9-newlib = %{newlib_version}-%{release} |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | %if "%{gcc_version}" >= "3.4" |
---|
| 88 | %define gcclib %{_libdir}/gcc |
---|
| 89 | %define gccexec %{_libexecdir}/gcc |
---|
| 90 | %else |
---|
| 91 | %define gcclib %{_libdir}/gcc-lib |
---|
| 92 | %define gccexec %{_libdir}/gcc-lib |
---|
| 93 | %endif |
---|
| 94 | |
---|
[069046a7] | 95 | %if "%{gcc_version}" == "4.3.0" |
---|
[211c22eb] | 96 | Source0: ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 |
---|
[5633d25f] | 97 | Patch0: gcc-core-%{gcc_pkgvers}-rtems4.9-20080501.diff |
---|
[069046a7] | 98 | %endif |
---|
[b8c28e8] | 99 | %if "%{gcc_version}" == "4.2.3" |
---|
[069046a7] | 100 | Source0: ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2 |
---|
[76b0283] | 101 | Patch0: gcc-core-4.2.3-rtems4.9-20080205.diff |
---|
[6f1919e5] | 102 | %endif |
---|
[2d9201a] | 103 | %{?_without_sources:NoSource: 0} |
---|
| 104 | |
---|
[069046a7] | 105 | %if "%{gcc_version}" == "4.3.0" |
---|
[211c22eb] | 106 | Source1: ftp://ftp.gnu.org/pub/gnu/gcc/%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 |
---|
[069046a7] | 107 | %endif |
---|
| 108 | %if "%{gcc_version}" == "4.2.3" |
---|
| 109 | Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2 |
---|
| 110 | %endif |
---|
[2d9201a] | 111 | %{?_without_sources:NoSource: 1} |
---|
| 112 | |
---|
| 113 | Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_version}.tar.gz |
---|
[ab56160] | 114 | %if "%{newlib_version}" == "1.16.0" |
---|
[5633d25f] | 115 | Patch50: newlib-1.16.0-rtems4.9-20080430.diff |
---|
[2d9201a] | 116 | %endif |
---|
| 117 | %{?_without_sources:NoSource: 50} |
---|
| 118 | |
---|
[069046a7] | 119 | %if "%{gcc_version}" >= "4.3.0" |
---|
| 120 | Source60: http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2 |
---|
| 121 | %endif |
---|
| 122 | |
---|
[2d9201a] | 123 | %description |
---|
| 124 | Cross gcc for mips-rtems4.9. |
---|
| 125 | |
---|
| 126 | %prep |
---|
| 127 | %setup -c -T -n %{name}-%{version} |
---|
| 128 | |
---|
| 129 | %setup -q -T -D -n %{name}-%{version} -a0 |
---|
| 130 | %{?PATCH0:%patch0 -p0} |
---|
| 131 | |
---|
| 132 | %setup -q -T -D -n %{name}-%{version} -a1 |
---|
| 133 | %{?PATCH1:%patch1 -p0} |
---|
| 134 | |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | %setup -q -T -D -n %{name}-%{version} -a50 |
---|
| 140 | cd newlib-%{newlib_version} |
---|
| 141 | %{?PATCH50:%patch50 -p1} |
---|
| 142 | cd .. |
---|
| 143 | # Copy the C library into gcc's source tree |
---|
| 144 | ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers} |
---|
| 145 | |
---|
[069046a7] | 146 | %if 0%{?_build_mpfr} |
---|
| 147 | %setup -q -T -D -n %{name}-%{version} -a60 |
---|
| 148 | %{?PATCH60:%patch60 -p1} |
---|
| 149 | # Build mpfr one-tree style |
---|
| 150 | ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr |
---|
| 151 | %endif |
---|
| 152 | |
---|
[2d9201a] | 153 | %if "%{gcc_version}" < "4.1.0" |
---|
| 154 | sed -e 's/\(version_string.* = \"[^\"]*\)/\1 (RTEMS gcc-%{gcc_version}\/newlib-%{newlib_version}-%release)/' \ |
---|
| 155 | gcc-%{gcc_pkgvers}/gcc/version.c > gcc-%{gcc_pkgvers}/gcc/version.c~ |
---|
| 156 | %else |
---|
| 157 | sed -e 's/^#define VERSUFFIX.*$/#define VERSUFFIX \" (RTEMS gcc-%{gcc_version}\/newlib-%{newlib_version}-%{release})\"/' \ |
---|
| 158 | gcc-%{gcc_pkgvers}/gcc/version.c > gcc-%{gcc_pkgvers}/gcc/version.c~ |
---|
| 159 | %endif |
---|
| 160 | mv gcc-%{gcc_pkgvers}/gcc/version.c~ gcc-%{gcc_pkgvers}/gcc/version.c |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | # Fix timestamps |
---|
| 164 | cd gcc-%{gcc_pkgvers} |
---|
| 165 | contrib/gcc_update --touch |
---|
| 166 | cd .. |
---|
| 167 | %build |
---|
| 168 | mkdir -p build |
---|
| 169 | |
---|
| 170 | cd build |
---|
| 171 | |
---|
| 172 | languages="c" |
---|
| 173 | languages="$languages,c++" |
---|
| 174 | export PATH="%{_bindir}:${PATH}" |
---|
[5633d25f] | 175 | %if "%{_build}" != "%{_host}" |
---|
| 176 | CFLAGS_FOR_BUILD="-g -O2 -Wall" \ |
---|
| 177 | CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \ |
---|
| 178 | %else |
---|
[2d9201a] | 179 | CC="%{__cc} ${RPM_OPT_FLAGS}" \ |
---|
[5633d25f] | 180 | %endif |
---|
[2d9201a] | 181 | ../gcc-%{gcc_pkgvers}/configure \ |
---|
| 182 | --prefix=%{_prefix} \ |
---|
| 183 | --bindir=%{_bindir} \ |
---|
| 184 | --exec_prefix=%{_exec_prefix} \ |
---|
| 185 | --includedir=%{_includedir} \ |
---|
| 186 | --libdir=%{_libdir} \ |
---|
| 187 | --libexecdir=%{_libexecdir} \ |
---|
| 188 | --mandir=%{_mandir} \ |
---|
| 189 | --infodir=%{_infodir} \ |
---|
| 190 | --datadir=%{_datadir} \ |
---|
| 191 | --build=%_build --host=%_host \ |
---|
| 192 | --target=mips-rtems4.9 \ |
---|
| 193 | --disable-libstdcxx-pch \ |
---|
| 194 | --with-gnu-as --with-gnu-ld --verbose \ |
---|
| 195 | --with-newlib \ |
---|
| 196 | --with-system-zlib \ |
---|
| 197 | --disable-nls --without-included-gettext \ |
---|
| 198 | --disable-win32-registry \ |
---|
| 199 | --enable-version-specific-runtime-libs \ |
---|
| 200 | --enable-threads \ |
---|
| 201 | --enable-languages="$languages" $optargs |
---|
| 202 | |
---|
| 203 | %if "%_host" != "%_build" |
---|
| 204 | # Bug in gcc-3.2.1: |
---|
| 205 | # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs |
---|
| 206 | mkdir -p gcc/include |
---|
| 207 | cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h |
---|
| 208 | %endif |
---|
| 209 | |
---|
[ab56160] | 210 | make %{?_smp_mflags} all |
---|
[2d9201a] | 211 | make info |
---|
| 212 | cd .. |
---|
| 213 | |
---|
| 214 | %install |
---|
| 215 | export PATH="%{_bindir}:${PATH}" |
---|
| 216 | rm -rf $RPM_BUILD_ROOT |
---|
| 217 | |
---|
| 218 | cd build |
---|
| 219 | |
---|
| 220 | make DESTDIR=$RPM_BUILD_ROOT install |
---|
| 221 | cd .. |
---|
| 222 | |
---|
| 223 | cd build/mips-rtems4.9/newlib |
---|
| 224 | make DESTDIR=$RPM_BUILD_ROOT install-info |
---|
| 225 | cd ../../.. |
---|
| 226 | |
---|
| 227 | %if "%{gcc_version}" <= "4.1.2" |
---|
| 228 | # Misplaced header file |
---|
| 229 | if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then |
---|
| 230 | mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \ |
---|
| 231 | $RPM_BUILD_ROOT%{gcclib}/mips-rtems4.9/%{gcc_version}/include/ |
---|
| 232 | fi |
---|
| 233 | %endif |
---|
| 234 | |
---|
| 235 | # host library |
---|
| 236 | rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a |
---|
| 237 | |
---|
| 238 | # We use the version from binutils |
---|
| 239 | rm -f $RPM_BUILD_ROOT%{_bindir}/mips-rtems4.9-c++filt%{_exeext} |
---|
| 240 | |
---|
| 241 | |
---|
| 242 | # We don't ship info/dir |
---|
| 243 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
---|
| 244 | touch $RPM_BUILD_ROOT%{_infodir}/dir |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | %if "%{gcc_version}" >= "3.4" |
---|
| 248 | # Bug in gcc-3.4.0pre |
---|
| 249 | rm -f $RPM_BUILD_ROOT%{_bindir}/mips-rtems4.9-mips-rtems4.9-gcjh%{_exeext} |
---|
| 250 | %endif |
---|
| 251 | |
---|
| 252 | %if "%{gcc_version}" >= "3.3" |
---|
| 253 | # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs |
---|
| 254 | # the fixinclude-install-tools |
---|
| 255 | rm -rf ${RPM_BUILD_ROOT}%{gcclib}/mips-rtems4.9/%{gcc_version}/install-tools |
---|
| 256 | rm -rf ${RPM_BUILD_ROOT}%{gccexec}/mips-rtems4.9/%{gcc_version}/install-tools |
---|
| 257 | %endif |
---|
| 258 | |
---|
| 259 | # Collect multilib subdirectories |
---|
| 260 | f=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'` |
---|
| 261 | |
---|
| 262 | echo "%defattr(-,root,root,-)" > build/files.newlib |
---|
| 263 | TGTDIR="%{_exec_prefix}/mips-rtems4.9/lib" |
---|
| 264 | for i in $f; do |
---|
| 265 | case $i in |
---|
| 266 | \.) echo "%dir ${TGTDIR}" >> build/files.newlib |
---|
| 267 | ;; |
---|
| 268 | *) echo "%dir ${TGTDIR}/$i" >> build/files.newlib |
---|
| 269 | ;; |
---|
| 270 | esac |
---|
| 271 | done |
---|
| 272 | |
---|
| 273 | rm -f dirs ; |
---|
| 274 | echo "%defattr(-,root,root,-)" >> dirs |
---|
| 275 | echo "%dir %{_prefix}" >> dirs |
---|
| 276 | echo "%dir %{_libdir}" >> dirs |
---|
| 277 | %if "%{gcc_version}" >= "3.4" |
---|
| 278 | echo "%dir %{_libexecdir}" >> dirs |
---|
| 279 | %endif |
---|
| 280 | echo "%dir %{gcclib}" >> dirs |
---|
| 281 | echo "%dir %{gcclib}/mips-rtems4.9" >> dirs |
---|
| 282 | |
---|
| 283 | TGTDIR="%{gcclib}/mips-rtems4.9/%{gcc_version}" |
---|
| 284 | for i in $f; do |
---|
| 285 | case $i in |
---|
| 286 | \.) echo "%dir ${TGTDIR}" >> dirs |
---|
| 287 | ;; |
---|
| 288 | *) echo "%dir ${TGTDIR}/$i" >> dirs |
---|
| 289 | ;; |
---|
| 290 | esac |
---|
| 291 | done |
---|
| 292 | |
---|
| 293 | # Collect files to go into different packages |
---|
| 294 | cp dirs build/files.gcc |
---|
| 295 | cp dirs build/files.g77 |
---|
| 296 | cp dirs build/files.gfortran |
---|
| 297 | cp dirs build/files.objc |
---|
| 298 | cp dirs build/files.gcj |
---|
| 299 | cp dirs build/files.g++ |
---|
| 300 | |
---|
| 301 | TGTDIR="%{gcclib}/mips-rtems4.9/%{gcc_version}" |
---|
| 302 | f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`; |
---|
| 303 | for i in $f; do |
---|
| 304 | case $i in |
---|
| 305 | *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs |
---|
| 306 | *f771) ;; |
---|
| 307 | *f951) ;; |
---|
| 308 | *cc1) ;; |
---|
| 309 | *cc1obj) ;; |
---|
| 310 | *cc1plus) ;; # ignore: explicitly put into rpm elsewhere |
---|
| 311 | *collect2) ;; |
---|
| 312 | *libobjc*) echo "$i" >> build/files.objc ;; |
---|
| 313 | *include/objc*) ;; |
---|
| 314 | *include/g++*);; |
---|
| 315 | *include/c++*);; |
---|
| 316 | *adainclude*);; |
---|
| 317 | *adalib*);; |
---|
| 318 | *gnat1);; |
---|
| 319 | *jc1) ;; |
---|
| 320 | *jvgenmain) ;; |
---|
| 321 | */libgfortran*.*) echo "$i" >> build/files.gfortran ;; |
---|
| 322 | */libstdc++.*) echo "$i" >> build/files.g++ ;; |
---|
| 323 | */libsupc++.*) echo "$i" >> build/files.g++ ;; |
---|
| 324 | *) echo "$i" >> build/files.gcc ;; |
---|
| 325 | esac |
---|
| 326 | done |
---|
| 327 | |
---|
| 328 | TGTDIR="%{_exec_prefix}/mips-rtems4.9/lib" |
---|
| 329 | f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`; |
---|
| 330 | for i in $f; do |
---|
| 331 | case $i in |
---|
| 332 | *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs |
---|
| 333 | *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed |
---|
| 334 | # all other files belong to newlib |
---|
| 335 | *) echo "$i" >> build/files.newlib ;; |
---|
| 336 | esac |
---|
| 337 | done |
---|
| 338 | # Extract %%__os_install_post into os_install_post~ |
---|
| 339 | cat << \EOF > os_install_post~ |
---|
| 340 | %__os_install_post |
---|
| 341 | EOF |
---|
| 342 | |
---|
| 343 | # Generate customized brp-*scripts |
---|
| 344 | cat os_install_post~ | while read a x y; do |
---|
| 345 | case $a in |
---|
| 346 | # Prevent brp-strip* from trying to handle foreign binaries |
---|
| 347 | */brp-strip*) |
---|
| 348 | b=$(basename $a) |
---|
| 349 | sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b |
---|
| 350 | chmod a+x $b |
---|
| 351 | ;; |
---|
| 352 | # Fix up brp-compress to handle %%_prefix != /usr |
---|
| 353 | */brp-compress*) |
---|
| 354 | b=$(basename $a) |
---|
| 355 | sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b |
---|
| 356 | chmod a+x $b |
---|
| 357 | ;; |
---|
| 358 | esac |
---|
| 359 | done |
---|
| 360 | |
---|
| 361 | sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \ |
---|
| 362 | -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \ |
---|
| 363 | < os_install_post~ > os_install_post |
---|
| 364 | %define __os_install_post . ./os_install_post |
---|
| 365 | |
---|
| 366 | |
---|
| 367 | cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides |
---|
| 368 | #!/bin/sh |
---|
| 369 | grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/mips-rtems4.9/(lib|include|sys-root)' \ |
---|
| 370 | | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/mips-rtems4.9/' | %__find_provides |
---|
| 371 | EOF |
---|
| 372 | chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides |
---|
| 373 | %define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides |
---|
| 374 | |
---|
| 375 | cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires |
---|
| 376 | #!/bin/sh |
---|
| 377 | grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/mips-rtems4.9/(lib|include|sys-root)' \ |
---|
| 378 | | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/mips-rtems4.9/' | %__find_requires |
---|
| 379 | EOF |
---|
| 380 | chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires |
---|
| 381 | %define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires |
---|
| 382 | |
---|
| 383 | %clean |
---|
| 384 | rm -rf $RPM_BUILD_ROOT |
---|
| 385 | |
---|
| 386 | # ============================================================== |
---|
| 387 | # rtems-4.9-mips-rtems4.9-gcc |
---|
| 388 | # ============================================================== |
---|
| 389 | # %package -n rtems-4.9-mips-rtems4.9-gcc |
---|
| 390 | # Summary: GNU cc compiler for mips-rtems4.9 |
---|
| 391 | # Group: Development/Tools |
---|
| 392 | # Version: %{gcc_rpmvers} |
---|
| 393 | # Requires: rtems-4.9-mips-rtems4.9-binutils |
---|
| 394 | # Requires: rtems-4.9-mips-rtems4.9-newlib = %{newlib_version}-%{release} |
---|
| 395 | # License: GPL |
---|
| 396 | |
---|
| 397 | # %if %build_infos |
---|
| 398 | # Requires: rtems-4.9-gcc-common |
---|
| 399 | # %endif |
---|
| 400 | |
---|
| 401 | %description -n rtems-4.9-mips-rtems4.9-gcc |
---|
| 402 | GNU cc compiler for mips-rtems4.9. |
---|
| 403 | |
---|
| 404 | %files -n rtems-4.9-mips-rtems4.9-gcc -f build/files.gcc |
---|
| 405 | %defattr(-,root,root) |
---|
| 406 | %dir %{_mandir} |
---|
| 407 | %dir %{_mandir}/man1 |
---|
| 408 | %{_mandir}/man1/mips-rtems4.9-gcc.1* |
---|
| 409 | %if "%{gcc_version}" >= "3.4" |
---|
| 410 | %{_mandir}/man1/mips-rtems4.9-cpp.1* |
---|
| 411 | %{_mandir}/man1/mips-rtems4.9-gcov.1* |
---|
| 412 | %endif |
---|
| 413 | |
---|
| 414 | %dir %{_bindir} |
---|
| 415 | %{_bindir}/mips-rtems4.9-cpp%{_exeext} |
---|
| 416 | %{_bindir}/mips-rtems4.9-gcc%{_exeext} |
---|
| 417 | %if "%{gcc_version}" >= "3.3" |
---|
| 418 | %{_bindir}/mips-rtems4.9-gcc-%{gcc_version}%{_exeext} |
---|
| 419 | %endif |
---|
| 420 | %{_bindir}/mips-rtems4.9-gcov%{_exeext} |
---|
| 421 | %{_bindir}/mips-rtems4.9-gccbug |
---|
| 422 | |
---|
| 423 | %dir %{gcclib}/mips-rtems4.9/%{gcc_version}/include |
---|
| 424 | %if "%{gcc_version}" > "4.0.3" |
---|
[51aac0e] | 425 | %if "mips-rtems4.9" != "bfin-rtems4.9" |
---|
[dc00c8d] | 426 | %if "mips-rtems4.9" != "avr-rtems4.9" |
---|
[2d9201a] | 427 | %dir %{gcclib}/mips-rtems4.9/%{gcc_version}/include/ssp |
---|
| 428 | %endif |
---|
| 429 | %endif |
---|
[dc00c8d] | 430 | %endif |
---|
[2d9201a] | 431 | |
---|
| 432 | %dir %{gccexec} |
---|
| 433 | %dir %{gccexec}/mips-rtems4.9 |
---|
| 434 | %dir %{gccexec}/mips-rtems4.9/%{gcc_version} |
---|
| 435 | %{gccexec}/mips-rtems4.9/%{gcc_version}/cc1%{_exeext} |
---|
| 436 | %{gccexec}/mips-rtems4.9/%{gcc_version}/collect2%{_exeext} |
---|
| 437 | |
---|
| 438 | # ============================================================== |
---|
| 439 | # rtems-4.9-gcc-common |
---|
| 440 | # ============================================================== |
---|
| 441 | %package -n rtems-4.9-gcc-common |
---|
| 442 | Summary: Base package for rtems gcc and newlib C Library |
---|
| 443 | Group: Development/Tools |
---|
| 444 | Version: %{gcc_rpmvers} |
---|
| 445 | License: GPL |
---|
| 446 | |
---|
| 447 | Requires(post): /sbin/install-info |
---|
| 448 | Requires(preun): /sbin/install-info |
---|
| 449 | |
---|
| 450 | %description -n rtems-4.9-gcc-common |
---|
| 451 | GCC files that are shared by all targets. |
---|
| 452 | |
---|
| 453 | %files -n rtems-4.9-gcc-common |
---|
| 454 | %defattr(-,root,root) |
---|
| 455 | %dir %{_infodir} |
---|
| 456 | %ghost %{_infodir}/dir |
---|
| 457 | %{_infodir}/cpp.info* |
---|
| 458 | %{_infodir}/cppinternals.info* |
---|
| 459 | %{_infodir}/gcc.info* |
---|
| 460 | %{_infodir}/gccint.info* |
---|
| 461 | %if "%{gcc_version}" >= "3.4" |
---|
| 462 | %{_infodir}/gccinstall.info* |
---|
| 463 | %endif |
---|
| 464 | |
---|
| 465 | %dir %{_mandir} |
---|
| 466 | %if "%{gcc_version}" < "3.4" |
---|
| 467 | %dir %{_mandir}/man1 |
---|
| 468 | %{_mandir}/man1/cpp.1* |
---|
| 469 | %{_mandir}/man1/gcov.1* |
---|
| 470 | %endif |
---|
| 471 | %dir %{_mandir}/man7 |
---|
| 472 | %{_mandir}/man7/fsf-funding.7* |
---|
| 473 | %{_mandir}/man7/gfdl.7* |
---|
| 474 | %{_mandir}/man7/gpl.7* |
---|
| 475 | |
---|
| 476 | %post -n rtems-4.9-gcc-common |
---|
| 477 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || : |
---|
| 478 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || : |
---|
| 479 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || : |
---|
| 480 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || : |
---|
| 481 | %if "%{gcc_version}" >= "3.4" |
---|
| 482 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || : |
---|
| 483 | %endif |
---|
| 484 | |
---|
| 485 | %preun -n rtems-4.9-gcc-common |
---|
| 486 | if [ $1 -eq 0 ]; then |
---|
| 487 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || : |
---|
| 488 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || : |
---|
| 489 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || : |
---|
| 490 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || : |
---|
| 491 | %if "%{gcc_version}" >= "3.4" |
---|
| 492 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || : |
---|
| 493 | %endif |
---|
| 494 | fi |
---|
| 495 | |
---|
| 496 | # ============================================================== |
---|
| 497 | # rtems-4.9-mips-rtems4.9-gcc-c++ |
---|
| 498 | # ============================================================== |
---|
| 499 | %package -n rtems-4.9-mips-rtems4.9-gcc-c++ |
---|
| 500 | Summary: GCC c++ compiler for mips-rtems4.9 |
---|
| 501 | Group: Development/Tools |
---|
| 502 | Version: %{gcc_rpmvers} |
---|
| 503 | License: GPL |
---|
| 504 | |
---|
[5633d25f] | 505 | %if "%{_build}" != "%{_host}" |
---|
| 506 | BuildRequires: rtems-4.9-mips-rtems4.9-gcc-c++ |
---|
| 507 | %endif |
---|
[2d9201a] | 508 | Provides: rtems-4.9-mips-rtems4.9-c++ = %{gcc_rpmvers}-%{release} |
---|
| 509 | Obsoletes: rtems-4.9-mips-rtems4.9-c++ < %{gcc_rpmvers}-%{release} |
---|
| 510 | |
---|
| 511 | Requires: rtems-4.9-gcc-common |
---|
| 512 | Requires: rtems-4.9-mips-rtems4.9-gcc = %{gcc_rpmvers}-%{release} |
---|
| 513 | |
---|
| 514 | %description -n rtems-4.9-mips-rtems4.9-gcc-c++ |
---|
| 515 | GCC c++ compiler for mips-rtems4.9. |
---|
| 516 | |
---|
| 517 | %files -n rtems-4.9-mips-rtems4.9-gcc-c++ -f build/files.g++ |
---|
| 518 | %defattr(-,root,root) |
---|
| 519 | %{_mandir}/man1/mips-rtems4.9-g++.1* |
---|
| 520 | |
---|
| 521 | %{_bindir}/mips-rtems4.9-c++%{_exeext} |
---|
| 522 | %{_bindir}/mips-rtems4.9-g++%{_exeext} |
---|
| 523 | |
---|
| 524 | %dir %{gccexec} |
---|
| 525 | %dir %{gccexec}/mips-rtems4.9 |
---|
| 526 | %dir %{gccexec}/mips-rtems4.9/%{gcc_version} |
---|
| 527 | %{gccexec}/mips-rtems4.9/%{gcc_version}/cc1plus%{_exeext} |
---|
| 528 | |
---|
| 529 | %dir %{gcclib}/mips-rtems4.9/%{gcc_version}/include |
---|
| 530 | %if "%{gcc_version}" >= "3.2" |
---|
| 531 | %{gcclib}/mips-rtems4.9/%{gcc_version}/include/c++ |
---|
| 532 | %else |
---|
| 533 | %{gcclib}/mips-rtems4.9/%{gcc_version}/include/g++ |
---|
| 534 | %endif |
---|
| 535 | |
---|
| 536 | |
---|
| 537 | |
---|
| 538 | # ============================================================== |
---|
| 539 | # rtems-4.9-mips-rtems4.9-newlib |
---|
| 540 | # ============================================================== |
---|
| 541 | %package -n rtems-4.9-mips-rtems4.9-newlib |
---|
| 542 | Summary: C Library (newlib) for mips-rtems4.9 |
---|
| 543 | Group: Development/Tools |
---|
| 544 | License: Distributable |
---|
| 545 | Version: %{newlib_version} |
---|
| 546 | |
---|
| 547 | Provides: rtems-4.9-mips-rtems4.9-libc = %{newlib_version}-%{release} |
---|
| 548 | Obsoletes: rtems-4.9-mips-rtems4.9-libc < %{newlib_version}-%{release} |
---|
| 549 | |
---|
| 550 | Requires: rtems-4.9-newlib-common |
---|
| 551 | |
---|
| 552 | %description -n rtems-4.9-mips-rtems4.9-newlib |
---|
| 553 | Newlib C Library for mips-rtems4.9. |
---|
| 554 | |
---|
| 555 | %files -n rtems-4.9-mips-rtems4.9-newlib -f build/files.newlib |
---|
| 556 | %defattr(-,root,root) |
---|
| 557 | %dir %{_prefix} |
---|
| 558 | %dir %{_exec_prefix}/mips-rtems4.9 |
---|
| 559 | %{_exec_prefix}/mips-rtems4.9/include |
---|
| 560 | |
---|
| 561 | # ============================================================== |
---|
| 562 | # rtems-4.9-newlib-common |
---|
| 563 | # ============================================================== |
---|
| 564 | %package -n rtems-4.9-newlib-common |
---|
| 565 | Summary: Base package for RTEMS newlib C Library |
---|
| 566 | Group: Development/Tools |
---|
| 567 | Version: %{newlib_version} |
---|
| 568 | License: Distributable |
---|
| 569 | |
---|
| 570 | Requires(post): /sbin/install-info |
---|
| 571 | Requires(preun): /sbin/install-info |
---|
| 572 | |
---|
| 573 | %description -n rtems-4.9-newlib-common |
---|
| 574 | newlib files that are shared by all targets. |
---|
| 575 | |
---|
| 576 | %files -n rtems-4.9-newlib-common |
---|
| 577 | %defattr(-,root,root) |
---|
| 578 | %dir %{_infodir} |
---|
| 579 | %ghost %{_infodir}/dir |
---|
| 580 | %{_infodir}/libc.info* |
---|
| 581 | %{_infodir}/libm.info* |
---|
| 582 | |
---|
| 583 | %post -n rtems-4.9-newlib-common |
---|
| 584 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || : |
---|
| 585 | /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || : |
---|
| 586 | |
---|
| 587 | %preun -n rtems-4.9-newlib-common |
---|
| 588 | if [ $1 -eq 0 ]; then |
---|
| 589 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || : |
---|
| 590 | /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || : |
---|
| 591 | fi |
---|
| 592 | |
---|