source: rtems/scripts/mkgccnewlibspec.in @ f817b02

4.104.114.84.95
Last change on this file since f817b02 was f817b02, checked in by Joel Sherrill <joel.sherrill@…>, on 11/04/99 at 18:05:09

The files in libcpu should not be directly dependent on any BSP. In
particular, using bsp.h, or getting information from the BSP which
should properly be obtained from RTEMS is forbidden. This is
necessary to strengthen the division between the BSP independent
parts of RTEMS and the BSPs themselves. This started after
comments and analysis by Ralf Corsepius <corsepiu@…>.
The changes primarily eliminated the need to include bsp.h and
peeking at BSP_Configuration. The use of Cpu_table in each
BSP needs to be eliminated.

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[10629f7]1#!/bin/sh
2#
3#  Usage: mktoolspec CPU
4#
5
[43e7d103]6RTEMS_DIR=`dirname $0`/@top_srcdir@
[10629f7]7
[43e7d103]8CFG=setup.cache
[10629f7]9dst=@RPM_SPECSdir@
10
11usage()
12{
13  echo "$0 [options] <target_alias>"
14  echo "  options:"
[43e7d103]15  echo "    -cfg <setup.cache>"
[10629f7]16  echo "    -o <rpm-spec-dir>"
17  exit 1 ;
18}
19
[f817b02]20specsrc=${RTEMS_DIR}/gccnewlib/gccnewlib.spec.in
21
[10629f7]22while test $# -ge 2; do
23case $1 in
24-cfg)
25  shift
26  CFG=$1
27  shift
28  ;;
29-o)
30  shift
31  dst=$1
32  shift
[f817b02]33-a)        # alternate specs file
34  shift
35  specsrc=$1
36  shift
[10629f7]37  ;;
38-*)
39  echo "invalid option $1";
40  usage
41  ;;
42esac
43done
44
45if test ! $# -eq 1;
46then
47  echo "Invalid number of arguments"
48  usage
49fi
50
51# target to build for
52target_alias=$1
53
54. ./$CFG
55
56specfile=${dst}/$target_alias-gcc-${gcc_version}-newlib-${newlib_version}.spec
57
[431c35d]58sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
[10629f7]59    -e "s%@target_alias@%${target_alias}%g" \
[7063e223]60    -e "s%@rpm_build_root@%${rpm_build_root}%g" \
[10629f7]61    -e "s%@gcc_version@%${gcc_version}%g" \
62    -e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
63    -e "s%@newlib_version@%${newlib_version}%g" \
64    -e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
[f817b02]65< ${specsrc} \
[10629f7]66> ${specfile}
67
68echo Generated ${specfile}.
Note: See TracBrowser for help on using the repository browser.