source: rtems/scripts/toolchain.spec.in @ 18408af

4.104.114.84.95
Last change on this file since 18408af was 18408af, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 15, 1999 at 2:11:02 PM

Ralf Corsepius (corsepiu@…) submitted these scripts to
help build RPMs.

  • Property mode set to 100644
File size: 3.2 KB
Line 
1#
2# spec file for package rtems
3#
4# Copyright  (c)  1999  OARCorp, Huntsville, AL
5#
6# please send bugfixes or comments to joel@OARcorp.com
7#
8
9# neededforbuild  @target_alias@-binutils @target_alias@-gcc
10
11Vendor:       OAR Corporation
12Distribution: Linux
13Name:         rtems-@target_alias@-tools
14Release:      @Release@
15Copyright:    1999 OARCorp
16Group:        unsorted
17Provides:     rtems-@target_alias@-tools
18
19Autoreqprov:  on
20Packager:     corsepiu@faw.uni-ulm.de
21
22Version:      @Version@
23Summary:      rtems gcc tool chain for target @target_alias@
24Source0:        gcc-2.95.1.tar.gz
25Source1:        newlib-1.8.2.tar.gz
26Source2:        binutils-2.9.5.tar.gz
27Patch0:         gcc-2.95.1-rtems-19991014.diff
28Patch1:         newlib-1.8.2-rtems-19991014.diff
29Patch2:         binutils-2.9.5-rtems-19991014.diff
30
31Buildroot:    /tmp
32# Patch:
33%description
34RTEMS is a free operating system for embedded systems.
35
36Authors:
37--------
38    Joel Sherrill (joel@oarcorp.com)
39    ...
40
41%prep
42# untar the sources inside rtems-@target_alias@-@bsp@-@Version@
43%setup -c -n rtems-@target_alias@-tools -a 1 -a 2
44
45# %setup -c -n rtems-@target_alias@ -a 1 -a 2
46%patch0 -p0
47%patch1 -p0
48%patch2 -p0
49
50mkdir src
51( cd src
52  # The configure scripts and share libraries should be taken from
53  # the tool component with the newest version.
54  GET_CONFIGURE_SCRIPTS_FROM=gcc-2.95.1
55  for f in config config.guess config.sub configure configure.in \
56        config-ml.in Makefile.in install-sh move-if-change \
57        mkinstalldirs libiberty config.if ltconfig missing
58  do
59        ln -s ../${GET_CONFIGURE_SCRIPTS_FROM}/$f .
60  done
61
62  # Link in GCC or EGCS
63  for f in gcc libio libstdc++ texinfo xiberty
64  do
65        ln -s ../gcc-2.95.1/${f} .
66  done
67
68  # Get these components from binutils
69  for f in bfd binutils gas gprof ld opcodes etc
70  do
71       ln -s ../binutils-2.9.5/$f .
72  done
73
74  # Now get the C library
75  ln -s ../newlib-1.8.2/newlib .
76)
77
78%build
79test -d build || mkdir build
80( cd build
81  ../src/configure --target=@target_alias@ \
82    --with-gnu-as --with-gnu-ld --verbose \
83    --prefix=/opt/rtems \
84    --with-sys-includes=$RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
85
86  test -d $RPM_BUILD_ROOT/opt \
87    || mkdir $RPM_BUILD_ROOT/opt
88  test -d $RPM_BUILD_ROOT/opt/rtems \
89    || mkdir $RPM_BUILD_ROOT/opt/rtems
90  test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@ \
91    || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@
92  test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include \
93    || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include
94  test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include \
95    || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
96
97  srclimits=../src/newlib/libc/sys/rtems/include/limits.h
98  for dir in $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include \
99             $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
100  do
101    cp ${srclimits} ${dir}
102  done
103
104  make LANGUAGES="c c++" all
105
106  cd gcc
107    rm -f stmp-multilib
108    find . -name "*.a" -print | xargs -e rm -f
109
110    make LANGUAGES="c c++" all
111  cd ..
112)
113
114%install
115( cd build
116  make prefix=$RPM_BUILD_ROOT/opt/rtems LANGUAGES="c c++" install
117)
118
119%files
120/opt/rtems/@target_alias@/bin
121/opt/rtems/@target_alias@/include
122/opt/rtems/@target_alias@/lib
123/opt/rtems/@target_alias@/sys-include
124/opt/rtems/bin/@target_alias@*
125/opt/rtems/lib/gcc-lib/@target_alias@/2.95.1
Note: See TracBrowser for help on using the repository browser.