OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [scripts-ada/] [mkgdbspec.in] - Diff between revs 30 and 173

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 30 Rev 173
#!/bin/sh
#!/bin/sh
#
#
#  Usage: mkgdbspec CPU
#  Usage: mkgdbspec CPU
#
#
RTEMS_DIR=`dirname $0`/@top_srcdir@
RTEMS_DIR=`dirname $0`/@top_srcdir@
CFG=setup.cache
CFG=setup.cache
dst=@RPM_SPECSdir@
dst=@RPM_SPECSdir@
exe_ext=@EXEEXT@
exe_ext=@EXEEXT@
usage()
usage()
{
{
  echo "$0 [options] "
  echo "$0 [options] "
  echo "  options:"
  echo "  options:"
  echo "    -cfg "
  echo "    -cfg "
  echo "    -o "
  echo "    -o "
  exit 1 ;
  exit 1 ;
}
}
while test $# -ge 2; do
while test $# -ge 2; do
case $1 in
case $1 in
-cfg)
-cfg)
  shift
  shift
  CFG=$1
  CFG=$1
  shift
  shift
  ;;
  ;;
-o)
-o)
  shift
  shift
  dst=$1
  dst=$1
  shift
  shift
  ;;
  ;;
-*)
-*)
  echo "invalid option $1";
  echo "invalid option $1";
  usage
  usage
  ;;
  ;;
esac
esac
done
done
if test ! $# -eq 1;
if test ! $# -eq 1;
then
then
  echo "Invalid number of arguments"
  echo "Invalid number of arguments"
  usage
  usage
fi
fi
# target to build for
# target to build for
target_alias=$1
target_alias=$1
. ./$CFG
. ./$CFG
specfile=${dst}/${target_alias}-gnat-${gnat_version}-gdb-${gdb_version}.spec
specfile=${dst}/${target_alias}-gnat-${gnat_version}-gdb-${gdb_version}.spec
case ${target_alias} in
case ${target_alias} in
  powerpc*)
  powerpc*)
    extra_configure_arguments="--enable-sim --enable-sim-powerpc --enable-sim-timebase --enable-sim-hardware"
    extra_configure_arguments="--enable-sim --enable-sim-powerpc --enable-sim-timebase --enable-sim-hardware"
    #  Enabling this causes the program image to be huge and causes
    #  Enabling this causes the program image to be huge and causes
    #  some gcc/hosts combinations to run out of memory.
    #  some gcc/hosts combinations to run out of memory.
    #          --enable-sim-inline
    #          --enable-sim-inline
    ;;
    ;;
  sparc*)
  sparc*)
    extra_configure_arguments="--enable-sim"
    extra_configure_arguments="--enable-sim"
    ;;
    ;;
  *)
  *)
    ;;
    ;;
esac
esac
sed -e "s%@Release@%${gdb_rpm_release}%g" \
sed -e "s%@Release@%${gdb_rpm_release}%g" \
    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
    -e "s%@target_alias@%${target_alias}%g" \
    -e "s%@target_alias@%${target_alias}%g" \
    -e "s%@gdb_version@%${gdb_version}%g" \
    -e "s%@gdb_version@%${gdb_version}%g" \
    -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
    -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \
    -e "s%@gnat_version@%${gnat_version}%g" \
    -e "s%@gnat_version@%${gnat_version}%g" \
    -e "s%@gnat_patch_version@%${gnat_patch_version}%g" \
    -e "s%@gnat_patch_version@%${gnat_patch_version}%g" \
    -e "s%@extra_configure_arguments@%${extra_configure_arguments}%g" \
    -e "s%@extra_configure_arguments@%${extra_configure_arguments}%g" \
    -e "s%@exe_ext@%${exe_ext}%g" \
    -e "s%@exe_ext@%${exe_ext}%g" \
< ${RTEMS_DIR}/gdb/gdb.spec.in \
< ${RTEMS_DIR}/gdb/gdb.spec.in \
> ${specfile}
> ${specfile}
case ${target_alias} in
case ${target_alias} in
  powerpc*)
  powerpc*)
     echo "/opt/gnatrtems/bin/${target_alias}-run${exe_ext}"
     echo "/opt/gnatrtems/bin/${target_alias}-run${exe_ext}"
     ;;
     ;;
  sparc*)
  sparc*)
     echo "/opt/gnatrtems/bin/${target_alias}-run${exe_ext}"
     echo "/opt/gnatrtems/bin/${target_alias}-run${exe_ext}"
     echo "/opt/gnatrtems/bin/${target_alias}-sis${exe_ext}"
     echo "/opt/gnatrtems/bin/${target_alias}-sis${exe_ext}"
     ;;
     ;;
  *) ;;
  *) ;;
esac >> ${specfile}
esac >> ${specfile}
echo Generated ${specfile}
echo Generated ${specfile}
 
 

powered by: WebSVN 2.1.0

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