Added first stab at mkgnatnewlib.

This commit is contained in:
Joel Sherrill
1999-11-04 13:18:23 +00:00
parent 2b2ab1c070
commit d5704c67a0
6 changed files with 692 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ mkbinutils_subpackage_version \
mkbinutilspec \ mkbinutilspec \
mkbspspec \ mkbspspec \
mkgccnewlibspec \ mkgccnewlibspec \
mkgnatnewlibspec \
mkgdbspec \ mkgdbspec \
mkrpms \ mkrpms \
mkspec mkspec

View File

@@ -44,10 +44,12 @@ Makefile
buildall buildall
mkbinutilspec mkbinutilspec
mkgccnewlibspec mkgccnewlibspec
mkgnatnewlibspec
mkgdbspec mkgdbspec
mkbspspec mkbspspec
binutils/Makefile binutils/Makefile
gccnewlib/Makefile gccnewlib/Makefile
gnatnewlib/Makefile
gdb/Makefile gdb/Makefile
rtems/Makefile rtems/Makefile
) )

View File

@@ -0,0 +1,61 @@
## $Id$
AUTOMAKE_OPTIONS = foreign
MKGNATNEWLIBSPEC = $(SHELL) $(top_builddir)/mkgnatnewlibspec
MKGNATNEWLIBSPEC_DEPS = \
$(top_builddir)/mkgnatnewlibspec gnatnewlib.spec.in $(top_builddir)/setup.cache
hppa1.1-rtems-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . hppa1.1-rtems
i386-rtems-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . i386-rtems
i960-rtems-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . i960-rtems
m68k-rtems-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtems
m68k-rtemself-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtemself
mips64orion-rtems-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . mips64orion-rtems
powerpc-rtems-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . powerpc-rtems
sh-rtems-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtems
sh-rtemself-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtemself
sparc-rtems-$(GNATNEWLIBVERS).spec: $(MKGNATNEWLIBSPEC_DEPS)
$(MKGNATNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . sparc-rtems
TEMPLATES = \
gnatnewlib.spec.in
RPM_SPECS_DATA = \
hppa1.1-rtems-$(GNATNEWLIBVERS).spec \
i386-rtems-$(GNATNEWLIBVERS).spec \
i960-rtems-$(GNATNEWLIBVERS).spec \
m68k-rtems-$(GNATNEWLIBVERS).spec \
m68k-rtemself-$(GNATNEWLIBVERS).spec \
mips64orion-rtems-$(GNATNEWLIBVERS).spec \
powerpc-rtems-$(GNATNEWLIBVERS).spec \
sh-rtems-$(GNATNEWLIBVERS).spec \
sh-rtemself-$(GNATNEWLIBVERS).spec \
sparc-rtems-$(GNATNEWLIBVERS).spec
noinst_DATA = \
$(TEMPLATES)
EXTRA_DIST = \
$(TEMPLATES)
CLEANFILES = $(RPM_SPECS_DATA)

View File

@@ -0,0 +1,249 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
BINUTILSVERS = @BINUTILSVERS@
BSPVERS = @BSPVERS@
GCCNEWLIBVERS = @GCCNEWLIBVERS@
GDBVERS = @GDBVERS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RPM_SPECSdir = @RPM_SPECSdir@
RTEMS_VERSION = @RTEMS_VERSION@
VERSION = @VERSION@
AUTOMAKE_OPTIONS = foreign
MKGCCNEWLIBSPEC = $(SHELL) $(top_builddir)/mkgccnewlibspec
MKGCCNEWLIBSPEC_DEPS = $(top_builddir)/mkgccnewlibspec gccnewlib.spec.in $(top_builddir)/setup.cache
TEMPLATES = gccnewlib.spec.in
RPM_SPECS_DATA = hppa1.1-rtems-$(GCCNEWLIBVERS).spec i386-rtems-$(GCCNEWLIBVERS).spec i960-rtems-$(GCCNEWLIBVERS).spec m68k-rtems-$(GCCNEWLIBVERS).spec m68k-rtemself-$(GCCNEWLIBVERS).spec mips64orion-rtems-$(GCCNEWLIBVERS).spec powerpc-rtems-$(GCCNEWLIBVERS).spec sh-rtems-$(GCCNEWLIBVERS).spec sh-rtemself-$(GCCNEWLIBVERS).spec sparc-rtems-$(GCCNEWLIBVERS).spec
noinst_DATA = $(TEMPLATES)
EXTRA_DIST = $(TEMPLATES)
CLEANFILES = $(RPM_SPECS_DATA)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
DATA = $(RPM_SPECS_DATA) $(noinst_DATA)
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign gccnewlib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
install-RPM_SPECSDATA: $(RPM_SPECS_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(RPM_SPECSdir)
@list='$(RPM_SPECS_DATA)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(RPM_SPECSdir)/$$p"; \
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(RPM_SPECSdir)/$$p; \
else if test -f $$p; then \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(RPM_SPECSdir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(RPM_SPECSdir)/$$p; \
fi; fi; \
done
uninstall-RPM_SPECSDATA:
@$(NORMAL_UNINSTALL)
list='$(RPM_SPECS_DATA)'; for p in $$list; do \
rm -f $(DESTDIR)$(RPM_SPECSdir)/$$p; \
done
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = gccnewlib
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign gccnewlib/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-RPM_SPECSDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-RPM_SPECSDATA
uninstall: uninstall-am
all-am: Makefile $(DATA)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(RPM_SPECSdir)
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: uninstall-RPM_SPECSDATA install-RPM_SPECSDATA tags distdir \
info-am info dvi-am dvi check check-am installcheck-am installcheck \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
hppa1.1-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . hppa1.1-rtems
i386-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . i386-rtems
i960-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . i960-rtems
m68k-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtems
m68k-rtemself-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtemself
mips64orion-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . mips64orion-rtems
powerpc-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . powerpc-rtems
sh-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtems
sh-rtemself-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtemself
sparc-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . sparc-rtems
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -0,0 +1,317 @@
#
# spec file for building gcc for rtems
#
# Copyright (c) 1999 OARCorp, Huntsville, AL
#
# please send bugfixes or comments to joel@OARcorp.com
#
Vendor: OAR Corporation
Distribution: Linux
Name: @target_alias@-gcc-newlib
Summary: gcc and newlib C Library for @target_alias@.
Group: rtems
Release: @Release@
Copyright: 1999 OARCorp
Provides: @target_alias@-gcc @target_alias@-chill @target_alias@-gcj
Provides: @target_alias@-g77 @target_alias@-objc
Requires: @target_alias@-binutils
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
Version: gcc@gcc_version@newlib@newlib_version@
Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.gz
Source1: ftp://sourceware.cygnus/com/pub/newlib/newlib-@newlib_version@.tar.gz
Patch0: gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
Patch1: newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
Buildroot: /tmp
#
# The original sources are not included in the source RPM.
# If we included them, then the source RPMs for each target
# would duplicate MBs of source unnecessarily. This is
# a duplication of over 30 MBs of source for each of
# the more than 10 targets it is possible to build.
#
# You can get them yourself from the Internet and copy them to
# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
# Or you can try the ftp options of rpm :-)
#
NoSource: 0, 1
%description
RTEMS is an open source operating system for embedded systems.
This is gcc's and newlib C Library's sources with patches for RTEMS.
The original sources are not included in the source RPM.
If we included them, then the source RPMs for each target
would duplicate MBs of source unnecessarily. This is
a duplication of over 30 MBs of source for each of
the more than 10 targets it is possible to build.
You can get them yourself from the Internet and copy them to
your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
Or you can try the ftp options of rpm :-)
%package -n @target_alias@-gcc
Summary: rtems gcc and newlib C Library for @target_alias@
Group: rtems
Requires: @target_alias@-binutils
%description -n @target_alias@-gcc
RTEMS is an open source operating system for embedded systems.
This is gcc and newlib C Library for @target_alias@.
%package -n @target_alias@-chill
Summary: gcc/chill compiler for @target_alias@
Group: rtems
Requires: @target_alias@-gcc
%description -n @target_alias@-chill
RTEMS is an open source operating system for embedded systems.
This is the gcc/chill compiler and support files for @target_alias@
%package -n @target_alias@-gcj
Summary: gcc/java compiler (gcj) for @target_alias@
Group: rtems
Requires: @target_alias@-gcc
%description -n @target_alias@-gcj
RTEMS is an open source operating system for embedded systems.
This is the gcc/java compiler for @target_alias@
%package -n @target_alias@-g77
Summary: gcc/g77 compiler for @target_alias@
Group: rtems
Requires: @target_alias@-gcc
%description -n @target_alias@-g77
RTEMS is an open source operating system for embedded systems.
This is the gcc/g77 compiler for @target_alias@
%package -n @target_alias@-objc
Summary: gcc/objc compiler for @target_alias@
Group: rtems
Requires: @target_alias@-objc
%description -n @target_alias@-objc
RTEMS is an open source operating system for embedded systems.
This is the gcc/objc compiler for @target_alias@
%prep
# untar the sources inside @target_alias@-gcc-newlib
%setup -c -n @target_alias@-gcc-newlib -a 0 -a 1
%patch0 -p0
%patch1 -p0
# Copy the C library into gcc's source tree
ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
test -d build || mkdir build
%build
cd build
../gcc-@gcc_version@/configure --target=@target_alias@ \
--with-gnu-as --with-gnu-ld --with-newlib --verbose \
--prefix=/opt/rtems
# for now we are building all the languages
# '--enable-languages=c,c++'
make all
make info
# Since gcc now finds the RTEMS limits.h, this should not be needed
# cd gcc
# rm -f stmp-multilib
# find . -name "*.a" -print | xargs -e rm -f
#
# make all
# cd ..
%install
cd build
# Bug in gcc-2.95.1: It doesn't build this installation directory
# If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
../gcc-@gcc_version@/mkinstalldirs \
$RPM_BUILD_ROOT/opt/rtems/@target_alias@/bin
make prefix=$RPM_BUILD_ROOT/opt/rtems install
cd @target_alias@/newlib
make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
# cd back to build/
cd ../..
# gzip info files
gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null
gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-? 2>/dev/null
gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-?? 2>/dev/null
rm -f dirs ;
echo "%dir /opt/rtems/lib" >> dirs ;
echo "%dir /opt/rtems/lib/gcc-lib" >> dirs ;
echo "%dir /opt/rtems/lib/gcc-lib/@target_alias@" >> dirs ;
# Collect multilib subdirectories
TGTDIR="$RPM_BUILD_ROOT/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@"
find $TGTDIR \
\( -type d -a ! -path "$TGTDIR/include*" \) -print | \
sed -e "s,^$RPM_BUILD_ROOT,%dir ,g" >> dirs
# Collect files to go into different packages
cp dirs files.chill
cp dirs files.gcc
cp dirs files.g77
cp dirs files.objc
cp dirs files.gcj
f=`find $TGTDIR ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
for i in $f; do
case $i in
*chill*) echo "$i" >> files.chill ;;
*f771) ;;
*cc1obj) ;;
*libobjc*) echo "$i" >> files.objc ;;
*include/objc*) ;;
*jc1) ;;
*jvgenmain) ;;
*) echo "$i" >> files.gcc ;;
esac
done
%files -n @target_alias@-gcc -f build/files.gcc
%dir /opt/rtems/info
%doc /opt/rtems/info/dir
%doc /opt/rtems/info/cpp.info*
%doc /opt/rtems/info/gcc.info*
%doc /opt/rtems/info/libc.info*
%doc /opt/rtems/info/libm.info*
%dir /opt/rtems/man
%dir /opt/rtems/man/man1
%doc /opt/rtems/man/man1/cccp.1
%doc /opt/rtems/man/man1/@target_alias@-gcc.1
%doc /opt/rtems/man/man1/@target_alias@-g++.1
%dir /opt/rtems/bin
/opt/rtems/bin/cpp
/opt/rtems/bin/gcov
/opt/rtems/bin/@target_alias@-c++
/opt/rtems/bin/@target_alias@-g++
/opt/rtems/bin/@target_alias@-gcc
/opt/rtems/bin/@target_alias@-protoize
/opt/rtems/bin/@target_alias@-unprotoize
%dir /opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include
%dir /opt/rtems/include
/opt/rtems/include/g++-3
/opt/rtems/@target_alias@
%post -n @target_alias@-gcc
if test -d $RPM_INSTALL_PREFIX/rtems/info;
then
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
test -n "$f" && for i in $f; do
install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
done
fi
%postun -n @target_alias@-gcc
if test -d $RPM_INSTALL_PREFIX/rtems/info;
then
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
test -n "$f" && for i in $f; do
install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
done
fi
%files -n @target_alias@-chill -f build/files.chill
%dir /opt/rtems/bin
/opt/rtems/bin/@target_alias@-chill
%dir /opt/rtems/info
%doc /opt/rtems/info/dir
%doc /opt/rtems/info/chill.info*
%post -n @target_alias@-chill
if test -d $RPM_INSTALL_PREFIX/rtems/info;
then
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
test -n "$f" && for i in $f; do
install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
done
fi
%postun -n @target_alias@-chill
if test -d $RPM_INSTALL_PREFIX/rtems/info;
then
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
test -n "$f" && for i in $f; do
install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
done
fi
%files -n @target_alias@-gcj -f build/files.gcj
%dir /opt/rtems/bin
/opt/rtems/bin/jcf-dump
/opt/rtems/bin/jv-scan
/opt/rtems/bin/gcjh
/opt/rtems/bin/@target_alias@-gcj
/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/jc1
/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/jvgenmain
%files -n @target_alias@-g77 -f build/files.g77
%dir /opt/rtems/bin
/opt/rtems/bin/@target_alias@-g77
%dir /opt/rtems/info
%doc /opt/rtems/info/g77.info*
%dir /opt/rtems/man
%dir /opt/rtems/man/man1
%doc /opt/rtems/man/man1/@target_alias@-g77.1
/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/f771
%post -n @target_alias@-g77
if test -d $RPM_INSTALL_PREFIX/rtems/info;
then
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
test -n "$f" && for i in $f; do
install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
done
fi
%postun -n @target_alias@-g77
if test -d $RPM_INSTALL_PREFIX/rtems/info;
then
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
f=`find $RPM_INSTALL_PREFIX/rtems/info -name '*.info.gz'`
test -n "$f" && for i in $f; do
install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir
done
fi
%files -n @target_alias@-objc -f build/files.objc
/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/cc1obj
/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include/objc

View File

@@ -0,0 +1,62 @@
#!/bin/sh
#
# Usage: mktoolspec CPU
#
RTEMS_DIR=`dirname $0`/@top_srcdir@
CFG=setup.cache
dst=@RPM_SPECSdir@
usage()
{
echo "$0 [options] <target_alias>"
echo " options:"
echo " -cfg <setup.cache>"
echo " -o <rpm-spec-dir>"
exit 1 ;
}
while test $# -ge 2; do
case $1 in
-cfg)
shift
CFG=$1
shift
;;
-o)
shift
dst=$1
shift
;;
-*)
echo "invalid option $1";
usage
;;
esac
done
if test ! $# -eq 1;
then
echo "Invalid number of arguments"
usage
fi
# target to build for
target_alias=$1
. ./$CFG
specfile=${dst}/$target_alias-gcc-${gcc_version}-newlib-${newlib_version}.spec
sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
-e "s%@target_alias@%${target_alias}%g" \
-e "s%@rpm_build_root@%${rpm_build_root}%g" \
-e "s%@gcc_version@%${gcc_version}%g" \
-e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
-e "s%@newlib_version@%${newlib_version}%g" \
-e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
< ${RTEMS_DIR}/gccnewlib/gccnewlib.spec.in \
> ${specfile}
echo Generated ${specfile}.