source: rtems/scripts/mkgdbspec.in @ 1479c22

4.104.114.84.95
Last change on this file since 1479c22 was 1479c22, checked in by Joel Sherrill <joel.sherrill@…>, on 11/18/99 at 20:38:27

Added code to set extra configure arguments for sparc and powerpc targets
such that the simulator is enabled.

Also corrected a typo which prevented the simulator files from being
included in the file list.

  • Property mode set to 100644
File size: 1.6 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@
10
11usage()
12{
13  echo "$0 [options] <target_alias>"
14  echo "  options:"
15  echo "    -cfg <setup.cache>"
16  echo "    -o <rpm-spec-dir>"
17  exit 1 ;
18}
19
20while test $# -ge 2; do
21case $1 in
22-cfg)
23  shift
24  CFG=$1
25  shift
26  ;;
27-o)
28  shift
29  dst=$1
30  shift
31  ;;
32-*)
33  echo "invalid option $1";
34  usage
35  ;;
36esac
37done
38
39if test ! $# -eq 1;
40then
41  echo "Invalid number of arguments"
42  usage
43fi
44
45# target to build for
46target_alias=$1
47
48. ./$CFG
49
50specfile=${dst}/$target_alias-gdb-${gdb_version}.spec
51
52case ${target_alias} in
53  powerpc*)
54    extra_configure_arguments="--enable-sim --enable-sim-powerpc --enable-sim-timebase --enable-sim-hardware"
55    #  Enabling this causes the program image to be huge and causes
56    #  some gcc/hosts combinations to run out of memory.
57    #          --enable-sim-inline
58    ;;
59  sparc*)
60    extra_configure_arguments="--enable-sim"
61    ;;
62  *)
63    ;;
64esac
65
66sed -e "s%@Release@%${gdb_rpm_release}%g" \
67    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
68    -e "s%@target_alias@%${target_alias}%g" \
69    -e "s%@gdb_version@%${gdb_version}%g" \
70    -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
71    -e "s%@extra_configure_arguments@%${extra_configure_arguments}%g" \
72< ${RTEMS_DIR}/gdb/gdb.spec.in \
73> ${specfile}
74
75case ${target_alias} in
76  powerpc*)
77     echo "/opt/rtems/bin/${target_alias}-run"
78     ;;
79  sparc*)
80     echo "/opt/rtems/bin/${target_alias}-run"
81     echo "/opt/rtems/bin/${target_alias}-sis"
82     ;;
83  *) ;;
84esac >> ${specfile}
85
86echo Generated ${specfile}
Note: See TracBrowser for help on using the repository browser.