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 | |
---|
11 | Vendor: OAR Corporation |
---|
12 | Distribution: Linux |
---|
13 | Name: rtems-@target_alias@-tools |
---|
14 | Release: @Release@ |
---|
15 | Copyright: 1999 OARCorp |
---|
16 | Group: unsorted |
---|
17 | Provides: rtems-@target_alias@-tools |
---|
18 | |
---|
19 | Autoreqprov: on |
---|
20 | Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com |
---|
21 | |
---|
22 | Version: @Version@ |
---|
23 | Summary: rtems gcc tool chain for target @target_alias@ |
---|
24 | Source0: gcc-2.95.1.tar.gz |
---|
25 | Source1: newlib-1.8.2.tar.gz |
---|
26 | Source2: binutils-990901.tar.gz |
---|
27 | Patch0: gcc-2.95.1-rtems-19991015.diff |
---|
28 | Patch1: newlib-1.8.2-rtems-19991015.diff |
---|
29 | Patch2: binutils-990901-rtems-19991015.diff |
---|
30 | |
---|
31 | Buildroot: /tmp |
---|
32 | # Patch: |
---|
33 | %description |
---|
34 | RTEMS is an open source operating system for embedded systems. |
---|
35 | |
---|
36 | Authors: |
---|
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 | |
---|
50 | mkdir 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 |
---|
79 | test -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 |
---|