OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [scripts/] [mkgdbspec.in] - Blame information for rev 496

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
#!/bin/sh
2
#
3
#  Usage: mkgdbspec CPU
4
#
5
 
6
RTEMS_DIR=`dirname $0`/@top_srcdir@
7
 
8
CFG=setup.cache
9
dst=@RPM_SPECSdir@
10
exe_ext=@EXEEXT@
11
 
12
usage()
13
{
14
  echo "$0 [options] "
15
  echo "  options:"
16
  echo "    -cfg "
17
  echo "    -o "
18
  exit 1 ;
19
}
20
 
21
while test $# -ge 2; do
22
case $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
  ;;
37
esac
38
done
39
 
40
if test ! $# -eq 1;
41
then
42
  echo "Invalid number of arguments"
43
  usage
44
fi
45
 
46
# target to build for
47
target_alias=$1
48
 
49
. ./$CFG
50
 
51
specfile=${dst}/$target_alias-gdb-${gdb_version}.spec
52
 
53
case ${target_alias} in
54
  powerpc*)
55
    extra_configure_arguments="--enable-sim --enable-sim-powerpc --enable-sim-timebase --enable-sim-hardware"
56
    #  Enabling this causes the program image to be huge and causes
57
    #  some gcc/hosts combinations to run out of memory.
58
    #          --enable-sim-inline
59
    ;;
60
  sparc*)
61
    extra_configure_arguments="--enable-sim"
62
    ;;
63
  *)
64
    ;;
65
esac
66
 
67
sed -e "s%@Release@%${gdb_rpm_release}%g" \
68
    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
69
    -e "s%@target_alias@%${target_alias}%g" \
70
    -e "s%@gdb_version@%${gdb_version}%g" \
71
    -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
72
    -e "s%@extra_configure_arguments@%${extra_configure_arguments}%g" \
73
    -e "s%@exe_ext@%${exe_ext}%g" \
74
< ${RTEMS_DIR}/gdb/gdb.spec.in \
75
> ${specfile}
76
 
77
case ${target_alias} in
78
  powerpc*)
79
     echo "/opt/rtems/bin/${target_alias}-run${exe_ext}"
80
     ;;
81
  sparc*)
82
     echo "/opt/rtems/bin/${target_alias}-run${exe_ext}"
83
     echo "/opt/rtems/bin/${target_alias}-sis${exe_ext}"
84
     ;;
85
  *) ;;
86
esac >> ${specfile}
87
 
88
echo Generated ${specfile}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.