source: rtems/scripts/gcc3newlib/mkspec.in @ 99f97d3f

Last change on this file since 99f97d3f was 491b8b2e, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/31/03 at 05:21:08

2003-01-31 Ralf Corsepius <corsepiu@…>

  • gcc3newlib/gccnewlib.add: Remove header, broken cdn-X configuration, %clean, Replace @exe_ext@ with %{_exeext}.
  • gcc3newlib/mkspec.in: Remove exe_ext.
  • gcc3newlib/target-c++.add: Replace @exe_ext@ with %{_exeext}.
  • gcc3newlib/target-g77.add: Replace @exe_ext@ with %{_exeext}.
  • gcc3newlib/target-gcc.add: Replace @exe_ext@ with %{_exeext}.
  • gcc3newlib/target-gcj.add: Replace @exe_ext@ with %{_exeext}.
  • gcc3newlib/target-gnat.add: Replace @exe_ext@ with %{_exeext}.
  • gcc3newlib/target-objc.add: Replace @exe_ext@ with %{_exeext}. + gcc3newlib/Makefile.am: Use $(top_builddir)/common/common.add, $(top_builddir)/common/clean.add, header.add.
  • Property mode set to 100644
File size: 1.6 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=${RTEMS_DIR}/gcc3newlib/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
51patchn=-1
52if test -n "${gcc3_patch_version}"; then
53patchn=`expr $patchn + 1`
54PATCH1="Patch${patchn}: gcc-${gcc3_version}-rtems-${gcc3_patch_version}.diff"
55PATCH2="%patch${patchn} -p0"
56fi
57
58if test -n "${gcc3newlib_patch_version}"; then
59patchn=`expr $patchn + 1`
60PATCH3="Patch${patchn}: newlib-${gcc3newlib_version}-rtems-${gcc3newlib_patch_version}.diff"
61PATCH4="%patch${patchn} -p0"
62fi
63
64# note that the variables in the gcc3newlib directory are actually the same
65sed -e "s,@PATCH1\@,${PATCH1}," \
66    -e "s,@PATCH2\@,${PATCH2}," \
67    -e "s,@PATCH3\@,${PATCH3}," \
68    -e "s,@PATCH4\@,${PATCH4}," \
69    -e "s%@Release\@%${gcc3newlib_rpm_release}%g" \
70    -e "s%@target_alias\@%${target_alias}%g" \
71    -e "s%@prefix\@%@prefix@%g" \
72    -e "s,@rpm_build_root\@,${rpm_build_root},g" \
73    -e "s%@gcc_version\@%${gcc3_version}%g" \
74    -e "s%@gcc_patch_version\@%${gcc3_patch_version}%g" \
75    -e "s%@newlib_version\@%${gcc3newlib_version}%g" \
76    -e "s%@newlib_patch_version\@%${gcc3newlib_patch_version}%g" \
77< ${specsrc}
Note: See TracBrowser for help on using the repository browser.