source: rtems/scripts/mkgdbspec.in @ b471c035

4.104.114.84.95
Last change on this file since b471c035 was b471c035, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 10, 2001 at 5:12:12 PM

2001-08-10 Joel Sherrill <joel@…>

  • mkgdbspec.in: Make list of simulators very complete.
  • setup.def: Update versions.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1#!/bin/sh
2#
3#  Usage: mkgdbspec CPU
4#
5
6RTEMS_DIR=`dirname $0`/@top_srcdir@
7
8CFG=setup.cache
9dst=@RPM_SPECSdir@
10exe_ext=@EXEEXT@
11
12usage()
13{
14  echo "$0 [options] <target_alias>"
15  echo "  options:"
16  echo "    -cfg <setup.cache>"
17  echo "    -o <rpm-spec-dir>"
18  exit 1 ;
19}
20
21while test $# -ge 2; do
22case $1 in
23-cfg)
24  shift
25  CFG=$1
26  shift
27  ;;
28-o)
29  shift
30  dst=$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
51specfile=${dst}/$target_alias-gdb-${gdb_version}.spec
52
53case ${target_alias} in
54  arm* | d10v* | d30v* | erc32* | fr30* | h8300* | h8500* | i960* | m32r* | \
55  mcore* | mips* | mn10200* | mn10300* | sh* | sparc*| v850* | w65* | z8k*)
56    extra_configure_arguments="--enable-sim"
57    ;;
58  powerpc*)
59    extra_configure_arguments="--enable-sim --enable-sim-powerpc --enable-sim-timebase --enable-sim-hardware"
60    #  Enabling this causes the program image to be huge and causes
61    #  some gcc/hosts combinations to run out of memory.
62    #          --enable-sim-inline
63    ;;
64  *)
65    ;;
66esac
67
68sed -e "s%@Release@%${gdb_rpm_release}%g" \
69    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
70    -e "s%@target_alias@%${target_alias}%g" \
71    -e "s%@gdb_version@%${gdb_version}%g" \
72    -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
73    -e "s%@extra_configure_arguments@%${extra_configure_arguments}%g" \
74    -e "s%@exe_ext@%${exe_ext}%g" \
75< ${RTEMS_DIR}/gdb/gdb.spec.in \
76> ${specfile}
77
78case ${target_alias} in
79  arm* | d10v* | d30v* | erc32* | fr30* | h8300* | h8500* | i960* | m32r* | \
80  mcore* | mips* | mn10200* | mn10300* | powerpc* | sh* | v850* | w65* | z8k*)
81     echo "/opt/rtems/bin/${target_alias}-run${exe_ext}" 
82     ;;
83  sparc*)
84     echo "/opt/rtems/bin/${target_alias}-run${exe_ext}" 
85     echo "/opt/rtems/bin/${target_alias}-sis${exe_ext}" 
86     ;;
87  *) ;;
88esac >> ${specfile}
89
90echo Generated ${specfile}
Note: See TracBrowser for help on using the repository browser.