[rtems-crossrpms commit] Add microblaze.

Ralf Corsepius ralf at rtems.org
Thu Apr 19 13:10:35 UTC 2012


Module:    rtems-crossrpms
Branch:    master
Commit:    9391a226da9ba8103019d58881cdd9b77f33176e
Changeset: http://git.rtems.org/rtems-crossrpms/commit/?id=9391a226da9ba8103019d58881cdd9b77f33176e

Author:    Ralf Corsépius <ralf.corsepius at rtems.org>
Date:      Thu Apr 19 10:55:18 2012 +0200

Add microblaze.

---

 configure                                          |    3 +
 configure.ac                                       |    1 +
 rtems4.11/Makefile.am                              |    1 +
 rtems4.11/Makefile.in                              |    4 +-
 rtems4.11/microblaze/Makefile.am                   |   33 +
 rtems4.11/microblaze/Makefile.in                   |  474 ++++++++++
 rtems4.11/microblaze/binutils-sources.add          |    4 +
 rtems4.11/microblaze/cpukit-sources.add            |    1 +
 rtems4.11/microblaze/gcc-sources.add               |   55 ++
 rtems4.11/microblaze/gdb-sources.add               |    4 +
 .../rtems-4.11-microblaze-rtems4.11-binutils.spec  |  270 ++++++
 .../rtems-4.11-microblaze-rtems4.11-gcc.spec       |  922 ++++++++++++++++++++
 .../rtems-4.11-microblaze-rtems4.11-gdb.spec       |  290 ++++++
 13 files changed, 2060 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 4e1de49..7b67038 100755
--- a/configure
+++ b/configure
@@ -2499,6 +2499,8 @@ ac_config_files="$ac_config_files rtems4.11/m32c/Makefile"
 
 ac_config_files="$ac_config_files rtems4.11/m32r/Makefile"
 
+ac_config_files="$ac_config_files rtems4.11/microblaze/Makefile"
+
 ac_config_files="$ac_config_files rtems4.11/m68k/Makefile"
 
 ac_config_files="$ac_config_files rtems4.11/mips/Makefile"
@@ -3272,6 +3274,7 @@ do
     "rtems4.11/lm32/Makefile") CONFIG_FILES="$CONFIG_FILES rtems4.11/lm32/Makefile" ;;
     "rtems4.11/m32c/Makefile") CONFIG_FILES="$CONFIG_FILES rtems4.11/m32c/Makefile" ;;
     "rtems4.11/m32r/Makefile") CONFIG_FILES="$CONFIG_FILES rtems4.11/m32r/Makefile" ;;
+    "rtems4.11/microblaze/Makefile") CONFIG_FILES="$CONFIG_FILES rtems4.11/microblaze/Makefile" ;;
     "rtems4.11/m68k/Makefile") CONFIG_FILES="$CONFIG_FILES rtems4.11/m68k/Makefile" ;;
     "rtems4.11/mips/Makefile") CONFIG_FILES="$CONFIG_FILES rtems4.11/mips/Makefile" ;;
     "rtems4.11/mipstx39/Makefile") CONFIG_FILES="$CONFIG_FILES rtems4.11/mipstx39/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 166d793..26acdb3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,7 @@ AC_CONFIG_FILES([rtems4.11/i386/Makefile])
 AC_CONFIG_FILES([rtems4.11/lm32/Makefile])
 AC_CONFIG_FILES([rtems4.11/m32c/Makefile])
 AC_CONFIG_FILES([rtems4.11/m32r/Makefile])
+AC_CONFIG_FILES([rtems4.11/microblaze/Makefile])
 AC_CONFIG_FILES([rtems4.11/m68k/Makefile])
 AC_CONFIG_FILES([rtems4.11/mips/Makefile])
 AC_CONFIG_FILES([rtems4.11/mipstx39/Makefile])
diff --git a/rtems4.11/Makefile.am b/rtems4.11/Makefile.am
index 0c28b90..2fbdadf 100644
--- a/rtems4.11/Makefile.am
+++ b/rtems4.11/Makefile.am
@@ -10,6 +10,7 @@ SUBDIRS += i386
 SUBDIRS += lm32
 SUBDIRS += m32c
 SUBDIRS += m32r
+SUBDIRS += microblaze
 SUBDIRS += m68k
 SUBDIRS += mips
 SUBDIRS += mipstx39
diff --git a/rtems4.11/Makefile.in b/rtems4.11/Makefile.in
index 50694cb..0d10b5e 100644
--- a/rtems4.11/Makefile.in
+++ b/rtems4.11/Makefile.in
@@ -196,8 +196,8 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = arm arm-eabi avr bfin h8300 i386 lm32 m32c m32r m68k mips \
-	mipstx39 powerpc sh sparc sparc64
+SUBDIRS = arm arm-eabi avr bfin h8300 i386 lm32 m32c m32r microblaze \
+	m68k mips mipstx39 powerpc sh sparc sparc64
 all: all-recursive
 
 .SUFFIXES:
diff --git a/rtems4.11/microblaze/Makefile.am b/rtems4.11/microblaze/Makefile.am
new file mode 100644
index 0000000..b85e417
--- /dev/null
+++ b/rtems4.11/microblaze/Makefile.am
@@ -0,0 +1,33 @@
+# $Id$
+
+rtems_api = 4.11
+TARGET = microblaze-rtems4.11
+
+include $(top_srcdir)/mkspec.am
+
+BINUTILS_VERS = 2.22
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = 1
+include ../binutils.am
+BINUTILS_OPTS +=
+
+GCC_VERS = 4.7.0
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = 1
+NEWLIB_VERS = 1.20.0
+NEWLIB_PKGVERS = $(NEWLIB_VERS)
+NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 5`
+include ../gcc.am
+GCC_OPTS += --languages=cxx
+
+GDB_VERS = 7.4
+GDB_PKGVERS = $(GDB_VERS)
+GDB_RPMREL = 1
+include ../gdb.am
+GDB_OPTS +=
+
+# CPUKIT_VERS = 4.10.99.0
+# CPUKIT_PKGVERS = $(CPUKIT_VERS)-YYYYMMDD-R
+# CPUKIT_RPMREL = 1
+# include ../cpukit.am
+# CPUKIT_OPTS +=
diff --git a/rtems4.11/microblaze/Makefile.in b/rtems4.11/microblaze/Makefile.in
new file mode 100644
index 0000000..44cce34
--- /dev/null
+++ b/rtems4.11/microblaze/Makefile.in
@@ -0,0 +1,474 @@
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+ at SET_MAKE@
+
+# $Id$
+
+VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(srcdir)/../binutils.am $(srcdir)/../gcc.am \
+	$(srcdir)/../gdb.am $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(top_srcdir)/mkspec.am
+ at CUSTOM_RPMPREFIX_TRUE@am__append_1 = @rpmprefix@$(TARGET)-binutils.spec
+ at CUSTOM_RPMPREFIX_TRUE@am__append_2 = @rpmprefix@$(TARGET)-gcc.spec
+ at CUSTOM_RPMPREFIX_TRUE@am__append_3 = @rpmprefix@$(TARGET)-gdb.spec
+subdir = rtems4.11/microblaze
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+DATA = $(noinst_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+HOST_SUBDIRS = @HOST_SUBDIRS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPECSTRIP_OPTS = @SPECSTRIP_OPTS@
+STRIP = @STRIP@
+TARGET_SUBDIRS = @TARGET_SUBDIRS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+rpmprefix = @rpmprefix@
+rtems_api = 4.11
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+sysdirpattern = @sysdirpattern@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+TARGET = microblaze-rtems4.11
+noinst_DATA = @rpmprefix@$(TARGET)-binutils.spec \
+	@rpmprefix@$(TARGET)-gcc.spec @rpmprefix@$(TARGET)-gdb.spec
+CLEANFILES = $(TARGET)-binutils.spec.in $(am__append_1) \
+	$(TARGET)-gcc.spec.in $(am__append_2) $(TARGET)-gdb.spec.in \
+	$(am__append_3)
+EXTRA_DIST = binutils-sources.add $(BINUTILS_SUBPACKAGES) \
+	$(srcdir)/../gcc-prep.add $(srcdir)/gcc-sources.add \
+	$(GCC_SUBPACKAGES) gdb-sources.add $(GDB_SUBPACKAGES)
+SPECSTRIP = $(top_srcdir)/specstrip --prefix=$(prefix) $(SPECSTRIP_OPTS)
+MKSPEC = sed \
+	  -e "s,[@]rpmprefix[@],$(rpmprefix),g" \
+	  -e "s,[@]_prefix[@],$(prefix),g" \
+	  -e "s/[@]tool_target[@]/$(TARGET)/g" \
+	  -e "/^%package -n [@]rpmprefix[@][@]tool_target[@]-gcc/d" \
+	  -e "@sysdirpattern@" \
+	  -e "/[@]PATCH/d"
+
+MKSPEC0 = sed \
+	  -e "s/[@]tool_target[@]/$(TARGET)/g" \
+	  -e "s/[@]rtems_api[@]/$(rtems_api)/g"
+
+BINUTILS_VERS = 2.22
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = 1
+BINUTILS_OPTS =
+BINUTILS_SUBPACKAGES = $(top_srcdir)/common/common.add \
+	$(top_srcdir)/binutils/binutils.add \
+	$(top_srcdir)/binutils/prep.add \
+	$(top_srcdir)/binutils/build.add \
+	$(top_srcdir)/binutils/install.add \
+	$(top_srcdir)/binutils/rpm-install.add \
+	$(top_srcdir)/common/clean.add \
+	$(top_srcdir)/binutils/target-binutils.add \
+	$(top_srcdir)/binutils/base-binutils.add
+GCC_VERS = 4.7.0
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = 1
+NEWLIB_VERS = 1.20.0
+NEWLIB_PKGVERS = $(NEWLIB_VERS)
+NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 5`
+GCC_OPTS = --languages=c --newlib --languages=cxx
+GCC_SUBPACKAGES = $(top_srcdir)/common/common.add \
+	$(top_srcdir)/gcc/gccnewlib.add $(top_srcdir)/gcc/prep.add \
+	$(top_srcdir)/gcc/build.add $(top_srcdir)/gcc/install.add \
+	$(top_srcdir)/gcc/rpm-install.add \
+	$(top_srcdir)/common/clean.add \
+	$(top_srcdir)/gcc/target-gcc.add \
+	$(top_srcdir)/gcc/base-gcc.add \
+	$(top_srcdir)/gcc/target-c++.add \
+	$(top_srcdir)/gcc/target-gfortran.add \
+	$(top_srcdir)/gcc/base-gfortran.add \
+	$(top_srcdir)/gcc/base-go.add $(top_srcdir)/gcc/target-go.add \
+	$(top_srcdir)/gcc/target-objc.add \
+	$(top_srcdir)/gcc/target-newlib.add \
+	$(top_srcdir)/gcc/base-newlib.add
+GDB_VERS = 7.4
+GDB_PKGVERS = $(GDB_VERS)
+GDB_RPMREL = 1
+GDB_OPTS =
+GDB_SUBPACKAGES = $(top_srcdir)/common/common.add \
+	$(top_srcdir)/gdb/gdb.add $(top_srcdir)/gdb/prep.add \
+	$(top_srcdir)/gdb/build.add $(top_srcdir)/gdb/install.add \
+	$(top_srcdir)/gdb/rpm-install.add \
+	$(top_srcdir)/common/clean.add \
+	$(top_srcdir)/gdb/target-gdb.add \
+	$(top_srcdir)/gdb/base-gdb.add
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/mkspec.am $(srcdir)/../binutils.am $(srcdir)/../gcc.am $(srcdir)/../gdb.am $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rtems4.11/microblaze/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu rtems4.11/microblaze/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+$(top_srcdir)/mkspec.am $(srcdir)/../binutils.am $(srcdir)/../gcc.am $(srcdir)/../gdb.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+	distclean-generic distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+$(TARGET)-binutils.spec.in: $(BINUTILS_SUBPACKAGES) Makefile.am $(srcdir)/binutils-sources.add $(srcdir)/../binutils.am
+	cat $(BINUTILS_SUBPACKAGES) | sed \
+	  -e "/[@]SOURCES[@]/r $(srcdir)/binutils-sources.add" \
+	  -e "/[@]SOURCES[@]/d" \
+	  -e "s/[@]BINUTILS_VERS[@]/$(BINUTILS_VERS)/g" \
+	  -e "s/[@]BINUTILS_PKGVERS[@]/$(BINUTILS_PKGVERS)/g" \
+	  -e "s/[@]BINUTILS_RPMREL[@]/$(BINUTILS_RPMREL)%{?dist}/g" \
+	  -e "/--with-sysroot/d" \
+	  | $(MKSPEC0) > $(TARGET)-binutils.spec.in
+
+ at rpmprefix@$(TARGET)-binutils.spec: $(TARGET)-binutils.spec.in
+	$(MKSPEC) $(TARGET)-binutils.spec.in | $(SPECSTRIP) $(BINUTILS_OPTS) > $@
+
+$(TARGET)-gcc.spec.in: $(GCC_SUBPACKAGES) Makefile.am $(srcdir)/gcc-sources.add $(srcdir)/../gcc-prep.add $(srcdir)/../gcc.am
+	cat $(GCC_SUBPACKAGES) \
+	  | sed \
+	  -e "/[@]SOURCES[@]/r $(srcdir)/gcc-sources.add" \
+	  -e "/[@]SOURCES[@]/d" \
+	  -e "/[@]PREP[@]/r $(srcdir)/../gcc-prep.add" \
+	  -e "/[@]PREP[@]/d" \
+	  | sed \
+	  -e "s/[@]GCC_VERS[@]/$(GCC_VERS)/g" \
+	  -e "s/[@]GCC_PKGVERS[@]/$(GCC_PKGVERS)/g" \
+	  -e "s/[@]GCC_RPMREL[@]/$(GCC_RPMREL)%{?dist}/g" \
+	  -e "s/[@]NEWLIB_VERS[@]/$(NEWLIB_VERS)/g" \
+	  -e "s/[@]NEWLIB_PKGVERS[@]/$(NEWLIB_PKGVERS)/g" \
+	  -e "s/[@]NEWLIB_RPMREL[@]/$(NEWLIB_RPMREL)%{?dist}/g" \
+	  -e "/--with-sysroot/d" \
+	  -e "/[@]tool_target[@]-sys-root/d" \
+	  -e "/[@]tool_target[@]-w32api-sys-root/d" \
+	  | $(MKSPEC0) > $(TARGET)-gcc.spec.in
+
+ at rpmprefix@$(TARGET)-gcc.spec: $(TARGET)-gcc.spec.in
+	$(MKSPEC) $(TARGET)-gcc.spec.in | $(SPECSTRIP) $(GCC_OPTS) > $@
+
+$(TARGET)-gdb.spec.in: $(GDB_SUBPACKAGES) Makefile.am $(srcdir)/gdb-sources.add $(srcdir)/../gdb.am
+	cat $(GDB_SUBPACKAGES) | sed \
+	  -e "/[@]SOURCES[@]/r $(srcdir)/gdb-sources.add" \
+	  -e "/[@]SOURCES[@]/d" \
+	  -e "s/[@]GDB_VERS[@]/$(GDB_VERS)/g" \
+	  -e "s/[@]GDB_PKGVERS[@]/$(GDB_PKGVERS)/g" \
+	  -e "s/[@]GDB_RPMREL[@]/$(GDB_RPMREL)%{?dist}/g" \
+	  -e "/--with-sysroot/d" \
+	  | $(MKSPEC0) > $(TARGET)-gdb.spec.in
+
+ at rpmprefix@$(TARGET)-gdb.spec: $(TARGET)-gdb.spec.in
+	$(MKSPEC) $(TARGET)-gdb.spec.in | $(SPECSTRIP) $(GDB_OPTS) > $@
+
+# CPUKIT_VERS = 4.10.99.0
+# CPUKIT_PKGVERS = $(CPUKIT_VERS)-YYYYMMDD-R
+# CPUKIT_RPMREL = 1
+# include ../cpukit.am
+# CPUKIT_OPTS +=
+
+# 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:
diff --git a/rtems4.11/microblaze/binutils-sources.add b/rtems4.11/microblaze/binutils-sources.add
new file mode 100644
index 0000000..59a4e09
--- /dev/null
+++ b/rtems4.11/microblaze/binutils-sources.add
@@ -0,0 +1,4 @@
+Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+%if "%{binutils_version}" == "2.21"
+Patch0:  ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/binutils-2.21-rtems4.11-20110107.diff
+%endif
diff --git a/rtems4.11/microblaze/cpukit-sources.add b/rtems4.11/microblaze/cpukit-sources.add
new file mode 100644
index 0000000..eca5433
--- /dev/null
+++ b/rtems4.11/microblaze/cpukit-sources.add
@@ -0,0 +1 @@
+Source0: 	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/rtems-%{cpukit_pkgvers}.tar.bz2
diff --git a/rtems4.11/microblaze/gcc-sources.add b/rtems4.11/microblaze/gcc-sources.add
new file mode 100644
index 0000000..d440cb8
--- /dev/null
+++ b/rtems4.11/microblaze/gcc-sources.add
@@ -0,0 +1,55 @@
+%if "%{gcc_version}" == "4.7.0"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-%{gcc_pkgvers}.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-%{gcc_pkgvers}.tar.xz	
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-%{gcc_pkgvers}-rtems4.11-20120419.diff
+%endif
+%if "%{gcc_version}" == "4.6.3"
+Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.6.3-rtems4.11-20120303.diff
+%endif
+%if "%{gcc_version}" == "4.6.2"
+Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.6.2-rtems4.11-20120124.diff
+%endif
+%if "%{gcc_version}" == "4.5.3"
+Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.3-rtems4.11-20110905.diff
+%endif
+
+%if "%{gcc_version}" < "4.7.0"
+%if %build_cxx
+%if "%{gcc_version}" == "4.6.3"
+Source1:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%endif
+%if "%{gcc_version}" == "4.6.2"
+Source1:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%endif
+%if "%{gcc_version}" == "4.5.3" 
+Source1:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.3-rtems4.11-20110905.diff
+%endif
+
+%endif
+%if %build_fortran
+Source2:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
+
+%endif
+%if %build_gcj
+Source3:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-java-%{gcc_pkgvers}.tar.bz2
+
+%endif
+%if %build_gnat
+Source4:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-ada-%{gcc_pkgvers}.tar.bz2
+
+%endif
+%if %build_objc
+Source5:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-objc-%{gcc_pkgvers}.tar.bz2
+
+%endif
+%endif
+%if %build_newlib
+%if "%{newlib_version}" == "1.20.0"
+Source50:	ftp://sourceware.org/pub/newlib/newlib-1.20.0.tar.gz
+Patch50:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.20.0-rtems4.11-20120419.diff
+%endif
+%endif
diff --git a/rtems4.11/microblaze/gdb-sources.add b/rtems4.11/microblaze/gdb-sources.add
new file mode 100644
index 0000000..9f059e5
--- /dev/null
+++ b/rtems4.11/microblaze/gdb-sources.add
@@ -0,0 +1,4 @@
+%if "%{gdb_version}" == "7.4"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.4.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.4-rtems4.11-20120125.diff
+%endif
diff --git a/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-binutils.spec b/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-binutils.spec
new file mode 100644
index 0000000..4da86c2
--- /dev/null
+++ b/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-binutils.spec
@@ -0,0 +1,270 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+%define _prefix                 /opt/rtems-4.11
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+%define binutils_pkgvers 2.22
+%define binutils_version 2.22
+%define binutils_rpmvers %{expand:%(echo "2.22" | tr - _ )}
+
+Name:		rtems-4.11-microblaze-rtems4.11-binutils
+Summary:	Binutils for target microblaze-rtems4.11
+Group:		Development/Tools
+Version:	%{binutils_rpmvers}
+Release:	1%{?dist}
+License:	GPL/LGPL
+URL: 		http://sources.redhat.com/binutils
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:	%{_host_rpmprefix}gcc
+
+%if "%{binutils_version}" >= "2.18"
+# Bug in bfd: Doesn't build without texinfo installed
+BuildRequires:	texinfo >= 4.2
+%else
+# Required for building the infos
+BuildRequires:	/sbin/install-info
+BuildRequires:	texinfo >= 4.2
+%endif
+BuildRequires:	flex
+BuildRequires:	bison
+
+Requires:	rtems-4.11-binutils-common
+
+Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+%if "%{binutils_version}" == "2.21"
+Patch0:  ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/binutils-2.21-rtems4.11-20110107.diff
+%endif
+
+%description
+Cross binutils for target microblaze-rtems4.11
+%prep
+%setup -q -c -T -n %{name}-%{version}
+
+%setup -q -D -T -n %{name}-%{version} -a0
+cd binutils-%{binutils_pkgvers}
+%{?PATCH0:%patch0 -p1}
+cd ..
+
+%build
+  export PATH="%{_bindir}:${PATH}"
+  mkdir -p build
+  cd build
+%if "%{_build}" != "%{_host}"
+  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
+%endif
+  CFLAGS="$RPM_OPT_FLAGS" \
+  ../binutils-%{binutils_pkgvers}/configure \
+    --build=%_build --host=%_host \
+    --target=microblaze-rtems4.11 \
+    --verbose --disable-nls \
+    --without-included-gettext \
+    --disable-win32-registry \
+    --disable-werror \
+    --prefix=%{_prefix} --bindir=%{_bindir} \
+    --exec-prefix=%{_exec_prefix} \
+    --includedir=%{_includedir} --libdir=%{_libdir} \
+    --mandir=%{_mandir} --infodir=%{_infodir}
+
+  make %{?_smp_mflags} all
+  make info
+  cd ..
+
+%install
+  export PATH="%{_bindir}:${PATH}"
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+  make DESTDIR=$RPM_BUILD_ROOT install
+
+  make prefix=$RPM_BUILD_ROOT%{_prefix} \
+    bindir=$RPM_BUILD_ROOT%{_bindir} \
+    includedir=$RPM_BUILD_ROOT%{_includedir} \
+    libdir=$RPM_BUILD_ROOT%{_libdir} \
+    infodir=$RPM_BUILD_ROOT%{_infodir} \
+    mandir=$RPM_BUILD_ROOT%{_mandir} \
+    exec_prefix=$RPM_BUILD_ROOT%{_exec_prefix} \
+    install-info
+
+# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
+  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure.info*
+
+  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
+  touch $RPM_BUILD_ROOT%{_infodir}/dir
+
+# binutils does not install share/locale, however it uses it
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/locale
+
+# We don't ship host files
+  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
+
+# manpages without corresponding tools
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/microblaze-rtems4.11-dlltool%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/microblaze-rtems4.11-dlltool*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/microblaze-rtems4.11-nlmconv%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/microblaze-rtems4.11-nlmconv*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/microblaze-rtems4.11-windres%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/microblaze-rtems4.11-windres*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/microblaze-rtems4.11-windmc%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/microblaze-rtems4.11-windmc*
+  fi
+
+  cd ..
+
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+# Fix up brp-compress to handle %%_prefix != /usr
+*/brp-compress*)
+  b=$(basename $a)
+  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# microblaze-rtems4.11-binutils
+# ==============================================================
+# %package -n rtems-4.11-microblaze-rtems4.11-binutils
+# Summary:      rtems binutils for microblaze-rtems4.11
+# Group: Development/Tools
+# %if %build_infos
+# Requires: rtems-4.11-binutils-common
+# %endif
+
+%description -n rtems-4.11-microblaze-rtems4.11-binutils
+GNU binutils targetting microblaze-rtems4.11.
+
+%files -n rtems-4.11-microblaze-rtems4.11-binutils
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_datarootdir}
+
+%dir %{_mandir}
+%dir %{_mandir}/man1
+%{_mandir}/man1/microblaze-rtems4.11-*.1*
+
+%dir %{_bindir}
+%{_bindir}/microblaze-rtems4.11-*
+
+%dir %{_exec_prefix}/microblaze-rtems4.11
+%dir %{_exec_prefix}/microblaze-rtems4.11/bin
+%{_exec_prefix}/microblaze-rtems4.11/bin/*
+
+%dir %{_exec_prefix}/microblaze-rtems4.11/lib
+%{_exec_prefix}/microblaze-rtems4.11/lib/ldscripts
+# ==============================================================
+# rtems-4.11-binutils-common
+# ==============================================================
+%package -n rtems-4.11-binutils-common
+Summary:      Base package for RTEMS binutils
+Group: Development/Tools
+%{?_with_noarch_subpackages:BuildArch: noarch}
+
+Requires(post):		/sbin/install-info
+Requires(preun):	/sbin/install-info
+
+%description -n rtems-4.11-binutils-common
+
+RTEMS is an open source operating system for embedded systems.
+
+This is the base for binutils regardless of target CPU.
+
+%post -n rtems-4.11-binutils-common
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
+
+%preun -n rtems-4.11-binutils-common
+if [ $1 -eq 0 ]; then
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/as.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/standards.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz || :
+fi
+
+%files -n rtems-4.11-binutils-common
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_infodir}
+%ghost %{_infodir}/dir
+%{_infodir}/as.info*
+%{_infodir}/bfd.info*
+%{_infodir}/binutils.info*
+%{_infodir}/ld.info*
+%{_infodir}/standards.info*
+%{_infodir}/gprof.info*
+
+%dir %{_prefix}/share
+%dir %{_prefix}/share/locale
+
diff --git a/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gcc.spec b/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gcc.spec
new file mode 100644
index 0000000..e02e934
--- /dev/null
+++ b/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gcc.spec
@@ -0,0 +1,922 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+%define _prefix                 /opt/rtems-4.11
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+
+%define gcc_pkgvers 4.7.0
+%define gcc_version 4.7.0
+%define gcc_rpmvers %{expand:%(echo "4.7.0" | tr - _ )}
+
+%define newlib_pkgvers		1.20.0
+%define newlib_version		1.20.0
+
+Name:         	rtems-4.11-microblaze-rtems4.11-gcc
+Summary:      	microblaze-rtems4.11 gcc
+
+Group:	      	Development/Tools
+Version:        %{gcc_rpmvers}
+Release:      	1%{?dist}
+License:      	GPL
+URL:		http://gcc.gnu.org
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%define _use_internal_dependency_generator 0
+
+BuildRequires:  %{_host_rpmprefix}gcc
+
+# FIXME: Disable lto for now, to avoid dependencies on libelf
+%bcond_with lto
+
+# FIXME: Disable python gdb scripts
+# ATM, no idea how to package them
+%bcond_with pygdb
+
+# FIXME: Disable GCC-plugin
+# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
+%bcond_with plugin
+
+# Use gcc's stdint.h instead of newlib's
+# Should be applicable to gcc >= 4.5.0
+%if "%{gcc_version}" >= "4.5.3"
+%bcond_without gcc_stdint
+%else
+%bcond_with gcc_stdint
+%endif
+
+# Enable newlib's iconv
+%bcond_without iconv
+
+# versions of libraries, we conditionally bundle if necessary
+%global mpc_version	0.8.1
+%global mpfr_version	2.4.2
+%global gmp_version	4.3.2
+%global libelf_version  0.8.13
+
+# versions of libraries these distros are known to ship
+%if 0%{?fc18}
+%global mpc_provided 0.9
+%global mpfr_provided 3.1.0
+%global gmp_provided 5.0.2
+%endif
+
+%if 0%{?fc17}
+%global mpc_provided 0.9
+%global mpfr_provided 3.1.0
+%global gmp_provided 5.0.2
+%endif
+
+%if 0%{?fc16}
+%global mpc_provided 0.8.3
+%global mpfr_provided 3.0.0
+%global gmp_provided 4.3.2
+%endif
+
+%if 0%{?fc15}
+%global mpc_provided 0.8.3
+%global mpfr_provided 3.0.0
+%global gmp_provided 4.3.2
+%endif
+
+%if 0%{?el6}
+%global mpc_provided 0.8
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?el5}
+%global mpc_provided %{nil}
+%global mpfr_provided %{nil}
+%global gmp_provided 4.1.4
+%endif
+
+%if 0%{?suse12_1}
+%global mpc_provided 0.8.2
+%global mpfr_provided 3.0.1
+%global gmp_provided 5.0.2
+%endif
+
+%if 0%{?suse11_4}
+%global mpc_provided 0.8.2
+%global mpfr_provided 3.0.0
+%global gmp_provided 5.0.1
+%endif
+
+%if 0%{?cygwin}
+%global mpc_provided 0.8
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.1
+%endif
+
+%if 0%{?mingw32}
+%global mpc_provided 0.8.1
+%global mpfr_provided 2.4.1
+%global gmp_provided 4.3.2
+%endif
+
+%if "%{gcc_version}" >= "4.2.0"
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%define gmp_required		4.1
+%define mpfr_required		2.3.1
+%endif
+
+%if "%{gcc_version}" >= "4.3.3"
+%define cloog_required 		0.15
+%endif
+
+%if "%{gcc_version}" >= "4.4.0"
+%define mpfr_required		2.3.2
+%endif
+
+%if "%{gcc_version}" >= "4.5.0"
+%define mpc_required 		0.8
+%if %{with lto}
+%define libelf_required 	0.8.12
+%endif
+%endif
+
+%if "%{gcc_version}" >= "4.7.0"
+%define gmp_required            4.2
+%endif
+
+%if %{defined mpc_required}
+%if "%{mpc_provided}" >= "%{mpc_required}"
+%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
+%{?el6:BuildRequires: libmpc-devel >= %{mpc_required}}
+%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}mpc-devel >= %{mpc_required}
+%endif
+%else
+%define _build_mpc 1
+%define gmp_required 		4.2
+%endif
+%endif
+
+%if %{defined gmp_required}
+%if "%{gmp_provided}" >= "%{gmp_required}"
+BuildRequires: gmp-devel >= %{gmp_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{gmp_required}
+%endif
+%else
+%define _build_gmp 1
+%endif
+%endif
+
+%if %{defined libelf_required}
+%if "%{libelf_provided}" >= "%{libelf_required}"
+BuildRequires: libelf-devel >= %{libelf_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}libelf-devel >= %{libelf_required}
+%endif
+%else
+%define _build_libelf 1
+%endif
+%endif
+
+
+%if %{defined cloog_required}
+%{?fedora:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
+%{?suse:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
+%endif
+
+
+%if %{defined mpfr_required}
+%if "%{mpfr_provided}" >= "%{mpfr_required}"
+BuildRequires: mpfr-devel >= %{mpfr_required}
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
+%endif
+%else
+%define _build_mpfr 1
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+BuildRequires:  rtems-4.11-microblaze-rtems4.11-gcc = %{gcc_rpmvers}
+%endif
+
+# Not strictly required, but patches may introduce a need to use them.
+# For reasons of simplicity, always require them.
+BuildRequires:	flex bison
+
+BuildRequires:	texinfo >= 4.2
+BuildRequires:	rtems-4.11-microblaze-rtems4.11-binutils
+
+Requires:	rtems-4.11-gcc-common
+Requires:	rtems-4.11-microblaze-rtems4.11-binutils
+Requires:	rtems-4.11-microblaze-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
+Requires:	rtems-4.11-microblaze-rtems4.11-newlib = %{newlib_version}-6%{?dist}
+
+%if "%{gcc_version}" >= "4.5.0"
+BuildRequires:  zlib-devel
+%if "%{_build}" != "%{_host}"
+BuildRequires:  %{_host_rpmprefix}zlib-devel
+%endif
+%else
+%endif
+
+%global _gcclibdir %{_prefix}/lib
+
+%if "%{gcc_version}" == "4.7.0"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-%{gcc_pkgvers}.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-%{gcc_pkgvers}.tar.xz	
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-%{gcc_pkgvers}-rtems4.11-20120419.diff
+%endif
+%if "%{gcc_version}" == "4.6.3"
+Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.6.3-rtems4.11-20120303.diff
+%endif
+%if "%{gcc_version}" == "4.6.2"
+Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.6.2-rtems4.11-20120124.diff
+%endif
+%if "%{gcc_version}" == "4.5.3"
+Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-core-%{gcc_pkgvers}.tar.bz2
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.3-rtems4.11-20110905.diff
+%endif
+
+%if "%{gcc_version}" < "4.7.0"
+%if "%{gcc_version}" == "4.6.3"
+Source1:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%endif
+%if "%{gcc_version}" == "4.6.2"
+Source1:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%endif
+%if "%{gcc_version}" == "4.5.3" 
+Source1:	ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_pkgvers}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+Patch1:		ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.3-rtems4.11-20110905.diff
+%endif
+
+%endif
+%if "%{newlib_version}" == "1.20.0"
+Source50:	ftp://sourceware.org/pub/newlib/newlib-1.20.0.tar.gz
+Patch50:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.20.0-rtems4.11-20120419.diff
+%endif
+
+%if 0%{?_build_mpfr}
+Source60:    http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
+%endif
+
+%if 0%{?_build_mpc}
+Source61:    http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
+%endif
+
+%if 0%{?_build_gmp}
+Source62:    ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
+%endif
+
+%if 0%{?_build_libelf}
+Source63:    http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
+%endif
+
+%description
+Cross gcc for microblaze-rtems4.11.
+
+%prep
+%setup -c -T -n %{name}-%{version}
+
+%setup -q -T -D -n %{name}-%{version} -a0
+cd gcc-%{gcc_pkgvers}
+%{?PATCH0:%patch0 -p1}
+cd ..
+
+%{?SOURCE1:%setup -q -T -D -n %{name}-%{version} -a1}
+cd gcc-%{gcc_pkgvers}
+%{?PATCH1:%patch1 -p1}
+cd ..
+
+
+
+
+
+%if %{with gcc_stdint}
+sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
+%endif
+
+%setup -q -T -D -n %{name}-%{version} -a50
+cd newlib-%{newlib_version}
+%{?PATCH50:%patch50 -p1}
+cd ..
+  # Copy the C library into gcc's source tree
+  ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
+%if %{with gcc_stdint}
+  rm gcc-%{gcc_pkgvers}/newlib/libc/include/stdint.h
+%endif
+  # Make sure not to be using GPL'ed sources
+  rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/linux
+  rm -rf gcc-%{gcc_pkgvers}/newlib/libc/sys/rdos
+
+%if 0%{?_build_mpfr}
+%setup -q -T -D -n %{name}-%{version} -a60
+%{?PATCH60:%patch60 -p1}
+  # Build mpfr one-tree style
+  ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_pkgvers}/mpfr
+%endif
+
+%if 0%{?_build_mpc}
+%setup -q -T -D -n %{name}-%{version} -a61
+%{?PATCH61:%patch61 -p1}
+  # Build mpc one-tree style
+  ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
+%endif
+
+%if 0%{?_build_gmp}
+%setup -q -T -D -n %{name}-%{version} -a62
+%{?PATCH62:%patch62 -p1}
+  # Build gmp one-tree style
+  ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
+%endif
+
+%if 0%{?_build_libelf}
+%setup -q -T -D -n %{name}-%{version} -a63
+%{?PATCH63:%patch63 -p1}
+  # Build libelf one-tree style
+  ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
+%endif
+
+echo "RTEMS gcc-%{gcc_version}-1%{?dist}/newlib-%{newlib_version}-6%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
+
+
+  # Fix timestamps
+  cd gcc-%{gcc_pkgvers}
+  contrib/gcc_update --touch
+  cd ..
+%build
+  mkdir -p build
+
+  cd build
+
+  languages="c"
+  languages="$languages,c++"
+  export PATH="%{_bindir}:${PATH}"
+%if "%{_build}" != "%{_host}"
+  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
+  CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
+%else
+# gcc is not ready to be compiled with -std=gnu99
+  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
+%endif
+  ../gcc-%{gcc_pkgvers}/configure \
+    --prefix=%{_prefix} \
+    --bindir=%{_bindir} \
+    --exec_prefix=%{_exec_prefix} \
+    --includedir=%{_includedir} \
+    --libdir=%{_gcclibdir} \
+    --libexecdir=%{_libexecdir} \
+    --mandir=%{_mandir} \
+    --infodir=%{_infodir} \
+    --datadir=%{_datadir} \
+    --build=%_build --host=%_host \
+    --target=microblaze-rtems4.11 \
+    --disable-libstdcxx-pch \
+    --with-gnu-as --with-gnu-ld --verbose \
+    --with-newlib \
+    --with-system-zlib \
+    --disable-nls --without-included-gettext \
+    --disable-win32-registry \
+    --enable-version-specific-runtime-libs \
+    --enable-threads \
+    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
+    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
+    --enable-newlib-io-c99-formats \
+    %{?with_iconv:--enable-newlib-iconv} \
+    --enable-languages="$languages"
+
+%if "%_host" != "%_build"
+  # Bug in gcc-3.2.1:
+  # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
+  mkdir -p gcc/include
+  cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
+%endif
+
+  make %{?_smp_mflags} all
+  make info
+  cd ..
+
+%install
+  export PATH="%{_bindir}:${PATH}"
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+
+  make DESTDIR=$RPM_BUILD_ROOT install
+  cd ..
+
+  cd build/microblaze-rtems4.11/newlib
+  make DESTDIR=$RPM_BUILD_ROOT install-info
+  cd ../../..
+
+%if "%{gcc_version}" <= "4.1.2"
+# Misplaced header file
+  if test -f $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h; then
+    mv $RPM_BUILD_ROOT%{_includedir}/mf-runtime.h \
+      $RPM_BUILD_ROOT%{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}/include/
+  fi
+%endif
+
+  # host library
+%if "%{gcc_version}" >= "4.2.0"
+  # libiberty doesn't honor --libdir, but always installs to a 
+  # magically guessed _libdir
+  rm -f  ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
+%else
+  # libiberty installs to --libdir=...
+  rm -f ${RPM_BUILD_ROOT}%{_gcclibdir}/libiberty.a
+%endif
+
+  # We use the version from binutils
+  rm -f $RPM_BUILD_ROOT%{_bindir}/microblaze-rtems4.11-c++filt%{_exeext}
+
+
+  # We don't ship info/dir
+  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
+  touch $RPM_BUILD_ROOT%{_infodir}/dir
+
+  # We don't want libffi's man-pages
+  rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*ffi*
+
+  # Bug in gcc-3.4.0pre
+  rm -f $RPM_BUILD_ROOT%{_bindir}/microblaze-rtems4.11-microblaze-rtems4.11-gcjh%{_exeext}
+
+  # Bug in gcc-3.3.x/gcc-3.4.x: Despite we don't need fixincludes, it installs
+  # the fixinclude-install-tools
+  rm -rf ${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}/install-tools
+  rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/microblaze-rtems4.11/%{gcc_version}/install-tools
+
+  # Bug in gcc > 4.1.0: Installs an unused, empty directory
+  if test -d ${RPM_BUILD_ROOT}%{_prefix}/microblaze-rtems4.11/include/bits; then
+    rmdir ${RPM_BUILD_ROOT}%{_prefix}/microblaze-rtems4.11/include/bits
+  fi
+
+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
+%if ! %{with pygdb}
+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
+  fi
+
+%endif
+  # Collect multilib subdirectories
+  multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
+
+  echo "%defattr(-,root,root,-)" > build/files.newlib
+  TGTDIR="%{_exec_prefix}/microblaze-rtems4.11/lib"
+  for i in $multilibs; do
+    case $i in
+    \.) echo "%dir ${TGTDIR}" >> build/files.newlib
+      ;;
+    *)  echo "%dir ${TGTDIR}/$i" >> build/files.newlib
+      ;;
+    esac
+  done
+
+  rm -f dirs ;
+  echo "%defattr(-,root,root,-)" >> dirs
+  TGTDIR="%{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}"
+  for i in $multilibs; do
+    case $i in
+    \.) ;; # ignore, handled elsewhere
+    *)  echo "%dir ${TGTDIR}/$i" >> dirs
+      ;;
+    esac
+  done
+
+  # Collect files to go into different packages
+  cp dirs build/files.gcc
+  cp dirs build/files.gfortran
+  cp dirs build/files.objc
+  cp dirs build/files.gcj
+  cp dirs build/files.g++
+  cp dirs build/files.go
+
+  TGTDIR="%{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}"
+  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
+  for i in $f; do
+    case $i in
+    *lib*.la) rm ${RPM_BUILD_ROOT}/$i ;; # ignore: gcc produces bogus libtool libs
+    *f771) ;;
+    *f951) ;;
+    *cc1) ;;
+    *cc1obj) ;;
+    *cc1plus) ;; # ignore: explicitly put into rpm elsewhere
+    *collect2) ;;
+    *libobjc*) echo "$i" >> build/files.objc ;;
+    *go1) ;; # ignore: explicitly put into rpm elsewhere
+    *include/objc*) ;;
+    *include/g++*);;
+    *include/c++*);;
+    *include-fixed/*);;
+    *finclude/*);;
+    */go/*) ;; # ignore : explicitly put into rpm elsewhere
+    *adainclude*);;
+    *adalib*);;
+    *gnat1);;
+    *jc1) ;;
+    *jvgenmain) ;;
+    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
+    */libgo.*) echo "$i" >> build/files.go ;;
+    %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
+    %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
+    */libstdc++.*) echo "$i" >> build/files.g++ ;;
+    */libsupc++.*) echo "$i" >> build/files.g++ ;;
+    *) echo "$i" >> build/files.gcc ;;
+    esac
+  done
+
+  TGTDIR="%{_exec_prefix}/microblaze-rtems4.11/lib"
+  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
+  for i in $f; do
+    case $i in
+    *lib*.la) rm ${RPM_BUILD_ROOT}/$i;; # ignore - gcc produces bogus libtool libs
+    *libiberty.a) rm ${RPM_BUILD_ROOT}/$i ;; # ignore - GPL'ed
+# all other files belong to newlib
+    *) echo "$i" >> build/files.newlib ;; 
+    esac
+  done
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+# Fix up brp-compress to handle %%_prefix != /usr
+*/brp-compress*)
+  b=$(basename $a)
+  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+
+cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/microblaze-rtems4.11/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/microblaze-rtems4.11/'} | %__find_provides
+EOF
+chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
+
+cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/microblaze-rtems4.11/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/microblaze-rtems4.11/'} | %__find_requires
+EOF
+chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
+
+%ifnarch noarch
+# Extract %%__debug_install_post into debug_install_post~
+cat << \EOF > debug_install_post~
+%__debug_install_post
+EOF
+
+# Generate customized debug_install_post script
+cat debug_install_post~ | while read a x y; do
+case $a in
+# Prevent find-debuginfo.sh* from trying to handle foreign binaries
+*/find-debuginfo.sh)
+  b=$(basename $a)
+  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
+< debug_install_post~ > debug_install_post 
+%define __debug_install_post . ./debug_install_post
+
+%endif
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# rtems-4.11-microblaze-rtems4.11-gcc
+# ==============================================================
+# %package -n rtems-4.11-microblaze-rtems4.11-gcc
+# Summary:        GNU cc compiler for microblaze-rtems4.11
+# Group:          Development/Tools
+# Version:        %{gcc_rpmvers}
+# Requires:       rtems-4.11-microblaze-rtems4.11-binutils
+# Requires:       rtems-4.11-microblaze-rtems4.11-newlib = %{newlib_version}-6%{?dist}
+# License:	GPL
+
+# %if %build_infos
+# Requires:      rtems-4.11-gcc-common
+# %endif
+
+%description -n rtems-4.11-microblaze-rtems4.11-gcc
+GNU cc compiler for microblaze-rtems4.11.
+
+# ==============================================================
+# rtems-4.11-microblaze-rtems4.11-gcc-libgcc
+# ==============================================================
+%package -n rtems-4.11-microblaze-rtems4.11-gcc-libgcc
+Summary:        libgcc for microblaze-rtems4.11-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+Requires:       rtems-4.11-microblaze-rtems4.11-newlib = %{newlib_version}-6%{?dist}
+License:	GPL
+
+%description -n rtems-4.11-microblaze-rtems4.11-gcc-libgcc
+libgcc microblaze-rtems4.11-gcc.
+
+
+%files -n rtems-4.11-microblaze-rtems4.11-gcc
+%defattr(-,root,root)
+%dir %{_prefix}
+
+%dir %{_mandir}
+%dir %{_mandir}/man1
+%{_mandir}/man1/microblaze-rtems4.11-gcc.1*
+%{_mandir}/man1/microblaze-rtems4.11-cpp.1*
+%{_mandir}/man1/microblaze-rtems4.11-gcov.1*
+
+%dir %{_bindir}
+%{_bindir}/microblaze-rtems4.11-cpp%{_exeext}
+%{_bindir}/microblaze-rtems4.11-gcc%{_exeext}
+%{_bindir}/microblaze-rtems4.11-gcc-%{gcc_version}%{_exeext}
+%{_bindir}/microblaze-rtems4.11-gcov%{_exeext}
+%if "%{gcc_version}" < "4.6.0"
+%{_bindir}/microblaze-rtems4.11-gccbug
+%endif
+%if "%{gcc_version}" >= "4.7.0"
+# FIXME: To ship or not to ship?
+%{_bindir}/microblaze-rtems4.11-gcc-ar%{_exeext}
+%{_bindir}/microblaze-rtems4.11-gcc-nm%{_exeext}
+%{_bindir}/microblaze-rtems4.11-gcc-ranlib%{_exeext}
+%endif
+
+%dir %{_libexecdir}
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/microblaze-rtems4.11
+%dir %{_libexecdir}/gcc/microblaze-rtems4.11/%{gcc_version}
+%{_libexecdir}/gcc/microblaze-rtems4.11/%{gcc_version}/cc1%{_exeext}
+%{_libexecdir}/gcc/microblaze-rtems4.11/%{gcc_version}/collect2%{_exeext}
+%if "%{gcc_version}" >= "4.5.0"
+%{?with_lto:%{_libexecdir}/gcc/microblaze-rtems4.11/%{gcc_version}/lto%{_exeext}}
+%{_libexecdir}/gcc/microblaze-rtems4.11/%{gcc_version}/lto-wrapper%{_exeext}
+%endif
+
+%files -n rtems-4.11-microblaze-rtems4.11-gcc-libgcc -f build/files.gcc
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_gcclibdir}
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/microblaze-rtems4.11
+%dir %{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}
+%dir %{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}/include
+
+%if "%{gcc_version}" > "4.0.3"
+%dir %{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}/include/ssp
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}/include-fixed
+%endif
+
+# ==============================================================
+# rtems-4.11-gcc-common
+# ==============================================================
+%package -n rtems-4.11-gcc-common
+Summary:	Base package for rtems gcc and newlib C Library
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+Requires(post): 	/sbin/install-info
+Requires(preun):	/sbin/install-info
+
+%description -n rtems-4.11-gcc-common
+GCC files that are shared by all targets.
+
+%files -n rtems-4.11-gcc-common
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_prefix}/share
+
+%dir %{_infodir}
+%ghost %{_infodir}/dir
+%{_infodir}/cpp.info*
+%{_infodir}/cppinternals.info*
+%{_infodir}/gcc.info*
+%{_infodir}/gccint.info*
+%{_infodir}/gccinstall.info*
+%if "%{gcc_version}" >= "4.6.0"
+%{_infodir}/libquadmath.info*
+%endif
+
+%dir %{_mandir}
+%dir %{_mandir}/man7
+%{_mandir}/man7/fsf-funding.7*
+%{_mandir}/man7/gfdl.7*
+%{_mandir}/man7/gpl.7*
+
+%post -n rtems-4.11-gcc-common
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
+
+%preun -n rtems-4.11-gcc-common
+if [ $1 -eq 0 ]; then
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cppinternals.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccint.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gccinstall.info.gz || :
+fi
+
+# ==============================================================
+# rtems-4.11-microblaze-rtems4.11-gcc-c++
+# ==============================================================
+%package -n rtems-4.11-microblaze-rtems4.11-gcc-c++
+Summary:	GCC c++ compiler for microblaze-rtems4.11
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+Requires:       rtems-4.11-microblaze-rtems4.11-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
+
+%if "%{_build}" != "%{_host}"
+BuildRequires:  rtems-4.11-microblaze-rtems4.11-gcc-c++ = %{gcc_rpmvers}
+%endif
+
+Requires:       rtems-4.11-gcc-common
+Requires:       rtems-4.11-microblaze-rtems4.11-gcc = %{gcc_rpmvers}-%{release}
+
+%description -n rtems-4.11-microblaze-rtems4.11-gcc-c++
+GCC c++ compiler for microblaze-rtems4.11.
+
+
+%package -n rtems-4.11-microblaze-rtems4.11-gcc-libstdc++
+Summary:	libstdc++ for microblaze-rtems4.11
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n rtems-4.11-microblaze-rtems4.11-gcc-libstdc++
+%{summary}
+
+
+%files -n rtems-4.11-microblaze-rtems4.11-gcc-c++
+%defattr(-,root,root)
+%dir %{_prefix}
+
+%dir %{_mandir}
+%dir %{_mandir}/man1
+%{_mandir}/man1/microblaze-rtems4.11-g++.1*
+
+%dir %{_bindir}
+%{_bindir}/microblaze-rtems4.11-c++%{_exeext}
+%{_bindir}/microblaze-rtems4.11-g++%{_exeext}
+
+%dir %{_libexecdir}
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/microblaze-rtems4.11
+%dir %{_libexecdir}/gcc/microblaze-rtems4.11/%{gcc_version}
+%{_libexecdir}/gcc/microblaze-rtems4.11/%{gcc_version}/cc1plus%{_exeext}
+
+
+%files -n rtems-4.11-microblaze-rtems4.11-gcc-libstdc++ -f build/files.g++
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_gcclibdir}
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/microblaze-rtems4.11
+%dir %{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}
+%dir %{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}/include
+%{_gcclibdir}/gcc/microblaze-rtems4.11/%{gcc_version}/include/c++
+
+
+
+# ==============================================================
+# rtems-4.11-microblaze-rtems4.11-newlib
+# ==============================================================
+%package -n rtems-4.11-microblaze-rtems4.11-newlib
+Summary:      	C Library (newlib) for microblaze-rtems4.11
+Group: 		Development/Tools
+License:	Distributable
+Version:	%{newlib_version}
+Release:        6%{?dist}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+
+Requires:	rtems-4.11-newlib-common
+
+%description -n rtems-4.11-microblaze-rtems4.11-newlib
+Newlib C Library for microblaze-rtems4.11.
+
+%files -n rtems-4.11-microblaze-rtems4.11-newlib -f build/files.newlib
+%defattr(-,root,root)
+%dir %{_exec_prefix}
+%dir %{_exec_prefix}/microblaze-rtems4.11
+%{_exec_prefix}/microblaze-rtems4.11/include
+
+# ==============================================================
+# rtems-4.11-newlib-common
+# ==============================================================
+%package -n rtems-4.11-newlib-common
+Summary:	Base package for RTEMS newlib C Library
+Group:          Development/Tools
+Version:        %{newlib_version}
+Release:        6%{?dist}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	Distributable
+
+Requires(post): 	/sbin/install-info
+Requires(preun):	/sbin/install-info
+
+%description -n rtems-4.11-newlib-common
+newlib files that are shared by all targets.
+
+%files -n rtems-4.11-newlib-common
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_prefix}/share
+
+%dir %{_infodir}
+%ghost %{_infodir}/dir
+%{_infodir}/libc.info*
+%{_infodir}/libm.info*
+
+%post -n rtems-4.11-newlib-common
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
+
+%preun -n rtems-4.11-newlib-common
+if [ $1 -eq 0 ]; then
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/libm.info.gz || :
+fi
+
diff --git a/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gdb.spec b/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gdb.spec
new file mode 100644
index 0000000..c469a86
--- /dev/null
+++ b/rtems4.11/microblaze/rtems-4.11-microblaze-rtems4.11-gdb.spec
@@ -0,0 +1,290 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+%define _prefix                 /opt/rtems-4.11
+%define _exec_prefix            %{_prefix}
+%define _bindir                 %{_exec_prefix}/bin
+%define _sbindir                %{_exec_prefix}/sbin
+%define _libexecdir             %{_exec_prefix}/libexec
+%define _datarootdir            %{_prefix}/share
+%define _datadir                %{_datarootdir}
+%define _sysconfdir             %{_prefix}/etc
+%define _sharedstatedir         %{_prefix}/com
+%define _localstatedir          %{_prefix}/var
+%define _includedir             %{_prefix}/include
+%define _libdir                 %{_exec_prefix}/%{_lib}
+%define _mandir                 %{_datarootdir}/man
+%define _infodir                %{_datarootdir}/info
+%define _localedir              %{_datarootdir}/locale
+
+%ifos cygwin cygwin32 mingw mingw32
+%define _exeext .exe
+%define debug_package           %{nil}
+%define _libdir                 %{_exec_prefix}/lib
+%else
+%define _exeext %{nil}
+%endif
+
+%ifos cygwin cygwin32
+%define optflags -O3 -pipe -march=i486 -funroll-loops
+%endif
+
+%ifos mingw mingw32
+%if %{defined _mingw32_cflags}
+%define optflags %{_mingw32_cflags}
+%else
+%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
+%endif
+%endif
+
+%if "%{_build}" != "%{_host}"
+%define _host_rpmprefix %{_host}-
+%else
+%define _host_rpmprefix %{nil}
+%endif
+
+%define gdb_version 7.4
+%define gdb_rpmvers %{expand:%(echo 7.4 | tr - _)} 
+
+Name:		rtems-4.11-microblaze-rtems4.11-gdb
+Summary:	Gdb for target microblaze-rtems4.11
+Group:		Development/Tools
+Version:	%{gdb_rpmvers}
+Release:	1%{?dist}
+License:	GPL/LGPL
+URL: 		http://sources.redhat.com/gdb
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires:  %{_host_rpmprefix}gcc
+
+%global build_sim --enable-sim
+
+# Whether to build against system readline
+# Default: yes, except on EL5
+%if "{gdb_version}" >= "7.3.91"
+# gdb >= 7.3.91 requires readline6
+# EL5's readline is too old
+%{?el5:%bcond_with system_readline}
+%{!?el5:%bcond_without system_readline}
+%else
+%bcond_without system_readline
+%endif
+
+# Whether to build python support
+%if "%{_build}" != "%{_host}"
+# Can't build python Cdn-X
+%bcond_with python
+%else
+%bcond_without python
+%endif
+%{?with_python:BuildRequires: %{_host_rpmprefix}python-devel}
+
+
+# suse
+%if "%{?suse}" >= "10.3"
+BuildRequires: libexpat-devel
+%else
+# Fedora/CentOS/Cygwin/MinGW
+BuildRequires: %{_host_rpmprefix}expat-devel
+%endif
+
+%{?with_system_readline:BuildRequires: %{_host_rpmprefix}readline-devel}
+BuildRequires:  %{_host_rpmprefix}ncurses-devel
+
+# Required for building the infos
+BuildRequires:	/sbin/install-info
+BuildRequires:	texinfo >= 4.2
+Requires:	rtems-4.11-gdb-common
+
+%if "%{gdb_version}" == "7.4"
+Source0:  ftp://ftp.gnu.org/gnu/gdb/gdb-7.4.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gdb-7.4-rtems4.11-20120125.diff
+%endif
+
+%description
+GDB for target microblaze-rtems4.11
+%prep
+%setup -q -c -T -n %{name}-%{version}
+
+%setup -q -D -T -n %{name}-%{version} -a0
+cd gdb-%{gdb_version}
+%{?PATCH0:%patch0 -p1}
+cd ..
+
+# Force using a system-provided libreadline
+%{?with_system_readline:rm -f gdb-%{gdb_version}/readline/configure}
+%build
+  export PATH="%{_bindir}:${PATH}"
+  mkdir -p build
+  cd build
+%if "%{_build}" != "%{_host}"
+  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
+%endif
+  CFLAGS="$RPM_OPT_FLAGS" \
+  ../gdb-%{gdb_version}/configure \
+    --build=%_build --host=%_host \
+    --target=microblaze-rtems4.11 \
+    --verbose --disable-nls \
+    --without-included-gettext \
+    --disable-win32-registry \
+    --disable-werror \
+    %{build_sim} \
+    %{?with_system_readline:--with-system-readline} \
+    --with-expat \
+    %{?with_python:--with-python}%{!?with_python:--without-python} \
+    --with-gdb-datadir=%{_datadir}/microblaze-rtems4.11-gdb-%{gdb_version} \
+    --prefix=%{_prefix} --bindir=%{_bindir} \
+    --includedir=%{_includedir} --libdir=%{_libdir} \
+    --mandir=%{_mandir} --infodir=%{_infodir}
+
+  make %{?_smp_mflags} all
+  make info
+  cd ..
+
+%install
+  export PATH="%{_bindir}:${PATH}"
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+  make DESTDIR=$RPM_BUILD_ROOT install
+
+  rm -f $RPM_BUILD_ROOT%{_infodir}/dir
+  touch $RPM_BUILD_ROOT%{_infodir}/dir
+
+# These come from other packages
+  rm -rf $RPM_BUILD_ROOT%{_infodir}/bfd*
+  rm -rf $RPM_BUILD_ROOT%{_infodir}/configure*
+  rm -rf $RPM_BUILD_ROOT%{_infodir}/standards*
+
+# We don't ship host files
+  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
+
+# host library, installed to a bogus directory
+  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libmicroblaze-rtems4.11-sim.a
+
+# Bug in gdb-7.0, bogusly installs linux-only files
+  somethinguseful=0
+  for f in ${RPM_BUILD_ROOT}%{_datadir}/microblaze-rtems4.11-gdb-%{gdb_version}/syscalls/*.xml; do
+    case $f in
+    *linux.xml) rm -f $f;;
+    *.xml) somethinguseful=1;;
+    esac
+  done
+  if test $somethinguseful -eq 0; then
+    rm -rf "${RPM_BUILD_ROOT}%{_datadir}/microblaze-rtems4.11-gdb-%{gdb_version}/syscalls"
+  fi
+
+%if "{gdb_version}" >= "7.3"
+%if ! %{with python}
+# gdb-7.3 doesn't honor --without-python correctly
+  rm -rf ${RPM_BUILD_ROOT}%{_datadir}/microblaze-rtems4.11-gdb-%{gdb_version}/python
+%endif
+%endif
+
+%if "%{gdb_version}" >= "7.3.91"
+# gdb-7.3.91 installs host files, we don't want
+  rm ${RPM_BUILD_ROOT}%{_includedir}/gdb/jit-reader.h
+%endif
+
+  cd ..
+
+# Extract %%__os_install_post into os_install_post~
+cat << \EOF > os_install_post~
+%__os_install_post
+EOF
+
+# Generate customized brp-*scripts
+cat os_install_post~ | while read a x y; do
+case $a in
+# Prevent brp-strip* from trying to handle foreign binaries
+*/brp-strip*)
+  b=$(basename $a)
+  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
+  chmod a+x $b
+  ;;
+# Fix up brp-compress to handle %%_prefix != /usr
+*/brp-compress*)
+  b=$(basename $a)
+  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
+  chmod a+x $b
+  ;;
+esac
+done
+
+sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# microblaze-rtems4.11-gdb
+# ==============================================================
+# %package -n rtems-4.11-microblaze-rtems4.11-gdb
+# Summary:      rtems gdb for microblaze-rtems4.11
+# Group: Development/Tools
+# %if %build_infos
+# Requires: rtems-4.11-gdb-common
+# %endif
+
+%description -n rtems-4.11-microblaze-rtems4.11-gdb
+GNU gdb targetting microblaze-rtems4.11.
+
+%files -n rtems-4.11-microblaze-rtems4.11-gdb
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_prefix}/share
+%{?with_python:%{_datadir}/microblaze-rtems4.11-gdb-%{gdb_version}}
+
+%dir %{_mandir}
+%dir %{_mandir}/man1
+%{_mandir}/man1/microblaze-rtems4.11-*.1*
+
+%dir %{_bindir}
+%{_bindir}/microblaze-rtems4.11-*
+
+# ==============================================================
+# rtems-4.11-gdb-common
+# ==============================================================
+%package -n rtems-4.11-gdb-common
+Summary:      Base package for RTEMS gdbs
+Group: Development/Tools
+Requires(post):		/sbin/install-info
+Requires(preun):	/sbin/install-info
+%{?_with_noarch_subpackages:BuildArch: noarch}
+
+%description -n rtems-4.11-gdb-common
+
+GDB files shared by all targets.
+
+%post -n rtems-4.11-gdb-common
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
+  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
+
+%preun -n rtems-4.11-gdb-common
+if [ $1 -eq 0 ]; then
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdb.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/gdbint.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/stabs.info.gz || :
+  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/annotate.info.gz || :
+fi
+
+%files -n rtems-4.11-gdb-common
+%defattr(-,root,root)
+%dir %{_prefix}
+%dir %{_prefix}/share
+
+%dir %{_infodir}
+%ghost %{_infodir}/dir
+%{_infodir}/gdb.info*
+
+%{_infodir}/gdbint.info*
+%{_infodir}/stabs.info*
+%{_infodir}/annotate.info*
+




More information about the vc mailing list