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

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /or1k/trunk/rtems/scripts
    from Rev 208 to Rev 1765
    Reverse comparison

Rev 208 → Rev 1765

/mkinstalldirs
0,0 → 1,40
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
 
# $Id: mkinstalldirs,v 1.2 2001-09-27 12:02:52 chris Exp $
 
errstatus=0
 
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
 
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
 
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
 
mkdir "$pathcomp" || lasterr=$?
 
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
 
pathcomp="$pathcomp/"
done
done
 
exit $errstatus
 
# mkinstalldirs ends here
mkinstalldirs Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: configure.in =================================================================== --- configure.in (nonexistent) +++ configure.in (revision 1765) @@ -0,0 +1,72 @@ +## $Id: configure.in,v 1.2 2001-09-27 12:02:52 chris Exp $ + +AC_INIT(binutils) +AM_INIT_AUTOMAKE(rtems-scripts,20000610-0,no) + +AC_EXEEXT + +test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache +. ./setup.cache + +# Some linux distributions use /usr/src/packages +# redhat uses /usr/src/redhat +# others might use /usr/src +AC_MSG_CHECKING(for rpm SPECS directory) +if test -d /usr/src/packages/SPECS; +then + RPM_SPECSdir=/usr/src/packages/SPECS; +elif test -d /usr/src/redhat/SPECS; +then + RPM_SPECSdir=/usr/src/redhat/SPECS; +elif test -d /usr/src/SPECS/; +then + RPM_SPECSdir=/usr/src/SPECS; +elif test -d /usr/local/src/redhat/SPECS/; +then + RPM_SPECSdir=/usr/local/src/redhat/SPECS; +fi +if test x"$RPM_SPECSdir" = x"" ; then +AC_MSG_ERROR(not found) +fi +AC_MSG_RESULT($RPM_SPECSdir) +AC_SUBST(RPM_SPECSdir) + +AC_CANONICAL_HOST + +AC_MSG_CHECKING(for RPM CPU type) +changequote(,)dnl +case "${host}" in + i[34567]86-*linux*) RPM_CPU=i386 ;; + i[34567]86-pc-cygwin*) RPM_CPU=i386 ;; + sparc-sun-solaris*) RPM_CPU=sparc ;; + *) + AC_MSG_ERROR(RPM CPU for ${target} is unknown) + ;; +esac +changequote([,])dnl +AC_MSG_RESULT($RPM_CPU) + +GCCNEWLIBVERS="gcc-${gcc_version}-newlib-${newlib_version}" +AC_SUBST(GCCNEWLIBVERS) +BINUTILSVERS="binutils-${binutils_version}" +AC_SUBST(BINUTILSVERS) +GDBVERS="gdb-${gdb_version}" +AC_SUBST(GDBVERS) +BSPVERS="${rtems_version}" +AC_SUBST(RTEMS_VERSION) +AC_SUBST(BSPVERS) +AC_SUBST(RPM_CPU) + +AC_OUTPUT( +Makefile +buildall +mkbinutilspec +mkgccnewlibspec +mkgdbspec +mkbspspec +binutils/Makefile +gccnewlib/Makefile +gdb/Makefile +rtems/Makefile,, +chmod 755 buildall +) Index: binutils/Makefile.am =================================================================== --- binutils/Makefile.am (nonexistent) +++ binutils/Makefile.am (revision 1765) @@ -0,0 +1,59 @@ +## +## $Id: Makefile.am,v 1.2 2001-09-27 12:02:52 chris Exp $ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +MKBINUTILSSPEC = $(SHELL) $(top_builddir)/mkbinutilspec + +SUBPACKAGES = binutils.add \ + base-binutils.add target-binutils.add + +binutils.spec.in: $(SUBPACKAGES) + cat $^ > $@ +CLEANFILES += binutils.spec.in + +MKBINUTILSSPEC_DEPS = $(top_builddir)/mkbinutilspec binutils.spec.in \ + $(top_builddir)/setup.cache + +hppa1.1-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . hppa1.1-rtems + +i386-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . i386-rtems + +i960-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . i960-rtems + +m68k-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtems + +m68k-rtemself-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtemself + +mips64orion-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . mips64orion-rtems + +powerpc-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . powerpc-rtems + +sh-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtems + +sh-rtemself-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtemself + +sparc-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS) + $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache -o . sparc-rtems + +RPM_SPECS_DATA = hppa1.1-rtems-$(BINUTILSVERS).spec \ + i386-rtems-$(BINUTILSVERS).spec i960-rtems-$(BINUTILSVERS).spec \ + m68k-rtems-$(BINUTILSVERS).spec m68k-rtemself-$(BINUTILSVERS).spec \ + mips64orion-rtems-$(BINUTILSVERS).spec \ + powerpc-rtems-$(BINUTILSVERS).spec sh-rtems-$(BINUTILSVERS).spec \ + sh-rtemself-$(BINUTILSVERS).spec sparc-rtems-$(BINUTILSVERS).spec +CLEANFILES += $(RPM_SPECS_DATA) + +EXTRA_DIST = $(SUBPACKAGES) + +include $(top_srcdir)/../automake/local.am Index: binutils/binutils.add =================================================================== --- binutils/binutils.add (nonexistent) +++ binutils/binutils.add (revision 1765) @@ -0,0 +1,93 @@ +# +# spec file for binutils package targetting rtems +# +# Copyright (c) 1999,2000 OARCorp, Huntsville, AL +# +# please send bugfixes or comments to joel@OARcorp.com +# + +Vendor: OAR Corporation +Distribution: Linux +Name: @target_alias@-binutils-collection +Summary: binutils for target @target_alias@ +Group: rtems +Release: @Release@ +License: GPL/LGPL + +Autoreqprov: off +Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com +Prefix: /opt +BuildRoot: /tmp/@target_alias@-binutils + +Version: @binutils_version@ +Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-@binutils_version@.tar.gz +Patch0: binutils-@binutils_version@-rtems-@binutils_patch_version@.diff +# +# 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 + +%description + +RTEMS is an open source operating system for embedded systems. + +This is binutils sources with patches for RTEMS. + +%prep +# untar the sources inside @target_alias@-binutils +%setup -c -n @target_alias@-binutils -a 0 + +%patch0 -p0 + test -d build || mkdir build + +%build + cd build + ../binutils-@binutils_version@/configure --target=@target_alias@ \ + --verbose --prefix=/opt/rtems + + make all + make info + + +%install + cd build + make prefix=$RPM_BUILD_ROOT/opt/rtems install + make prefix=$RPM_BUILD_ROOT/opt/rtems install-info +# A bug in binutils: binutils does not install share/locale +# however it uses it + ../binutils-@binutils_version@/mkinstalldirs \ + $RPM_BUILD_ROOT/opt/rtems/share/locale + +# 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 + + if test -f $RPM_BUILD_ROOT/opt/rtems/info/configure.info.gz; + then +# These are only present in binutils >= 2.9.5 + find $RPM_BUILD_ROOT/opt/rtems/info -name 'configure.*' | \ + sed -e "s,^$RPM_BUILD_ROOT,,g" > ../files + else + touch ../files + fi + +# We assume that info/dir exists when building the RPMs + rm -f $RPM_BUILD_ROOT/opt/rtems/info/dir + f=`find $RPM_BUILD_ROOT/opt/rtems/info -name '*.info.gz'` + test x"$f" != x"" && for i in $f; do + install-info $i $RPM_BUILD_ROOT/opt/rtems/info/dir + done + +%clean +# let rpm --clean remove BuildRoot iif using the default BuildRoot + test "$RPM_BUILD_ROOT" = "/tmp/@target_alias@-binutils" && \ + rm -rf $RPM_BUILD_ROOT + Index: binutils/target-binutils.add =================================================================== --- binutils/target-binutils.add (nonexistent) +++ binutils/target-binutils.add (revision 1765) @@ -0,0 +1,46 @@ +# ============================================================== +# @target_alias@-binutils +# ============================================================== +%package -n @target_alias@-binutils +Provides: @target_alias@-binutils +Summary: rtems binutils for @target_alias@ +Group: rtems +Requires: rtems-base-binutils +Autoreqprov: off + +%description -n @target_alias@-binutils + +RTEMS is an open source operating system for embedded systems. + +This is the GNU binutils for RTEMS targetting @target_alias@. + +%files -n @target_alias@-binutils +%doc /opt/rtems/man/man1/@target_alias@-*.1 + +%dir /opt/rtems/bin +/opt/rtems/bin/@target_alias@-addr2line@exe_ext@ +/opt/rtems/bin/@target_alias@-ar@exe_ext@ +/opt/rtems/bin/@target_alias@-as@exe_ext@ +/opt/rtems/bin/@target_alias@-c++filt@exe_ext@ +/opt/rtems/bin/@target_alias@-gasp@exe_ext@ +/opt/rtems/bin/@target_alias@-ld@exe_ext@ +/opt/rtems/bin/@target_alias@-nm@exe_ext@ +/opt/rtems/bin/@target_alias@-objcopy@exe_ext@ +/opt/rtems/bin/@target_alias@-objdump@exe_ext@ +/opt/rtems/bin/@target_alias@-ranlib@exe_ext@ +/opt/rtems/bin/@target_alias@-readelf@exe_ext@ +/opt/rtems/bin/@target_alias@-size@exe_ext@ +/opt/rtems/bin/@target_alias@-strings@exe_ext@ +/opt/rtems/bin/@target_alias@-strip@exe_ext@ + +%dir /opt/rtems/@target_alias@ +%dir /opt/rtems/@target_alias@/bin +/opt/rtems/@target_alias@/bin/ar@exe_ext@ +/opt/rtems/@target_alias@/bin/as@exe_ext@ +/opt/rtems/@target_alias@/bin/ld@exe_ext@ +/opt/rtems/@target_alias@/bin/nm@exe_ext@ +/opt/rtems/@target_alias@/bin/ranlib@exe_ext@ +/opt/rtems/@target_alias@/bin/strip@exe_ext@ + +%dir /opt/rtems/@target_alias@/lib +/opt/rtems/@target_alias@/lib/ldscripts Index: binutils/base-binutils.add =================================================================== --- binutils/base-binutils.add (nonexistent) +++ binutils/base-binutils.add (revision 1765) @@ -0,0 +1,64 @@ +# ============================================================== +# rtems-base-binutils +# ============================================================== +%package -n rtems-base-binutils +Provides: rtems-base-binutils +Summary: base package for rtems binutils +Group: rtems + +%description -n rtems-base-binutils + +RTEMS is an open source operating system for embedded systems. + +This is the base for binutils regardless of target CPU. + +%post -n rtems-base-binutils + 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 x"$f" != x"" && for i in $f; do + install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir + done + fi + +%postun -n rtems-base-binutils + 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 x"$f" != x"" && for i in $f; do + install-info $i $RPM_INSTALL_PREFIX/rtems/info/dir + done + fi + +%files -n rtems-base-binutils -f files +%dir /opt/rtems/info +%doc /opt/rtems/info/dir +%doc /opt/rtems/info/as.info.gz +%doc /opt/rtems/info/as.info-?.gz +%doc /opt/rtems/info/bfd.info.gz +%doc /opt/rtems/info/bfd.info-?.gz +%doc /opt/rtems/info/binutils.info.gz +%doc /opt/rtems/info/binutils.info-?.gz +%doc /opt/rtems/info/ld.info.gz +%doc /opt/rtems/info/ld.info-?.gz +%doc /opt/rtems/info/gasp.info.gz +%doc /opt/rtems/info/standards.info.gz + +%dir /opt/rtems/man +%dir /opt/rtems/man/man1 + +%dir /opt/rtems/include +/opt/rtems/include/bfd.h +/opt/rtems/include/ansidecl.h +/opt/rtems/include/bfdlink.h + +%dir /opt/rtems/lib +/opt/rtems/lib/libbfd* +/opt/rtems/lib/libiberty* +/opt/rtems/lib/libopcodes* + +%dir /opt/rtems/share +%dir /opt/rtems/share/locale + Index: binutils =================================================================== --- binutils (nonexistent) +++ binutils (revision 1765)
binutils Property changes : Added: svn:ignore ## -0,0 +1,5 ## +*.spec +Makefile +Makefile.in +binutils.spec +binutils.spec.in Index: rtems/Makefile.am =================================================================== --- rtems/Makefile.am (nonexistent) +++ rtems/Makefile.am (revision 1765) @@ -0,0 +1,57 @@ +## +## $Id: Makefile.am,v 1.2 2001-09-27 12:02:52 chris Exp $ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +MKBSPSPEC = $(SHELL) $(top_builddir)/mkbspspec + +MKBSPSPEC_DEPS = $(top_builddir)/mkbspspec rtems.spec.in \ + $(top_builddir)/setup.cache + +hppa1.1-rtems-simhppa-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . hppa1.1-rtems simhppa + +i386-rtems-pc386-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . i386-rtems pc386 + +i960-rtems-cvme961-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . i960-rtems cvme961 + +m68k-rtems-gen68360-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtems gen68360 + +m68k-rtemself-gen68360-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtemself gen68360 + +mips64orion-rtems-p4600-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . mips64orion-rtems p4600 + +powerpc-rtems-mcp750-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . powerpc-rtems mcp750 + +sh-rtems-gensh1-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtems gensh1 + +sh-rtemself-gensh1-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtemself gensh1 + +sparc-rtems-erc32-$(BSPVERS).spec: $(MKBSPSPEC_DEPS) + $(MKBSPSPEC) -cfg $(top_builddir)/setup.cache -o . sparc-rtems erc32 + +TEMPLATES = rtems.spec.in + +RPM_SPECS_DATA = hppa1.1-rtems-simhppa-$(BSPVERS).spec \ + i386-rtems-pc386-$(BSPVERS).spec i960-rtems-cvme961-$(BSPVERS).spec \ + m68k-rtems-gen68360-$(BSPVERS).spec \ + m68k-rtemself-gen68360-$(BSPVERS).spec \ + mips64orion-rtems-p4600-$(BSPVERS).spec \ + powerpc-rtems-mcp750-$(BSPVERS).spec sh-rtems-gensh1-$(BSPVERS).spec \ + sh-rtemself-gensh1-$(BSPVERS).spec sparc-rtems-erc32-$(BSPVERS).spec + +noinst_DATA = $(TEMPLATES) + +EXTRA_DIST = $(TEMPLATES) + +CLEANFILES = $(RPM_SPECS_DATA) +include $(top_srcdir)/../automake/local.am Index: rtems/rtems.spec.in =================================================================== --- rtems/rtems.spec.in (nonexistent) +++ rtems/rtems.spec.in (revision 1765) @@ -0,0 +1,95 @@ +# +# spec file for package rtems +# +# Copyright (c) 1999 OARCorp, Huntsville, AL +# +# please send bugfixes or comments to joel@OARcorp.com +# + +Vendor: OAR Corporation +Distribution: Linux +Name: rtems-@target_alias@-@bsp@ +Release: @Release@ +License: GPL with special exception for linking with application program +Group: unsorted +Provides: rtems-@target_alias@-@bsp@ + +Autoreqprov: on +Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com +Requires: @target_alias@-binutils +Requires: @target_alias@-gcc + +Version: @rtems_version@ +Summary: A free operating system for embedded systems +Source: rtems-@rtems_version@.tar.gz +# +# 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 +# We claim to be relocatible, but in fact we are not +Prefix: /opt +Buildroot: @rpm_build_root@ + +%description +RTEMS is a free operating system for embedded systems. + +Authors: +-------- + Joel Sherrill (joel@oarcorp.com) + ... + +%prep +# untar the sources inside rtems-@target_alias@-@bsp@-@rtems_version@ +%setup -c -n rtems-@target_alias@-@bsp@-@rtems_version@ +# no patch needed +# %patch +%build +# rtems does not support building inside the source tree + if test ! -f rtems-@rtems_version@/configure; + then + ( cd rtems-@rtems_version@; ./bootstrap ) + fi + ./rtems-@rtems_version@/configure \ + --target=@target_alias@ \ + --prefix=/opt/rtems/@target_alias@ \ + --enable-networking \ + --enable-posix \ + --enable-cxx \ + --disable-tests \ + --enable-rdbg \ + --disable-multiprocessing \ + --disable-itron + make RTEMS_BSP=@bsp@ +%install + make RTEMS_BSP=@bsp@ prefix=$RPM_BUILD_ROOT/opt/rtems/@target_alias@ install + find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/@bsp@ -type d | \ + sed "s,^$RPM_BUILD_ROOT,%dir ,g" > files + find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/@bsp@ -type f | \ + sed "s,^$RPM_BUILD_ROOT,,g" >> files + find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/make -type d | \ + sed "s,^$RPM_BUILD_ROOT,%dir ,g" >> files + find $RPM_BUILD_ROOT/opt/rtems/@target_alias@/make -type f | \ + sed "s,^$RPM_BUILD_ROOT,,g" >> files + +%post + if test "$RPM_INSTALL_PREFIX" != "/opt/"; + then + if test -f $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg; + then + sed -e 's,/opt/rtems/,$RPM_INSTALL_PREFIX/rtems,g' \ + < $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg \ + > $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg~ + mv $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg~ \ + $RPM_INSTALL_PREFIX/rtems/@target_alias@/make/target.cfg + fi + fi + +%files -f files Index: rtems =================================================================== --- rtems (nonexistent) +++ rtems (revision 1765)
rtems Property changes : Added: svn:ignore ## -0,0 +1,4 ## +*.spec +Makefile +Makefile.in +rtems.spec Index: gdb/Makefile.am =================================================================== --- gdb/Makefile.am (nonexistent) +++ gdb/Makefile.am (revision 1765) @@ -0,0 +1,57 @@ +## +## $Id: Makefile.am,v 1.2 2001-09-27 12:02:52 chris Exp $ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +MKGDBSPEC = $(SHELL) $(top_builddir)/mkgdbspec + +SUBPACKAGES = gdb.add base-gdb.add target-gdb.add + +gdb.spec.in: $(SUBPACKAGES) + cat $^ > $@ +CLEANFILES += gdb.spec.in + +MKGDBSPEC_DEPS = $(top_builddir)/mkgdbspec gdb.spec.in \ + $(top_builddir)/setup.cache + +hppa1.1-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . hppa1.1-rtems + +i386-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . i386-rtems + +i960-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . i960-rtems + +m68k-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtems + +m68k-rtemself-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtemself + +mips64orion-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . mips64orion-rtems + +powerpc-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . powerpc-rtems + +sh-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtems + +sh-rtemself-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtemself + +sparc-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS) + $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . sparc-rtems + +RPM_SPECS_DATA = hppa1.1-rtems-$(GDBVERS).spec i386-rtems-$(GDBVERS).spec \ + i960-rtems-$(GDBVERS).spec m68k-rtems-$(GDBVERS).spec \ + m68k-rtemself-$(GDBVERS).spec mips64orion-rtems-$(GDBVERS).spec \ + powerpc-rtems-$(GDBVERS).spec sh-rtems-$(GDBVERS).spec \ + sh-rtemself-$(GDBVERS).spec sparc-rtems-$(GDBVERS).spec +CLEANFILES += $(RPM_SPECS_DATA) + +EXTRA_DIST = $(SUBPACKAGES) + +include $(top_srcdir)/../automake/local.am Index: gdb/gdb.add =================================================================== --- gdb/gdb.add (nonexistent) +++ gdb/gdb.add (revision 1765) @@ -0,0 +1,75 @@ +# +# spec file for package rtems +# +# Copyright (c) 1999 OARCorp, Huntsville, AL +# +# please send bugfixes or comments to joel@OARcorp.com +# + +# neededforbuild -- nothing + +Vendor: OAR Corporation +Distribution: Linux +Name: @target_alias@-gdb-collection +Release: @Release@ +License: GPL/LGPL +Group: rtems + +Autoreqprov: on +Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com + +Version: @gdb_version@ +Summary: gdb for target @target_alias@ +Source0: ftp://ftp.gnu.org/pub/gnu/gdb-@gdb_version@.tar.gz +Patch0: gdb-@gdb_version@-rtems-@gdb_patch_version@.diff +Buildroot: /tmp/@target_alias@-gdb + +# +# 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 + + +%description +RTEMS is an open source operating system for embedded systems. + +This is the GNU gdb for RTEMS targetting @target_alias@. + +%prep +echo RPM_BUILD_ROOT=${RPM_BUILD_ROOT} +# untar the sources inside @target_alias@-gdb +%setup -c -n @target_alias@-gdb -a 0 + +%patch0 -p0 + +%build +test -d build || mkdir build + cd build + ../gdb-@gdb_version@/configure --target=@target_alias@ \ + --verbose --prefix=/opt/rtems @extra_configure_arguments@ + + make all + make info + +%install + cd build + make prefix=$RPM_BUILD_ROOT/opt/rtems install + make prefix=$RPM_BUILD_ROOT/opt/rtems install-info + + # 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 + +%clean +# let rpm --clean remove BuildRoot iif using the default BuildRoot + test "$RPM_BUILD_ROOT" = "/tmp/@target_alias@-gdb" && \ + rm -rf $RPM_BUILD_ROOT Index: gdb/target-gdb.add =================================================================== --- gdb/target-gdb.add (nonexistent) +++ gdb/target-gdb.add (revision 1765) @@ -0,0 +1,21 @@ +# ===================================================================== +# @target_alias@-gdb +# ===================================================================== + +%package -n @target_alias@-gdb +Provides: @target_alias@-gdb +Summary: rtems gdb for @target_alias@ +Group: rtems +Requires: rtems-base-gdb + +%description -n @target_alias@-gdb + +RTEMS is an open source operating system for embedded systems. + +This is the GNU gdb for RTEMS targetting @target_alias@. + +%files -n @target_alias@-gdb +%doc /opt/rtems/man/man1/@target_alias@-gdb.1 + +%dir /opt/rtems/bin +/opt/rtems/bin/@target_alias@-gdb@exe_ext@ Index: gdb/base-gdb.add =================================================================== --- gdb/base-gdb.add (nonexistent) +++ gdb/base-gdb.add (revision 1765) @@ -0,0 +1,55 @@ +# ===================================================================== +# rtems-base-gdb +# ===================================================================== + +%package -n rtems-base-gdb +Provides: rtems-base-gdb +Summary: base package for rtems gdb +Group: rtems + +%description -n rtems-base-gdb + +RTEMS is an open source operating system for embedded systems. + +This is the base for gdb regardless of target CPU. + +%files -n rtems-base-gdb + +%dir /opt/rtems/info +%doc /opt/rtems/info/gdb.info* +%doc /opt/rtems/info/mmalloc.info* +%doc /opt/rtems/info/readline.info* + +%dir /opt/rtems/man +%dir /opt/rtems/man/man1 + +%dir /opt/rtems/include +# We install libbfd from binutils +# /opt/rtems/include/bfd.h +# /opt/rtems/include/bfdlink.h + +%dir /opt/rtems/lib +# We install libbfd from binutils +# /opt/rtems/lib/libbfd* +# We use libiberty from gcc +# /opt/rtems/lib/libiberty* + +%post -n rtems-base-gdb + 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 rtems-base-gdb + 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 Index: gdb =================================================================== --- gdb (nonexistent) +++ gdb (revision 1765)
gdb Property changes : Added: svn:ignore ## -0,0 +1,5 ## +*.spec +Makefile +Makefile.in +gdb.spec +gdb.spec.in Index: gccnewlib/Makefile.am =================================================================== --- gccnewlib/Makefile.am (nonexistent) +++ gccnewlib/Makefile.am (revision 1765) @@ -0,0 +1,73 @@ +## +## $Id: Makefile.am,v 1.2 2001-09-27 12:02:52 chris Exp $ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +MKGCCNEWLIBSPEC = $(SHELL) $(top_builddir)/mkgccnewlibspec + +SUBPACKAGES = gccnewlib.add \ + base-gcc.add target-gcc.add \ + base-chill.add target-chill.add \ + base-g77.add target-g77.add \ + base-gcj.add target-gcj.add \ + target-objc.add + +gccnewlib.spec.in: $(SUBPACKAGES) + cat $^ \ + | sed -e 's%@GCCLANGS@%%g' > $@ +CLEANFILES += gccnewlib.spec.in + +gccnewlib_c_only.spec.in: gccnewlib.add base-gcc.add target-gcc.add + cat $^ \ + | sed -e "s%@GCCLANGS@%\'--enable-languages=c,c++\'%g" > $@ +CLEANFILES += gccnewlib_c_only.spec.in + +C_ONLY_ARG = -a $(top_builddir)/gccnewlib/gccnewlib_c_only.spec.in + +MKGCCNEWLIBSPEC_DEPS = $(top_builddir)/mkgccnewlibspec gccnewlib.spec.in \ + $(top_builddir)/setup.cache +MKGCCNEWLIB_C_ONLY_SPEC_DEPS = $(top_builddir)/mkgccnewlibspec \ + gccnewlib_c_only.spec.in $(top_builddir)/setup.cache + +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: $(MKGCCNEWLIB_C_ONLY_SPEC_DEPS) + $(MKGCCNEWLIBSPEC) $(C_ONLY_ARG) -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 + +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 +CLEANFILES += $(RPM_SPECS_DATA) + +EXTRA_DIST = $(SUBPACKAGES) + +include $(top_srcdir)/../automake/local.am Index: gccnewlib/README =================================================================== --- gccnewlib/README (nonexistent) +++ gccnewlib/README (revision 1765) @@ -0,0 +1,8 @@ +# +# $Id: README,v 1.2 2001-09-27 12:02:52 chris Exp $ +# + +This directory contains RPM-spec file fragments (*.add) which are used to +compose the toolchain specs. + +Cf. Makefile.am for details on how the toolchain specs get composed. Index: gccnewlib/target-g77.add =================================================================== --- gccnewlib/target-g77.add (nonexistent) +++ gccnewlib/target-g77.add (revision 1765) @@ -0,0 +1,19 @@ +# ============================================================== +# @target_alias@-g77 +# ============================================================== +%package -n @target_alias@-g77 +Provides: @target_alias@-g77 +Summary: gcc/g77 compiler for @target_alias@ +Group: rtems +Requires: rtems-base-g77 @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@ + +%files -n @target_alias@-g77 -f build/files.g77 +%dir /opt/rtems/bin +/opt/rtems/bin/@target_alias@-g77@exe_ext@ + +/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/f771@exe_ext@ Index: gccnewlib/base-gcj.add =================================================================== --- gccnewlib/base-gcj.add (nonexistent) +++ gccnewlib/base-gcj.add (revision 1765) @@ -0,0 +1,20 @@ +# ============================================================== +# rtems-base-gcj +# ============================================================== +%package -n rtems-base-gcj +Provides: rtems-base-gcj +Summary: base package for rtems gcc/java compiler (gcj). +Group: rtems +Requires: rtems-base-gcc + +%description -n rtems-base-gcj +RTEMS is an open source operating system for embedded systems. + +This is the files for gcc/java (gcj) that are shared by all targets. + +%files -n rtems-base-gcj +%dir /opt/rtems/bin +/opt/rtems/bin/jcf-dump@exe_ext@ +/opt/rtems/bin/jv-scan@exe_ext@ +/opt/rtems/bin/gcjh@exe_ext@ + Index: gccnewlib/base-g77.add =================================================================== --- gccnewlib/base-g77.add (nonexistent) +++ gccnewlib/base-g77.add (revision 1765) @@ -0,0 +1,42 @@ +# ============================================================== +# rtems-base-g77 +# ============================================================== +%package -n rtems-base-g77 +Provides: rtems-base-g77 +Summary: rtems base package for gcc/g77 compiler +Group: rtems +Requires: rtems-base-gcc + +%description -n rtems-base-g77 +RTEMS is an open source operating system for embedded systems. + +This is the files for gcc/g77 that are shared by all targets. + +%files -n rtems-base-g77 +%dir /opt/rtems/info +%doc /opt/rtems/info/g77.info*.gz + +%dir /opt/rtems/man +%dir /opt/rtems/man/man1 +%doc /opt/rtems/man/man1/@target_alias@-g77.1 + +%post -n rtems-base-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 rtems-base-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 + Index: gccnewlib/gccnewlib.add =================================================================== --- gccnewlib/gccnewlib.add (nonexistent) +++ gccnewlib/gccnewlib.add (revision 1765) @@ -0,0 +1,138 @@ +# +# spec file for building gcc for rtems +# +# Copyright (c) 1999,2000 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@ +License: gcc is GPL/LGPL ; newlib no has restrictions on run-time usage + +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/@target_alias@-gcc-newlib + +# +# 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 +NoSource: 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|packages]/SOURCES directory ($RPM_SOURCE_DIR). + Or you can try the ftp options of rpm :-) + +%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 \ + --enable-threads --prefix=/opt/rtems @GCCLANGS@ + + make all + make info + +%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="/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@" + f=`gcc/xgcc --print-multi-lib | sed -e 's,;.*$,,'` + for i in $f; do + case $i in + \.) echo "%dir ${TGTDIR}" >> dirs + ;; + *) echo "%dir ${TGTDIR}/$i" >> dirs + ;; + esac + done + + # 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 ${RPM_BUILD_ROOT}${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 + +%clean +# let rpm --clean remove BuildRoot iif using the default BuildRoot + test "$RPM_BUILD_ROOT" = "/tmp/@target_alias@-gcc-newlib" && \ + rm -rf $RPM_BUILD_ROOT + Index: gccnewlib/target-chill.add =================================================================== --- gccnewlib/target-chill.add (nonexistent) +++ gccnewlib/target-chill.add (revision 1765) @@ -0,0 +1,18 @@ +# ============================================================== +# @target_alias@-chill +# ============================================================== +%package -n @target_alias@-chill +Provides: @target_alias@-chill +Summary: gcc/chill compiler for @target_alias@ +Group: rtems +Requires: rtems-base-chill @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@ + +%files -n @target_alias@-chill -f build/files.chill +%dir /opt/rtems/bin +/opt/rtems/bin/@target_alias@-chill + Index: gccnewlib/target-gcc.add =================================================================== --- gccnewlib/target-gcc.add (nonexistent) +++ gccnewlib/target-gcc.add (revision 1765) @@ -0,0 +1,28 @@ +# ============================================================== +# @target_alias@-gcc +# ============================================================== +%package -n @target_alias@-gcc +Provides: @target_alias@-gcc +Summary: rtems gcc and newlib C Library for @target_alias@ +Group: rtems +Requires: @target_alias@-binutils rtems-base-gcc + +%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@. + +%files -n @target_alias@-gcc -f build/files.gcc +%doc /opt/rtems/man/man1/@target_alias@-gcc.1 +%doc /opt/rtems/man/man1/@target_alias@-g++.1 + +/opt/rtems/bin/@target_alias@-c++@exe_ext@ +/opt/rtems/bin/@target_alias@-g++@exe_ext@ +/opt/rtems/bin/@target_alias@-gcc@exe_ext@ +/opt/rtems/bin/@target_alias@-protoize@exe_ext@ +/opt/rtems/bin/@target_alias@-unprotoize@exe_ext@ + +%dir /opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include + +/opt/rtems/@target_alias@ + Index: gccnewlib/target-objc.add =================================================================== --- gccnewlib/target-objc.add (nonexistent) +++ gccnewlib/target-objc.add (revision 1765) @@ -0,0 +1,17 @@ +# ============================================================== +# @target_alias@-objc +# ============================================================== +%package -n @target_alias@-objc +Provides: @target_alias@-objc +Summary: gcc/objc compiler for @target_alias@ +Group: rtems +Requires: @target_alias@-gcc + +%description -n @target_alias@-objc +RTEMS is an open source operating system for embedded systems. + +This is the gcc/objc compiler for @target_alias@ + +%files -n @target_alias@-objc -f build/files.objc +/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/cc1obj@exe_ext@ +/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/include/objc Index: gccnewlib/base-chill.add =================================================================== --- gccnewlib/base-chill.add (nonexistent) +++ gccnewlib/base-chill.add (revision 1765) @@ -0,0 +1,38 @@ +# ============================================================== +# rtems-base-chill +# ============================================================== +%package -n rtems-base-chill +Provides: rtems-base-chill +Summary: base package for rtems gcc/chill compiler. +Group: rtems +Requires: rtems-base-gcc + +%description -n rtems-base-chill +RTEMS is an open source operating system for embedded systems. + +This is the files for gcc/chill that are shared by all targets. + +%files -n rtems-base-chill +%dir /opt/rtems/info +%doc /opt/rtems/info/chill.info*.gz + +%post -n rtems-base-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 rtems-base-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 + Index: gccnewlib/base-gcc.add =================================================================== --- gccnewlib/base-gcc.add (nonexistent) +++ gccnewlib/base-gcc.add (revision 1765) @@ -0,0 +1,52 @@ +# ============================================================== +# rtems-base-gcc +# ============================================================== +%package -n rtems-base-gcc +Provides: rtems-base-gcc +Summary: base package for rtems gcc and newlib C Library +Group: rtems + +%description -n rtems-base-gcc + +RTEMS is an open source operating system for embedded systems. + +This is the files for gcc and newlib that are shared by all targets. + +%files -n rtems-base-gcc +%dir /opt/rtems/info +%doc /opt/rtems/info/cpp.info*.gz +%doc /opt/rtems/info/gcc.info*.gz +%doc /opt/rtems/info/libc.info*.gz +%doc /opt/rtems/info/libm.info*.gz + +%dir /opt/rtems/bin +/opt/rtems/bin/cpp@exe_ext@ +/opt/rtems/bin/gcov@exe_ext@ + +%dir /opt/rtems/man +%dir /opt/rtems/man/man1 +%doc /opt/rtems/man/man1/cccp.1 + +%dir /opt/rtems/include +/opt/rtems/include/g++-3 + +%post -n rtems-base-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 rtems-base-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 + Index: gccnewlib/target-gcj.add =================================================================== --- gccnewlib/target-gcj.add (nonexistent) +++ gccnewlib/target-gcj.add (revision 1765) @@ -0,0 +1,21 @@ +# ============================================================== +# @target_alias@-gcj +# ============================================================== +%package -n @target_alias@-gcj +Provides: @target_alias@-gcj +Summary: gcc/java compiler (gcj) for @target_alias@ +Group: rtems +Requires: rtems-base-gcj @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@ + +%files -n @target_alias@-gcj -f build/files.gcj +%dir /opt/rtems/bin +/opt/rtems/bin/@target_alias@-gcj@exe_ext@ + +/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/jc1@exe_ext@ +/opt/rtems/lib/gcc-lib/@target_alias@/@gcc_version@/jvgenmain@exe_ext@ + Index: gccnewlib =================================================================== --- gccnewlib (nonexistent) +++ gccnewlib (revision 1765)
gccnewlib Property changes : Added: svn:ignore ## -0,0 +1,7 ## +*.spec +Makefile +Makefile.in +gccnewlib.spec +gccnewlib.spec.in +gccnewlib_c_only.spec +gccnewlib_c_only.spec.in Index: setup.def =================================================================== --- setup.def (nonexistent) +++ setup.def (revision 1765) @@ -0,0 +1,20 @@ +# +# RTEMS tools setup +# +# $Id: setup.def,v 1.2 2001-09-27 12:02:52 chris Exp $ +# +binutils_version=2.9.5.0.24 +binutils_patch_version=20000207 +binutils_rpm_release=1 +newlib_version=1.8.2 +newlib_patch_version=20000606 +gcc_version=2.95.2 +gcc_patch_version=20000531 +gccnewlib_rpm_release=7 +gdb_version=4.18 +gdb_patch_version=20000524 +gdb_rpm_release=4 +# RTEMS version is unused as RTEMS RPMS are not currently built. +rtems_version=rtems-4.5.0 +rtems_rpm_release=1 +rpm_build_root=/tmp Index: TODO =================================================================== --- TODO (nonexistent) +++ TODO (revision 1765) @@ -0,0 +1,7 @@ +# +# $Id: TODO,v 1.2 2001-09-27 12:02:52 chris Exp $ +# + +There is plenty left to do on this :) + + + Add GNAT/RTEMS version. Index: Makefile.am =================================================================== --- Makefile.am (nonexistent) +++ Makefile.am (revision 1765) @@ -0,0 +1,24 @@ +## +## $Id: Makefile.am,v 1.2 2001-09-27 12:02:52 chris Exp $ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +SUBDIRS = . binutils gccnewlib gdb rtems + +noinst_SCRIPTS = setup buildall mkbinutilspec mkbspspec mkgccnewlibspec \ + mkgdbspec mkrpms mkspec + +TEMPLATES = + +noinst_DATA = setup.def $(TEMPLATES) + +EXTRA_DIST = $(noinst_DATA) $(noinst_SCRIPTS) + +CONFIGURE_DEPENDENCIES = setup.cache +setup.cache: setup.def + cp setup.def $@ + +DISTCLEANFILES = setup.cache +include $(top_srcdir)/../automake/subdirs.am +include $(top_srcdir)/../automake/local.am Index: mkspec =================================================================== --- mkspec (nonexistent) +++ mkspec (revision 1765) @@ -0,0 +1,19 @@ +#!/bin/sh +# + +RTEMS_DIR=`dirname $0` +RTEMS_VERSION=`grep Version ${RTEMS_DIR}/../VERSION | \ +sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` + +target_alias=$1 +bsp=$2 +release=0 + +#${RTEMS_DIR}/scripts/mkbspspec $bsp $target_alias +#${RTEMS_DIR}/scripts/mkbinutilspec $target_alias +#${RTEMS_DIR}/scripts/mkgccnewlibspec $target_alias +#${RTEMS_DIR}/scripts/mkgdbspec $target_alias +./mkbinutilspec $target_alias +./mkgccnewlibspec $target_alias +./mkgdbspec $target_alias +
mkspec Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: mkbspspec.in =================================================================== --- mkbspspec.in (nonexistent) +++ mkbspspec.in (revision 1765) @@ -0,0 +1,62 @@ +#!/bin/sh +# + +RTEMS_DIR=`dirname $0`/@top_srcdir@ +RTEMS_VERSION=@RTEMS_VERSION@ + +CFG=setup.cache +dst=@RPM_SPECSdir@ +exe_ext=@EXEEXT@ + +usage() +{ + echo "$0 [options] " + echo " options:" + echo " -cfg " + echo " -o " + exit 1 ; +} + +while test $# -ge 3; do +case $1 in +-cfg) + shift + CFG=$1 + shift + ;; +-o) + shift + dst=$1 + shift + ;; +-*) + echo "invalid option $1"; + usage + ;; +esac +done + +if test ! $# -eq 2; +then + echo "Invalid number of arguments" + usage +fi + +# target to build for +target_alias=$1 +bsp=$2 + +. ./$CFG + +specfile=${dst}/$target_alias-$bsp-${rtems_version}.spec + +sed -e "s%@Release@%${rtems_rpm_release}%g" \ + -e "s%@bsp@%${bsp}%g" \ + -e "s%@rtems_version@%${rtems_version}%g" \ + -e "s%@rpm_build_root@%${rpm_build_root}%g" \ + -e "s%@target_alias@%${target_alias}%g" \ + -e "s%@exe_ext@%${exe_ext}%g" \ +< ${RTEMS_DIR}/rtems/rtems.spec.in \ +> ${specfile} + +echo Generated ${specfile} Index: buildall.in =================================================================== --- buildall.in (nonexistent) +++ buildall.in (revision 1765) @@ -0,0 +1,208 @@ +#! /bin/sh +# +# Generate all the specs and then cycle through building them. +# + +RTEMS_DIR=`dirname $0` +CFG=./setup.cache +dst=@RPM_SPECSdir@ +target=@target@ +rpm_cpu=@RPM_CPU@ + +usage() +{ + echo "$0 [options] " + echo " options:" + echo " -b -- build binutils" + echo " -g -- build gcc/newlib" + echo " -d -- build gdb" + echo " -t -- enable test/debug mode" + echo " -cfg " + echo " -o " + exit 1 ; +} + +testing=no +do_binutils=no +do_gccnewlib=no +do_gdb=no + +while test $# -ge 1; do + case $1 in + -b) do_binutils=yes ; shift;; + -g) do_gccnewlib=yes ; shift;; + -d) do_gdb=yes ; shift;; + -t) do_test=yes ; shift;; + -cfg) + test $# -ge 2 || usage + shift + CFG=$1 + shift + ;; + -o) + test $# -ge 2 || usage + shift + dst=$1 + shift + ;; + -*) + echo "invalid option $1"; + usage + ;; + *) + TARGETS="${TARGETS} $1" + shift + ;; + esac +done + +if test ${do_binutils} = no -a ${do_gccnewlib} = no -a ${do_gdb} = no ; then + echo "You must request building binutils, gcc/newlib, or gdb." + usage +fi + + +# This is the full list .. hppa1.1 does not build now. +#ALL_TARGETS="hppa1.1-rtems i386-rtems i960-rtems m68k-rtems \ +# m68k-rtemself mips64orion-rtems \ +# powerpc-rtems sh-rtems sh-rtemself sparc-rtems" + +# This is the full buildable set. +if [ "X${TARGETS}" = "X" ] ; then + TARGETS="i386-rtems i960-rtems m68k-rtems \ + mips64orion-rtems powerpc-rtems sh-rtems sparc-rtems" +fi + +. $CFG + +binutils=${binutils_version} +gcc=${gcc_version} +gdb=${gdb_version} +newlib=${newlib_version} +# also use binutils_rpm_release +buildroot=/tmp + +# +# Now get started +# +start=`date` + +echo PATH=$PATH + +if [ ${testing} = yes ] ; then + ECHO=echo +fi + +installed_count=`rpm -q -g rtems | wc -l` +if [ ${installed_count} -ne 0 ] ; then + echo This script should be run with NO rtems RPMs installed. + echo It appears that the following rtems RPMs are installed: + echo + rpm -qa | grep rtems + echo + echo Please remove these and restart this script. + exit 1 +fi + +echo Copying specs files. +if [ ${testing} = no ] ; then + cd ${RTEMS_DIR} + + # ./configure || exit 1 + make || exit 1 + + # Now generate all the specs + for target in ${TARGETS} + do + tspecs=`find . -name "${target}*"` + if [ "X${tspecs}" = "X" ] ; then + echo RPM specifications were not generated for ${tspec}. + exit 1 + fi + ${ECHO} cp -r ${tspecs} ${dst} + done +fi + +# clean up a bit before we start +cd ${dst} +test -d log || mkdir log + +# do all the tools +for target in ${TARGETS} +do + if [ ${do_binutils} = yes ] ; then + logfile=log/${target}-binutils + specfile=${dst}/${target}-binutils-${binutils}.spec + echo "rpm -ba ${specfile} >${logfile} 2>&1" + if [ ${testing} = no ] ; then + rpm -ba ${specfile} >${logfile} 2>&1 + fi + ${ECHO} rm -rf ${dst}/../BUILD/${target}-binutils* + ${ECHO} rm -rf ${buildroot}/opt/rtems + else + echo Skipping binutils for ${target} + fi + + # + # build gcc/newlib + # + + if [ ${do_gccnewlib} = yes ] ; then + # now build gcc/newlib + # NOTE: This requires having binutils installed and we immediately + # remove it once finished. + base_binutils_rpm=${dst}/../RPMS/${rpm_cpu}/rtems-base-binutils-${binutils}-${binutils_rpm_release}.${rpm_cpu}.rpm + binutils_rpm=${dst}/../RPMS/${rpm_cpu}/${target}-binutils-${binutils}-${binutils_rpm_release}.${rpm_cpu}.rpm + if [ ! -f ${binutils_rpm} ] ; then + echo There is no RPM for binutils for ${target}. + echo Looked for ${binutils_rpm}. + fi + ${ECHO} rpm -i ${base_binutils_rpm} + ${ECHO} rpm -i ${binutils_rpm} + + logfile=log/${target}-gccnewlib + specfile=${dst}/${target}-gcc-${gcc}-newlib-${newlib}.spec + echo "rpm -ba ${specfile} >${logfile} 2>&1" + if [ ${testing} = no ] ; then + rpm -ba ${specfile} >${logfile} 2>&1 + fi + ${ECHO} rm -rf ${dst}/../BUILD/${target}-gcc* + ${ECHO} rm -rf ${buildroot}/opt/rtems + + echo uninstalling binutils for ${target} + if [ ${testing} = no ] ; then + rpm -e `rpm -qa | grep rtems` + rm -rf /opt/rtems/* + fi + else + echo Skipping gcc/newlib for ${target} + fi + + # + # build gdb + # + + if [ ${do_gdb} = yes ] ; then + # now build gdb + logfile=log/${target}-gdb + specfile=${dst}/${target}-gdb-${gdb}.spec + echo "rpm -ba ${specfile} >${logfile} 2>&1" + if [ ${testing} = no ] ; then + rpm -ba ${specfile} >${logfile} 2>&1 + fi + ${ECHO} rm -rf ${dst}/../BUILD/${target}-gdb* + ${ECHO} rm -rf ${buildroot}/opt/rtems + else + echo Skipping gdb for ${target} + fi + +done + +# Now we are done + +stop=`date` + +echo +echo "Started: " $start +echo "Finished: " $stop +exit 0
buildall.in Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: README =================================================================== --- README (nonexistent) +++ README (revision 1765) @@ -0,0 +1,238 @@ + + RPM support for BSPs + ==================== + +Introduction +------------ + +Building an rpm requires to have a tar archive of the sources, and a +rpm-spec files specifying the details of building. + +To support per bsp rpms, one rpm-spec is used per BSP. +Instead of writing one rpm-spec for each BSP, I have written a shell script +(mkspec) which generates one *.spec (rtems--.spec) per BSP +bsp from an rpm-spec template (rtems.spec.in). + +A second shell script (mkrpms) is a convienience script which invokes a +sequence of building rpms for several bsps. + + +mkbinutilspec +------------- + +mkbinutilspec takes two arguments: + +$1 ... the target_alias for binutils RPMs of this toolset + +Invoking mkbinutilspec will generate a -binutils.spec either in + + /usr/src/packages/SPECS (SuSE convention) or + /usr/src/redhat/SPECS (Redhat convention) or + /usr/src/SPECS + +Eg. ./mkbinutilspec sparc-rtems generates + +On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-binutils.spec +On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-binutils.spec + +mkgccnewlibspec +--------------- + +mkgccnewlibspec takes two arguments: + +$1 ... the target_alias for the gcc/newlib RPMs of this toolset + +Invoking mkgccnewlibspec will generate a -gccnewlibs.spec +either in: + + /usr/src/packages/SPECS (SuSE convention) or + /usr/src/redhat/SPECS (Redhat convention) or + /usr/src/SPECS + +Eg. ./mkgccnewlibspec sparc-rtems generates + +On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec +On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-gcc_newlib.spec + +mkgdbspec +--------- + +mkgdbspec takes two arguments: + +$1 ... the target_alias for the gdb RPMs of this toolset + +Invoking mkgdbspec will generate a -gdb.spec +either in: + + /usr/src/packages/SPECS (SuSE convention) or + /usr/src/redhat/SPECS (Redhat convention) or + /usr/src/SPECS + +Eg. ./mkgdbspec sparc-rtems generates + +On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec +On RedHat 6.0: /usr/src/redhat/SPECS/sparc-rtems-gcc_newlib.spec + + +# XXX BSPs not tested yet by Joel +# +# mkbspspec +# --------- +# +# mkbspspec takes two arguments: +# $1 ... the target_alias this bsp belongs to +# $2 ... the bsp to be built +# +# Invoking mkbspspec will generate a rtems--.spec either in +# /usr/src/packages/SPECS (SuSE convention) or +# /usr/src/redhat/SPECS (Redhat convention) or +# /usr/src/SPECS +# +# Eg. ./mkspec gensh1 sh-rtemself generates +# /usr/src/packages/SPECS/rtems-sh-rtemself-gensh1.spec on SuSE-6.2. + +mkspec +--------- + +mkspec takes two arguments: + +$1 ... the target_alias for the RPMs composing this toolset +$2 ... the bsp to be built + +Invoking mkspec will generate a set of spec files either in: + + /usr/src/packages/SPECS (SuSE convention) or + /usr/src/redhat/SPECS (Redhat convention) or + /usr/src/SPECS + +Eg. ./mkspec sparc-rtems erc32 generates + +On SuSE-6.2: /usr/src/packages/SPECS/sparc-rtems-binutils.spec + /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec + /usr/src/packages/SPECS/sparc-rtems-gdb.spec +On RedHat 6.0: /usr/src/packages/SPECS/sparc-rtems-binutils.spec + /usr/src/packages/SPECS/sparc-rtems-gcc_newlib.spec + /usr/src/packages/SPECS/sparc-rtems-gdb.spec + + +Building binutils-rpms +---------------------- + +0. Login as root. + +1. Install a tarball of the various tool sources (with the +version number attached!) to /usr/src/[packages|redhat]/SOURCES + + cd /usr/src/[packages|redhat]/SOURCES + cp .../binutils- . + cp .../binutils--rtems-.diff . + +2. Generate and install the required rpm-spec file[s] + +cd rtems-/scripts/ +mkbinutilspec + +where target_alias is of the form sparc-rtems or sh-rtems-elf. + +3. Build the rpms + +Building a binary rpm: + +rpm -bb /usr/src/[packages|redhat]/SPECS/rtems--binutils.spec + +Building a source and binary rpm +rpm -ba /usr/src/[packages|redhat]/SPECS/rtems--binutils.spec + +XXX Note: a BSP's src.rpm contains its spec-file and the tar-archive of the +sources (approx. 4-5MB per BSP). + +Building TOOL-rpms +------------------ + +0. Login as root. + +1. Install a tarball of the various tool sources (with the +version number attached!) to /usr/src/[packages|redhat]/SOURCES + + cd /usr/src/[packages|redhat]/SOURCES + cp .../binutils- . + cp .../gcc- . + cp .../newlib- . + +2. Generate and install the required rpm-spec file[s] + +cd rtems-/scripts/ +mktoolspec + +3. Build the rpms + +Building a binary rpm: +rpm -bb /usr/src/[packages|redhat]/SPECS/rtems-.spec + +Building a source and binary rpm +rpm -ba /usr/src/[packages|redhat]/SPECS/rtems-.spec + +XXX Note: a BSP's src.rpm contains its spec-file and the tar-archive of the +sources (approx. 4-5MB per BSP). + +Building BSP-rpms +----------------- + +0. Login as root. + +1. Install a tarball of RTEMS's sources (with version number attached!) to +/usr/src/[packages|redhat]/SOURCES +Eg. +tar czvf /usr/src/packages/SOURCES/rtems-.tar.gz rtems- + +2. Generate and install the required rpm-spec file[s] +cd rtems-/scripts/ +mkspec + +3. Build the rpms +Building a binary rpm: +rpm -bb /usr/src/[packages|redhat]/SPECS/rtems--.spec + +Building a source and binary rpm +rpm -ba /usr/src/[packages|redhat]/SPECS/rtems--.spec + +Note: a BSP's src.rpm contains its spec-file and the tar-archive of the +sources (approx. 4-5MB per BSP). + +Known Bugs/Deficiencies +----------------------- + +* All files mentioned in here are in its early infancy ;-) + +* Building for a single bsp requires an own copy of the source tree inside +rpm's build directory. +* Building inside the RTEMS source tree doesn't work. +* Dependencies on toolchain-rpms not yet supported in rtems.spec.in. +* Installing multiple binary bsp rpms for the same target can cause +warnings from rpm, because these bsp-rpms share files. +* rtems.spec.in is prepared for rpm relocation support, but RTEMS is not +relocatible (yet?) +* rtems.spec.in deserves to be extended (description, authors etc) +* The final packaging stage to build a binary rpm takes an awful lot of +time - deserves to be investigated. +* Some RTEMS's cross executables (eg. hello.exe for sparc-rtems/erc32) cause +warnings from rpm and/or objdump. AFAIS, this is a bug in rpm. +* Probably many more ... + +* Last but not least: RTEMS should be split. + +Remarks +------- +* It would make sense to split RTEMS host/cross-tools and files depending on +the target only (/make/*.cfg -- Whow, RTEMS really has files +which depend on the target only :) into separate rpms. +* Instead of using a single rpm-spec for each bsp, RTEMS could also use a +single rpm-spec for all (or at least a given subset of all) bsps of a target. +* rpm -b[b|a] leaves its built trees unpacked in +/usr/src/[packages|redhat]/BUILD. Therefore you will rather soon run out of disc +space if not removing them. (Use rpm --clean -b[a|b] for cleaning them up +automatically after building) +* The size of binary rpms can differ up to one magnitude depending on the +target/bsp (eg. sh-rtems/gensh1 ~10MB vs. sh-rtemself/gensh1 ~32MB) + +Ralf Corsepius, 1999/10/14 Index: setup =================================================================== --- setup (nonexistent) +++ setup (revision 1765) @@ -0,0 +1,112 @@ +#!/bin/bash + +CFG=setup.cache + +# RTEMS tools setup + +if test ! -f ./$CFG; +then + echo -n "restoring default setup.cache .." + cp ./setup.def ./$CFG + echo " done" +fi + +echo -n "loading setup from ./$CFG .." +. ./$CFG +echo " done" +echo + +menu_setup() +{ +while true; +do + echo + echo " Source packages setup" + echo + echo "0 binutils version : $binutils_version" + echo "1 binutils patch version : $binutils_patch_version" + echo "2 binutils rpm release : $binutils_rpm_release" + echo "3 gcc version : $gcc_version" + echo "4 gcc patch version : $gcc_patch_version" + echo "5 newlib version : $newlib_version" + echo "6 newlib patch version : $newlib_patch_version" + echo "7 gcc/newlib rpm release : $gccnewlib_rpm_release" + echo "8 gdb version : $gdb_version" + echo "9 gdb patch version : $gdb_patch_version" + echo "a gdb rpm release : $gdb_rpm_release" + echo "b rtems version : $rtems_version" + echo "c rtems rpm release : $rtems_rpm_release" + echo "d rpm build root : $rpm_build_root" + echo + + echo -n "[0-9a-d] or any other key to quit >" + read sel + case $sel in + 0) echo -n "BINUTILS source >" + read binutils_version ;; + 1) echo -n "BINUTILS patch version >" + read binutils_patch_version ;; + 2) echo -n "BINUTILS RPM release >" + read binutils_rpm_release ;; + 3) echo -n "GCC source >" + read gcc_version ;; + 4) echo -n "GCC patch version>" + read gcc_patch_version ;; + 5) echo -n "NEWLIB source >" + read newlib_version ;; + 6) echo -n "NEWLIB patch version>" + read newlib_patch_version ;; + 7) echo -n "GCC/NEWLIB RPM release >" + read gccnewlib_rpm_release ;; + 8) echo -n "GDB source >" + read gdb_version ;; + 9) echo -n "GDB patch version>" + read gdb_patch_version ;; + a) echo -n "GDB RPM release >" + read gdb_rpm_release ;; + b) echo -n "RTEMS source >" + read rtems_version ;; + c) echo -n "RTEMS RPM release >" + read rtems_rpm_release ;; + d) echo -n "RPM build root >" + read rpm_build_root ;; + *) + return 0 ;; + esac +done +} + + +save_setup() +{ +echo -n "saving setup to $CFG .." + +echo "# RTEMS tools setup" > $CFG +echo "binutils_version=$binutils_version" >> $CFG +echo "binutils_patch_version=$binutils_patch_version" >> $CFG +echo "binutils_rpm_release=$binutils_rpm_release" >> $CFG +echo "newlib_version=$newlib_version" >> $CFG +echo "newlib_patch_version=$newlib_patch_version" >> $CFG +echo "gcc_version=$gcc_version" >> $CFG +echo "gcc_patch_version=$gcc_patch_version" >> $CFG +echo "gccnewlib_rpm_release=$gccnewlib_rpm_release" >> $CFG +echo "gdb_version=$gdb_version" >> $CFG +echo "gdb_patch_version=$gdb_patch_version" >> $CFG +echo "gdb_rpm_release=$gdb_rpm_release" >> $CFG +echo "rtems_version=$rtems_version" >> $CFG +echo "rtems_rpm_release=$rtems_rpm_release" >> $CFG +echo "rpm_build_root=$rpm_build_root" >> $CFG + +echo " done" +test -f Makefile || ./configure +} + +menu_setup + +echo +echo -n "Save setup [y|n] >" +read sel +case $sel in +''|y*|Y*) save_setup ;; +*) ;; +esac
setup Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: mkgdbspec.in =================================================================== --- mkgdbspec.in (nonexistent) +++ mkgdbspec.in (revision 1765) @@ -0,0 +1,88 @@ +#!/bin/sh +# +# Usage: mkgdbspec CPU +# + +RTEMS_DIR=`dirname $0`/@top_srcdir@ + +CFG=setup.cache +dst=@RPM_SPECSdir@ +exe_ext=@EXEEXT@ + +usage() +{ + echo "$0 [options] " + echo " options:" + echo " -cfg " + echo " -o " + 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-gdb-${gdb_version}.spec + +case ${target_alias} in + powerpc*) + 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 + # some gcc/hosts combinations to run out of memory. + # --enable-sim-inline + ;; + sparc*) + extra_configure_arguments="--enable-sim" + ;; + *) + ;; +esac + +sed -e "s%@Release@%${gdb_rpm_release}%g" \ + -e "s%@rpm_build_root@%${rpm_build_root}%g" \ + -e "s%@target_alias@%${target_alias}%g" \ + -e "s%@gdb_version@%${gdb_version}%g" \ + -e "s%@gdb_patch_version@%${gdb_patch_version}%g" \ + -e "s%@extra_configure_arguments@%${extra_configure_arguments}%g" \ + -e "s%@exe_ext@%${exe_ext}%g" \ +< ${RTEMS_DIR}/gdb/gdb.spec.in \ +> ${specfile} + +case ${target_alias} in + powerpc*) + echo "/opt/rtems/bin/${target_alias}-run${exe_ext}" + ;; + sparc*) + echo "/opt/rtems/bin/${target_alias}-run${exe_ext}" + echo "/opt/rtems/bin/${target_alias}-sis${exe_ext}" + ;; + *) ;; +esac >> ${specfile} + +echo Generated ${specfile} Index: mkgccnewlibspec.in =================================================================== --- mkgccnewlibspec.in (nonexistent) +++ mkgccnewlibspec.in (revision 1765) @@ -0,0 +1,71 @@ +#!/bin/sh +# +# Usage: mktoolspec CPU +# + +RTEMS_DIR=`dirname $0`/@top_srcdir@ + +CFG=setup.cache +dst=@RPM_SPECSdir@ +exe_ext=@EXEEXT@ + +usage() +{ + echo "$0 [options] " + echo " options:" + echo " -cfg " + echo " -o " + exit 1 ; +} + +specsrc=${RTEMS_DIR}/gccnewlib/gccnewlib.spec.in + +while test $# -ge 2; do +case $1 in +-cfg) + shift + CFG=$1 + shift + ;; +-o) + shift + dst=$1 + shift + ;; +-a) # alternate specs file + shift + specsrc=$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" \ + -e "s%@exe_ext@%${exe_ext}%g" \ +< ${specsrc} \ +> ${specfile} + +echo Generated ${specfile}. Index: mkrpms =================================================================== --- mkrpms (nonexistent) +++ mkrpms (revision 1765) @@ -0,0 +1,32 @@ +#!/bin/sh + +# +# A simple shell script to build several rpms in a row. +# +# Used for testing rtems.spec.in +# + +# Some linux distributions use /usr/src/packages +# redhat uses /usr/src/redhat +# others might use /usr/src +if test -d /usr/src/packages/SPECS; +then +dst=/usr/src/packages/SPECS; +elif test -d /usr/src/redhat/SPECS; + then +dst=/usr/src/redhat/SPECS; +elif test -d /usr/src/SPECS/; +then +dst=/usr/src/SPECS; +fi + +./mkspec pc386 i386-rtems +rpm -ba $dst/rtems-i386-rtems-pc386.spec + +./mkspec gensh1 sh-rtemself +rpm -ba $dst/rtems-sh-rtemself-gensh1.spec + +./mkspec mcp750 powerpc-rtems +rpm -ba $dst/rtems-powerpc-rtems-mcp750.spec + +
mkrpms Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: mkbinutilspec.in =================================================================== --- mkbinutilspec.in (nonexistent) +++ mkbinutilspec.in (revision 1765) @@ -0,0 +1,62 @@ +#!/bin/sh +# +# Usage: mkbinutilspec CPU +# + +RTEMS_DIR=`dirname $0`/@top_srcdir@ + +CFG=setup.cache +dst=@RPM_SPECSdir@ +exe_ext=@EXEEXT@ + +usage() +{ + echo "$0 [options] " + echo " options:" + echo " -cfg " + echo " -o " + 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-binutils-${binutils_version}.spec + +sed -e "s%@Release@%${binutils_rpm_release}%g" \ + -e "s%@rpm_build_root@%${rpm_build_root}%g" \ + -e "s%@target_alias@%${target_alias}%g" \ + -e "s%@binutils_version@%${binutils_version}%g" \ + -e "s%@binutils_patch_version@%${binutils_patch_version}%g" \ + -e "s%@exe_ext@%${exe_ext}%g" \ +< ${RTEMS_DIR}/binutils/binutils.spec.in \ +> ${specfile} + +echo Generated ${specfile} Index: . =================================================================== --- . (nonexistent) +++ . (revision 1765)
. Property changes : Added: svn:ignore ## -0,0 +1,16 ## +Makefile +Makefile.in +aclocal.m4 +buildall +config.cache +config.guess +config.log +config.status +config.sub +configure +depcomp +mkbinutilspec +mkbspspec +mkgccnewlibspec +mkgdbspec +setup.cache

powered by: WebSVN 2.1.0

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