source: rtems/scripts/toolchain.spec.in @ c5b8d6d

4.104.114.84.95
Last change on this file since c5b8d6d was 8c5e54b, checked in by Joel Sherrill <joel.sherrill@…>, on 10/18/99 at 19:10:03

Working on being able to cut RPMs. It now appears that the process
is working mostly for sparc at least.

There is one major problem -- the current process generates a unique
source file per RPM when in fact all of the source files are nearly
the same -- it is only the spec part of the rpm which differs.
The new file mkbinutils_subpackage_version is an attempt to
address this. It does part of the job right -- one source file
produces multiple binary RPMs. BUT the end user can not produce
the resulting RPMS themselves from SRPMS unless they also
build all targets.

  • 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 and joel@OARcorp.com
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-990901.tar.gz
27Patch0:         gcc-2.95.1-rtems-19991015.diff
28Patch1:         newlib-1.8.2-rtems-19991015.diff
29Patch2:         binutils-990901-rtems-19991015.diff
30
31Buildroot:    /tmp
32# Patch:
33%description
34RTEMS is an open source 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-990901/$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 --with-newlib --verbose \
83    --prefix=/opt/rtems
84
85  test -d $RPM_BUILD_ROOT/opt \
86    || mkdir $RPM_BUILD_ROOT/opt
87  test -d $RPM_BUILD_ROOT/opt/rtems \
88    || mkdir $RPM_BUILD_ROOT/opt/rtems
89  test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@ \
90    || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@
91  test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include \
92    || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include
93  test -d $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include \
94    || mkdir $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
95
96  srclimits=../src/newlib/libc/sys/rtems/include/limits.h
97  for dir in $RPM_BUILD_ROOT/opt/rtems/@target_alias@/include \
98             $RPM_BUILD_ROOT/opt/rtems/@target_alias@/sys-include
99  do
100    cp ${srclimits} ${dir}
101  done
102
103  make LANGUAGES="c c++" all
104
105  cd gcc
106    rm -f stmp-multilib
107    find . -name "*.a" -print | xargs -e rm -f
108
109    make LANGUAGES="c c++" all
110  cd ..
111)
112
113%install
114( cd build
115  make prefix=$RPM_BUILD_ROOT/opt/rtems LANGUAGES="c c++" install
116)
117
118%files
119/opt/rtems/@target_alias@/bin
120/opt/rtems/@target_alias@/include
121/opt/rtems/@target_alias@/lib
122/opt/rtems/@target_alias@/sys-include
123/opt/rtems/bin/@target_alias@*
124/opt/rtems/lib/gcc-lib/@target_alias@/2.95.1
Note: See TracBrowser for help on using the repository browser.