source: rtems/contrib/freebsd/i386-freebsd-gcc.spec.in @ fce4a52

4.104.114.84.95
Last change on this file since fce4a52 was fce4a52, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 13, 2004 at 10:59:41 AM

New.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1#
2# spec file for building gcc for freebsd
3#
4
5%define _prefix @PREFIX@
6
7%define gcc_version @GCC_VERS@
8%define gcc_rpmvers %{expand: %(echo  @GCC_VERS@ | tr - _)}
9
10%define __os_install_post       %{nil}
11
12Vendor:         RTEMS.org
13Distribution:   Linux
14Name:           i386-freebsd5-gcc
15Summary:        i386-freebsd5 gcc.
16Group:          FreeBSD
17Release:        @GCC_RPMREL@
18License:        gcc is GPL/LGPL
19Packager:       Ralf Corsepius <ralf_corsepius@rtems.org>
20Version:        %gcc_rpmvers
21
22Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}-20040412.tar.bz2
23NoSource:       0
24
25BuildRoot:      @RPM_BUILD_ROOT@
26
27# Urgh, but RH's find-* is too stupid to cope with foreign objects
28Autoreqprov:    off
29
30BuildRequires:  i386-freebsd5-binutils
31BuildRequires:  i386-freebsd5-libs
32Requires:       i386-freebsd5-binutils
33Requires:       i386-freebsd5-libs
34Provides:       i386-freebsd5-gcc
35
36%description
37Cross gcc for target solaris
38
39%prep
40# untar the sources inside i386-freebsd5-gcc
41%setup -c -n %{name}-%{version} -a 0
42
43#  touch gcc-%{gcc_version}/gcc/ada/treeprs.ads
44#  touch gcc-%{gcc_version}/gcc/ada/[es]info.h
45#  touch gcc-%{gcc_version}/gcc/ada/nmake.ad[bs]
46
47  pushd gcc-%{gcc_version}
48  contrib/gcc_update --touch
49  popd
50
51  test -d build || mkdir build
52
53%build
54  export PATH="%{_bindir}:${PATH}"
55  cd build
56
57  ../gcc-%{gcc_version}/configure --target=i386-freebsd5 \
58    --with-gnu-as --with-gnu-ld --without-newlib --verbose \
59    --disable-nls --enable-languages=c,c++ \
60    --enable-version-specific-runtime-libs \
61    --with-sysroot=%{_prefix}/i386-freebsd5/sys-root \
62    --prefix=%{_prefix}
63
64  make all
65
66#  make -C gcc gnatlib
67#  make -C gcc cross-gnattools
68#  make -C gcc ada.all.cross
69
70# We don't want info files
71#  make info
72%install
73  rm -rf $RPM_BUILD_ROOT
74  export PATH="%{_bindir}:${PATH}"
75  cd build
76
77  make prefix=$RPM_BUILD_ROOT%{_prefix} install
78  # cd back to build/
79  cd ..
80
81  # libiberty comes from freebsd5-libs or binutils
82  rm -f $RPM_BUILD_ROOT%{_prefix}/i386-freebsd5/lib/libiberty.a
83  rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
84
85  # GCC ships broken *.la's
86  find $RPM_BUILD_ROOT%{_prefix} -name '*.la' -exec rm -f {} \;
87
88%files
89%defattr(-,root,root)
90%{_prefix}
91# We don't want infos
92%exclude %{_prefix}/info
Note: See TracBrowser for help on using the repository browser.