source:
rtems/scripts/mkgdbspec.in
@
5b43316
Last change on this file since 5b43316 was 5b43316, checked in by Joel Sherrill <joel.sherrill@…>, on 06/29/00 at 16:28:39 | |
---|---|
|
|
File size: 1.8 KB |
Rev | Line | |
---|---|---|
[1805015] | 1 | #!/bin/sh |
2 | # | |
3 | # Usage: mkgdbspec CPU | |
4 | # | |
5 | ||
[43e7d103] | 6 | RTEMS_DIR=`dirname $0`/@top_srcdir@ |
7 | ||
8 | CFG=setup.cache | |
[1805015] | 9 | dst=@RPM_SPECSdir@ |
[0c602f0] | 10 | exe_ext=@EXEEXT@ |
[1805015] | 11 | |
12 | usage() | |
[8ace612e] | 13 | { |
[1805015] | 14 | echo "$0 [options] <target_alias>" |
15 | echo " options:" | |
[43e7d103] | 16 | echo " -cfg <setup.cache>" |
[1805015] | 17 | echo " -o <rpm-spec-dir>" |
18 | exit 1 ; | |
[8ace612e] | 19 | } |
[1805015] | 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 | ||
[8ace612e] | 49 | . ./$CFG |
50 | ||
[e4b4a771] | 51 | specfile=${dst}/$target_alias-gdb-${gdb_version}.spec |
52 | ||
[1479c22] | 53 | case ${target_alias} in |
[5b43316] | 54 | h8300*) |
55 | extra_configure_arguments="--enable-sim" | |
56 | ;; | |
57 | i960*) | |
58 | extra_configure_arguments="--enable-sim" | |
59 | ;; | |
[1479c22] | 60 | powerpc*) |
61 | extra_configure_arguments="--enable-sim --enable-sim-powerpc --enable-sim-timebase --enable-sim-hardware" | |
62 | # Enabling this causes the program image to be huge and causes | |
63 | # some gcc/hosts combinations to run out of memory. | |
64 | # --enable-sim-inline | |
65 | ;; | |
66 | sparc*) | |
67 | extra_configure_arguments="--enable-sim" | |
68 | ;; | |
69 | *) | |
70 | ;; | |
71 | esac | |
72 | ||
[431c35d] | 73 | sed -e "s%@Release@%${gdb_rpm_release}%g" \ |
[7063e223] | 74 | -e "s%@rpm_build_root@%${rpm_build_root}%g" \ |
[1805015] | 75 | -e "s%@target_alias@%${target_alias}%g" \ |
76 | -e "s%@gdb_version@%${gdb_version}%g" \ | |
77 | -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \ | |
[1479c22] | 78 | -e "s%@extra_configure_arguments@%${extra_configure_arguments}%g" \ |
[5eac93c7] | 79 | -e "s%@exe_ext@%${exe_ext}%g" \ |
[e4b4a771] | 80 | < ${RTEMS_DIR}/gdb/gdb.spec.in \ |
[8ace612e] | 81 | > ${specfile} |
[1805015] | 82 | |
[1479c22] | 83 | case ${target_alias} in |
[1805015] | 84 | powerpc*) |
[0c602f0] | 85 | echo "/opt/rtems/bin/${target_alias}-run${exe_ext}" |
[1805015] | 86 | ;; |
87 | sparc*) | |
[0c602f0] | 88 | echo "/opt/rtems/bin/${target_alias}-run${exe_ext}" |
89 | echo "/opt/rtems/bin/${target_alias}-sis${exe_ext}" | |
[1805015] | 90 | ;; |
91 | *) ;; | |
[8ace612e] | 92 | esac >> ${specfile} |
[1805015] | 93 | |
[8ace612e] | 94 | echo Generated ${specfile} |
Note: See TracBrowser
for help on using the repository browser.