source: rtems/scripts/gccnewlib/mkspec.in @ 4fca5bd5

4.104.114.84.95
Last change on this file since 4fca5bd5 was 4fca5bd5, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/05/06 at 06:55:51

2006-02-05 Ralf Corsepius <ralf.corsepius@…>

  • gccnewlib/mkspec.in: Split patches.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1#!/bin/sh
2#
3#  Usage: mkspec CPU
4#
5
6RTEMS_DIR=`dirname $0`/@top_srcdir@
7
8CFG=../setup.cache
9
10usage()
11{
12  echo "$0 [options] <target_alias>"
13  echo "  options:"
14  echo "    -cfg <setup.cache>"
15  echo "    -a <alternate specs.in>"
16  exit 1 ;
17}
18
19specsrc=./gccnewlib.spec.in
20
21while test $# -ge 2; do
22case $1 in
23-cfg)
24  shift
25  CFG=$1
26  shift
27  ;;
28-a)        # alternate specs file
29  shift
30  specsrc=$1
31  shift
32  ;;
33-*)
34  echo "invalid option $1";
35  usage
36  ;;
37esac
38done
39
40if test ! $# -eq 1;
41then
42  echo "Invalid number of arguments"
43  usage
44fi
45
46# target to build for
47target_alias=$1
48
49. ./$CFG
50
51if test -n "${gcc_patch_version}"; then
52PATCH0="Patch0:         gcc-core-${gcc_version}-rtems-${gcc_patch_version}.diff"
53PATCH1="Patch1:         gcc-g++-${gcc_version}-rtems-${gcc_patch_version}.diff"
54PATCH2="Patch2:         gcc-fortran-${gcc_version}-rtems-${gcc_patch_version}.diff"
55PATCH3="Patch3:         gcc-gcj-${gcc_version}-rtems-${gcc_patch_version}.diff"
56PATCH4="Patch4:         gcc-ada-${gcc_version}-rtems-${gcc_patch_version}.diff"
57PATCH5="Patch5:         gcc-objc-${gcc_version}-rtems-${gcc_patch_version}.diff"
58fi
59
60if test -n "${newlib_patch_version}"; then
61PATCH50="Patch50:       newlib-${newlib_version}-rtems-${newlib_patch_version}.diff"
62fi
63
64# note that the variables in the gccnewlib directory are actually the same
65sed -e "s,@PATCH0\@,${PATCH0}," \
66    -e "s,@PATCH1\@,${PATCH1}," \
67    -e "s,@PATCH2\@,${PATCH2}," \
68    -e "s,@PATCH3\@,${PATCH3}," \
69    -e "s,@PATCH4\@,${PATCH4}," \
70    -e "s,@PATCH5\@,${PATCH5}," \
71    -e "s,@PATCH50\@,${PATCH50}," \
72    -e "s,@Release\@,${gccnewlib_rpm_release},g" \
73    -e "s,@target_alias\@,${target_alias},g" \
74    -e "s,@prefix\@,@prefix@,g" \
75    -e "s,@rpmprefix\@,@rpmprefix@,g" \
76    -e "s,@rpmgroup\@,@rpmgroup@,g" \
77    -e "s,@osversion\@,@osversion@,g" \
78    -e "s,@gcc_version\@,${gcc_version},g" \
79    -e "s,@gcc_patch_version\@,${gcc_patch_version},g" \
80    -e "s,@gcc_suffix\@,${gcc_suffix},g" \
81    -e "s,@newlib_version\@,${newlib_version},g" \
82    -e "s,@newlib_patch_version\@,${newlib_patch_version},g" \
83    -e "s,@newlib_suffix\@,${newlib_suffix},g" \
84< ${specsrc}
Note: See TracBrowser for help on using the repository browser.