source: rtems/scripts/mkgdbspec.in @ 0c602f0

4.104.114.84.95
Last change on this file since 0c602f0 was 0c602f0, checked in by Joel Sherrill <joel.sherrill@…>, on 01/23/00 at 19:20:02

Patch from David Fiddes <D.J@…> which adds basic
Cygwin support to the RPM scripts. The patch from David did not
apply cleanly and Joel ended up making all the modifications
plus some it should have included for consistency by hand. His comments:

I've included a diff against the last (19991203) snapshot RPM scripts that
adds what I think is required for Cygwin support. Basically all this boils
down to is adding EXE extension support. I've added the AC_EXEEXT rule to
conifgure.in (requires a valid 'cc' to work - this is not available in the
standard Cygwin distro). Each of the *.spec.in have @exe_ext@ includes in
them for each program that results in an EXE. The only odity here is that
the chill driver program is a shell script and thus does not require .exe to
be added... The mk*.in have all been updated to process the new exe_ext
rule.

  • Property mode set to 100644
File size: 1.7 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  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    ;;
65esac
66
67sed -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%@ext_ext@%${ext_ext}%g" \
74< ${RTEMS_DIR}/gdb/gdb.spec.in \
75> ${specfile}
76
77case ${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  *) ;;
86esac >> ${specfile}
87
88echo Generated ${specfile}
Note: See TracBrowser for help on using the repository browser.