[rtems-crossrpms commit] freebsd8.4.

Ralf Corsepius ralf at rtems.org
Sun Dec 8 18:17:59 UTC 2013


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

Author:    Ralf Corsépius <ralf.corsepius at rtems.org>
Date:      Wed Oct  2 14:01:49 2013 +0200

freebsd8.4.

---

 Makefile.am                                        |    1 +
 Makefile.in                                        |    4 +-
 configure                                          |   10 +
 configure.ac                                       |    4 +
 freebsd8.4/Makefile.am                             |    1 +
 freebsd8.4/Makefile.in                             |  564 +++++++++++++
 freebsd8.4/binutils.am                             |   32 +
 freebsd8.4/gcc.am                                  |   44 +
 freebsd8.4/i586/Makefile.am                        |   21 +
 freebsd8.4/i586/Makefile.in                        |  488 ++++++++++++
 freebsd8.4/i586/binutils-sources.add               |    4 +
 freebsd8.4/i586/gcc-sources.add                    |   43 +
 freebsd8.4/i586/i586-pc-freebsd8.4-binutils.spec   |  174 ++++
 freebsd8.4/i586/i586-pc-freebsd8.4-gcc.spec        |  831 ++++++++++++++++++++
 freebsd8.4/i586/i586-pc-freebsd8.4-libs.spec       |  218 +++++
 freebsd8.4/i586/libs.add                           |  109 +++
 freebsd8.4/i586/target-libs.add                    |   11 +
 freebsd8.4/libs.am                                 |   18 +
 freebsd8.4/x86_64/Makefile.am                      |   21 +
 freebsd8.4/x86_64/Makefile.in                      |  488 ++++++++++++
 .../x86_64/amd64-pc-freebsd8.4-binutils.spec       |  174 ++++
 freebsd8.4/x86_64/amd64-pc-freebsd8.4-gcc.spec     |  831 ++++++++++++++++++++
 freebsd8.4/x86_64/amd64-pc-freebsd8.4-libs.spec    |  222 ++++++
 freebsd8.4/x86_64/binutils-sources.add             |    4 +
 freebsd8.4/x86_64/gcc-sources.add                  |   43 +
 freebsd8.4/x86_64/libs.add                         |  113 +++
 freebsd8.4/x86_64/target-libs.add                  |   11 +
 27 files changed, 4482 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e3d7c95..6e24c9a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,6 +3,7 @@ EXTRA_DIST =
 SUBDIRS  = cygwin
 SUBDIRS += freebsd7.4
 SUBDIRS += freebsd8.3
+SUBDIRS += freebsd8.4
 SUBDIRS += freebsd9.2
 SUBDIRS += mingw32
 SUBDIRS += solaris2.7
diff --git a/Makefile.in b/Makefile.in
index e130c40..67119ed 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -276,8 +276,8 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = specstrip $(srcdir)/patches/*.diff
-SUBDIRS = cygwin freebsd7.4 freebsd8.3 freebsd9.2 mingw32 solaris2.7 \
-	rtems4.11 autotools
+SUBDIRS = cygwin freebsd7.4 freebsd8.3 freebsd8.4 freebsd9.2 mingw32 \
+	solaris2.7 rtems4.11 autotools
 all: all-recursive
 
 .SUFFIXES:
diff --git a/configure b/configure
index 8d5ef8e..0efd6c5 100755
--- a/configure
+++ b/configure
@@ -2542,6 +2542,13 @@ ac_config_files="$ac_config_files freebsd8.3/i586/Makefile"
 ac_config_files="$ac_config_files freebsd8.3/x86_64/Makefile"
 
 
+ac_config_files="$ac_config_files freebsd8.4/Makefile"
+
+ac_config_files="$ac_config_files freebsd8.4/i586/Makefile"
+
+ac_config_files="$ac_config_files freebsd8.4/x86_64/Makefile"
+
+
 ac_config_files="$ac_config_files freebsd9.2/Makefile"
 
 ac_config_files="$ac_config_files freebsd9.2/i586/Makefile"
@@ -3326,6 +3333,9 @@ do
     "freebsd8.3/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd8.3/Makefile" ;;
     "freebsd8.3/i586/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd8.3/i586/Makefile" ;;
     "freebsd8.3/x86_64/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd8.3/x86_64/Makefile" ;;
+    "freebsd8.4/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd8.4/Makefile" ;;
+    "freebsd8.4/i586/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd8.4/i586/Makefile" ;;
+    "freebsd8.4/x86_64/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd8.4/x86_64/Makefile" ;;
     "freebsd9.2/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd9.2/Makefile" ;;
     "freebsd9.2/i586/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd9.2/i586/Makefile" ;;
     "freebsd9.2/x86_64/Makefile") CONFIG_FILES="$CONFIG_FILES freebsd9.2/x86_64/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 5f3fc1f..67627db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,6 +124,10 @@ AC_CONFIG_FILES([freebsd8.3/Makefile])
 AC_CONFIG_FILES([freebsd8.3/i586/Makefile])
 AC_CONFIG_FILES([freebsd8.3/x86_64/Makefile])
 
+AC_CONFIG_FILES([freebsd8.4/Makefile])
+AC_CONFIG_FILES([freebsd8.4/i586/Makefile])
+AC_CONFIG_FILES([freebsd8.4/x86_64/Makefile])
+
 AC_CONFIG_FILES([freebsd9.2/Makefile])
 AC_CONFIG_FILES([freebsd9.2/i586/Makefile])
 AC_CONFIG_FILES([freebsd9.2/x86_64/Makefile])
diff --git a/freebsd8.4/Makefile.am b/freebsd8.4/Makefile.am
new file mode 100644
index 0000000..7dc5e86
--- /dev/null
+++ b/freebsd8.4/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = i586 x86_64
diff --git a/freebsd8.4/Makefile.in b/freebsd8.4/Makefile.in
new file mode 100644
index 0000000..1d70aa4
--- /dev/null
+++ b/freebsd8.4/Makefile.in
@@ -0,0 +1,564 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+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@
+subdir = freebsd8.4
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(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 =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+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@
+MAINT = @MAINT@
+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@
+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 = @rtems_api@
+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@
+SUBDIRS = i586 x86_64
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.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) --foreign freebsd8.4/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign freebsd8.4/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_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+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
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+
+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-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+	check-am clean clean-generic cscopelist-am ctags ctags-am \
+	distclean distclean-generic distclean-tags 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 installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+	pdf-am ps ps-am tags tags-am uninstall uninstall-am
+
+
+# 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/freebsd8.4/binutils.am b/freebsd8.4/binutils.am
new file mode 100644
index 0000000..f109d8c
--- /dev/null
+++ b/freebsd8.4/binutils.am
@@ -0,0 +1,32 @@
+EXTRA_DIST += binutils-sources.add
+
+BINUTILS_OPTS =
+
+BINUTILS_SUBPACKAGES = $(top_srcdir)/common/common.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/binutils.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/prep.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/build.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/install.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/rpm-install.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/common/clean.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/target-binutils.add
+BINUTILS_SUBPACKAGES += $(top_srcdir)/binutils/base-binutils.add
+
+$(TARGET)-binutils.spec.in: $(BINUTILS_SUBPACKAGES) Makefile.am $(srcdir)/binutils-sources.add
+	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" \
+	  | $(MKSPEC0) > $(TARGET)-binutils.spec.in
+CLEANFILES += $(TARGET)-binutils.spec.in
+
+ at rpmprefix@$(TARGET)-binutils.spec: $(TARGET)-binutils.spec.in
+	$(MKSPEC) $(TARGET)-binutils.spec.in | $(SPECSTRIP) $(BINUTILS_OPTS) > $@
+if CUSTOM_RPMPREFIX
+CLEANFILES += @rpmprefix@$(TARGET)-binutils.spec
+endif
+noinst_DATA += @rpmprefix@$(TARGET)-binutils.spec
+
+EXTRA_DIST += $(BINUTILS_SUBPACKAGES)
diff --git a/freebsd8.4/gcc-prep.add b/freebsd8.4/gcc-prep.add
new file mode 100644
index 0000000..e69de29
diff --git a/freebsd8.4/gcc.am b/freebsd8.4/gcc.am
new file mode 100644
index 0000000..a5360f1
--- /dev/null
+++ b/freebsd8.4/gcc.am
@@ -0,0 +1,44 @@
+EXTRA_DIST += $(srcdir)/../gcc-prep.add
+EXTRA_DIST += $(srcdir)/gcc-sources.add
+
+GCC_OPTS =
+
+GCC_SUBPACKAGES = $(top_srcdir)/common/common.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/gccnewlib.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/prep.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/build.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/install.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/rpm-install.add
+GCC_SUBPACKAGES += $(top_srcdir)/common/clean.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-gcc.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/base-gcc.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-c++.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-gfortran.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/base-gfortran.add
+GCC_SUBPACKAGES += $(top_srcdir)/gcc/target-objc.add
+
+$(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 "/[@]tool_target[@]-newlib/d" \
+	  -e "/[@]tool_target[@]-w32api-sys-root/d" \
+	  -e "/--with-newlib/d" \
+	  | $(MKSPEC0) > $(TARGET)-gcc.spec.in
+CLEANFILES += $(TARGET)-gcc.spec.in
+
+ at rpmprefix@$(TARGET)-gcc.spec: $(TARGET)-gcc.spec.in
+	$(MKSPEC) $(TARGET)-gcc.spec.in | $(SPECSTRIP) $(GCC_OPTS) > $@
+if CUSTOM_RPMPREFIX
+CLEANFILES += @rpmprefix@$(TARGET)-gcc.spec
+endif
+noinst_DATA += @rpmprefix@$(TARGET)-gcc.spec
+
+EXTRA_DIST += $(GCC_SUBPACKAGES)
diff --git a/freebsd8.4/i586/Makefile.am b/freebsd8.4/i586/Makefile.am
new file mode 100644
index 0000000..a1c99c5
--- /dev/null
+++ b/freebsd8.4/i586/Makefile.am
@@ -0,0 +1,21 @@
+TARGET = i586-pc-freebsd8.4
+
+include $(top_srcdir)/mkspec.am
+
+FREEBSD_VERS = 8.4
+FREEBSD_RPMREL = 0.20131002.0
+EXTRA_DIST += libs.add
+EXTRA_DIST += target-libs.add
+include ../libs.am
+
+BINUTILS_VERS = 2.23.2
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = 0.20130605.0
+include ../binutils.am
+BINUTILS_OPTS +=
+
+GCC_VERS = 4.7.3
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = 0.20130824.0
+include ../gcc.am
+GCC_OPTS += --languages=cxx,fortran,objc
diff --git a/freebsd8.4/i586/Makefile.in b/freebsd8.4/i586/Makefile.in
new file mode 100644
index 0000000..e5a43e1
--- /dev/null
+++ b/freebsd8.4/i586/Makefile.in
@@ -0,0 +1,488 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+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 = $(top_srcdir)/mkspec.am $(srcdir)/../libs.am \
+	$(srcdir)/../binutils.am $(srcdir)/../gcc.am \
+	$(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ at CUSTOM_RPMPREFIX_TRUE@am__append_1 = @rpmprefix@$(TARGET)-binutils.spec
+ at CUSTOM_RPMPREFIX_TRUE@am__append_2 = @rpmprefix@$(TARGET)-gcc.spec
+subdir = freebsd8.4/i586
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(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 =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+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)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+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@
+MAINT = @MAINT@
+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@
+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 = @rtems_api@
+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 = i586-pc-freebsd8.4
+noinst_DATA = @rpmprefix@$(TARGET)-libs.spec \
+	@rpmprefix@$(TARGET)-binutils.spec \
+	@rpmprefix@$(TARGET)-gcc.spec
+CLEANFILES = $(TARGET)-libs.spec.in @rpmprefix@$(TARGET)-libs.spec \
+	$(TARGET)-binutils.spec.in $(am__append_1) \
+	$(TARGET)-gcc.spec.in $(am__append_2)
+EXTRA_DIST = libs.add target-libs.add binutils-sources.add \
+	$(BINUTILS_SUBPACKAGES) $(srcdir)/../gcc-prep.add \
+	$(srcdir)/gcc-sources.add $(GCC_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"
+
+FREEBSD_VERS = 8.4
+FREEBSD_RPMREL = 0.20131002.0
+LIBS_SUBPACKAGES = $(top_srcdir)/common/common.add $(srcdir)/libs.add \
+	$(top_srcdir)/gcc/rpm-install.add \
+	$(top_srcdir)/common/clean.add $(srcdir)/target-libs.add
+BINUTILS_VERS = 2.23.2
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = 0.20130605.0
+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.3
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = 0.20130824.0
+GCC_OPTS = --languages=cxx,fortran,objc
+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/target-objc.add
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mkspec.am $(srcdir)/../libs.am $(srcdir)/../binutils.am $(srcdir)/../gcc.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) --foreign freebsd8.4/i586/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign freebsd8.4/i586/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)/../libs.am $(srcdir)/../binutils.am $(srcdir)/../gcc.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+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 cscopelist-am \
+	ctags-am 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 tags-am uninstall uninstall-am
+
+
+$(TARGET)-libs.spec.in: $(LIBS_SUBPACKAGES) Makefile.am
+	cat $(LIBS_SUBPACKAGES) | sed \
+	  -e "s/[@]FREEBSD_VERS[@]/$(FREEBSD_VERS)/g" \
+	  -e "s/[@]FREEBSD_RPMREL[@]/$(FREEBSD_RPMREL)%{?dist}/g" \
+	  -e "s,%{gcc_rpmvers},%{freebsd_rpmvers},g" \
+	> $(TARGET)-libs.spec.in
+
+ at rpmprefix@$(TARGET)-libs.spec: $(TARGET)-libs.spec.in
+	$(MKSPEC) $(TARGET)-libs.spec.in | $(SPECSTRIP) > $@
+
+$(TARGET)-binutils.spec.in: $(BINUTILS_SUBPACKAGES) Makefile.am $(srcdir)/binutils-sources.add
+	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" \
+	  | $(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 "/[@]tool_target[@]-newlib/d" \
+	  -e "/[@]tool_target[@]-w32api-sys-root/d" \
+	  -e "/--with-newlib/d" \
+	  | $(MKSPEC0) > $(TARGET)-gcc.spec.in
+
+ at rpmprefix@$(TARGET)-gcc.spec: $(TARGET)-gcc.spec.in
+	$(MKSPEC) $(TARGET)-gcc.spec.in | $(SPECSTRIP) $(GCC_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/freebsd8.4/i586/binutils-sources.add b/freebsd8.4/i586/binutils-sources.add
new file mode 100644
index 0000000..d6e461e
--- /dev/null
+++ b/freebsd8.4/i586/binutils-sources.add
@@ -0,0 +1,4 @@
+Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+%if "%{binutils_version}" == "2.23.2"
+Patch0:  ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/binutils-2.23.2-rtems4.11-20130326.diff
+%endif
diff --git a/freebsd8.4/i586/gcc-sources.add b/freebsd8.4/i586/gcc-sources.add
new file mode 100644
index 0000000..ed8a73d
--- /dev/null
+++ b/freebsd8.4/i586/gcc-sources.add
@@ -0,0 +1,43 @@
+%if "%{gcc_version}" == "4.8.0"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.0/gcc-4.8.0.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.8.0.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.8.0-rtems4.11-20130326.diff
+%endif
+%if "%{gcc_version}" == "4.7.3"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.3/gcc-4.7.3.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.3.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.3-rtems4.11-20130529.diff
+%endif
+%if "%{gcc_version}" == "4.7.2"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.2/gcc-4.7.2.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.2.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.2-rtems4.11-20130318.diff
+%endif
+%if "%{gcc_version}" == "4.7.1"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.1/gcc-4.7.1.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.1.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.1-rtems4.11-20120712.diff
+%endif
+%if "%{gcc_version}" == "4.7.0"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.0/gcc-4.7.0.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.0.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.0-rtems4.11-20120419.diff
+%endif
+%if "%{gcc_version}" == "4.6.3"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.bz2
+Source0:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.6.3.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.6.3-rtems4.11-20120303.diff
+%endif
+%if "%{gcc_version}" == "4.5.4"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.4/gcc-4.5.4.tar.bz2
+Source0:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.5.4.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.4-rtems4.11-20120703.diff
+Patch1:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.4-rtems4.11-20120703.diff
+%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-20130325.diff
+%endif
+%endif
diff --git a/freebsd8.4/i586/i586-pc-freebsd8.4-binutils.spec b/freebsd8.4/i586/i586-pc-freebsd8.4-binutils.spec
new file mode 100644
index 0000000..aeddda4
--- /dev/null
+++ b/freebsd8.4/i586/i586-pc-freebsd8.4-binutils.spec
@@ -0,0 +1,174 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%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
+
+%{?!el5:%global _with_noarch_subpackages 1}
+%define binutils_pkgvers 2.23.2
+%define binutils_version 2.23.2
+%define binutils_rpmvers %{expand:%(echo "2.23.2" | tr - _ )}
+
+Name:		i586-pc-freebsd8.4-binutils
+Summary:	Binutils for target i586-pc-freebsd8.4
+Group:		Development/Tools
+Version:	%{binutils_rpmvers}
+Release:	0.20130605.0%{?dist}
+License:	GPL/LGPL
+URL: 		http://sourceware.org/binutils
+%{?el5: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:	%{?suse:makeinfo}%{!?suse:texinfo} >= 4.2
+%else
+%endif
+BuildRequires:	flex
+BuildRequires:	bison
+
+Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+%if "%{binutils_version}" == "2.23.2"
+Patch0:  ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/binutils-2.23.2-rtems4.11-20130326.diff
+%endif
+
+%description
+Cross binutils for target i586-pc-freebsd8.4
+%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
+  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=i586-pc-freebsd8.4 \
+    --verbose --disable-nls \
+    --without-included-gettext \
+    --disable-win32-registry \
+    --disable-werror \
+    --with-sysroot=%{_prefix}/i586-pc-freebsd8.4/sys-root \
+    --prefix=%{_prefix} --bindir=%{_bindir} \
+    --exec-prefix=%{_exec_prefix} \
+    --includedir=%{_includedir} --libdir=%{_libdir} \
+    --mandir=%{_mandir} --infodir=%{_infodir}
+
+  make %{?_smp_mflags} all
+  cd ..
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+  make DESTDIR=$RPM_BUILD_ROOT install
+
+
+# Conflict with a native binutils' infos
+  rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# We don't ship host files
+  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
+
+# manpages without corresponding tools
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd8.4-dlltool%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd8.4-dlltool*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd8.4-nlmconv%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd8.4-nlmconv*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd8.4-windres%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd8.4-windres*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd8.4-windmc%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd8.4-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
+  ;;
+esac
+done
+
+sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# i586-pc-freebsd8.4-binutils
+# ==============================================================
+# %package -n i586-pc-freebsd8.4-binutils
+# Summary:      rtems binutils for i586-pc-freebsd8.4
+# Group: Development/Tools
+# %if %build_infos
+# Requires: binutils-common
+# %endif
+
+%description -n i586-pc-freebsd8.4-binutils
+GNU binutils targetting i586-pc-freebsd8.4.
+
+%files -n i586-pc-freebsd8.4-binutils
+%defattr(-,root,root)
+
+%{_mandir}/man1/i586-pc-freebsd8.4-*.1*
+
+%{_bindir}/i586-pc-freebsd8.4-*
+
+%dir %{_exec_prefix}/i586-pc-freebsd8.4
+%dir %{_exec_prefix}/i586-pc-freebsd8.4/bin
+%{_exec_prefix}/i586-pc-freebsd8.4/bin/*
+
+%dir %{_exec_prefix}/i586-pc-freebsd8.4/lib
+%{_exec_prefix}/i586-pc-freebsd8.4/lib/ldscripts
+
diff --git a/freebsd8.4/i586/i586-pc-freebsd8.4-gcc.spec b/freebsd8.4/i586/i586-pc-freebsd8.4-gcc.spec
new file mode 100644
index 0000000..18c66e9
--- /dev/null
+++ b/freebsd8.4/i586/i586-pc-freebsd8.4-gcc.spec
@@ -0,0 +1,831 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%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
+
+%{?!el5:%global _with_noarch_subpackages 1}
+
+%define gcc_pkgvers 4.7.3
+%define gcc_version 4.7.3
+%define gcc_rpmvers %{expand:%(echo "4.7.3" | tr - _ )}
+
+
+Name:         	i586-pc-freebsd8.4-gcc
+Summary:      	i586-pc-freebsd8.4 gcc
+
+Group:	      	Development/Tools
+Version:        %{gcc_rpmvers}
+Release:      	0.20130824.0%{?dist}
+License:      	GPL
+URL:		http://gcc.gnu.org
+%{?el5:BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)}
+
+%define _use_internal_dependency_generator 0
+
+BuildRequires:  %{_host_rpmprefix}gcc
+%if "%{gcc_version}" >= "4.8.0"
+BuildRequires:  %{_host_rpmprefix}gcc-c++
+%endif
+
+# 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%{?fc20}
+%global mpc_provided 1.0.1
+%global mpfr_provided 3.1.2
+%global gmp_provided 5.1.2
+%endif
+
+%if 0%{?fc19}
+%global mpc_provided 1.0.1
+%global mpfr_provided 3.1.1
+%global gmp_provided 5.1.1
+%endif
+
+%if 0%{?fc18}
+%global mpc_provided 0.9
+%global mpfr_provided 3.1.1
+%global gmp_provided 5.0.5
+%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_3}
+%global mpc_provided 1.0
+%global mpfr_provided 3.1.1
+%global gmp_provided 5.0.5
+%endif
+
+%if 0%{?suse12_2}
+%global mpc_provided 0.8.2
+%global mpfr_provided 3.1.0
+%global gmp_provided 5.0.5
+%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"
+%define gmp_required		4.1
+%define mpfr_required		2.2.1
+%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:  i586-pc-freebsd8.4-gcc = %{gcc_rpmvers}
+%if "%{gcc_version}" >= "4.8.0"
+BuildRequires:  i586-pc-freebsd8.4-gcc-c++ = %{gcc_rpmvers}
+%endif
+%endif
+
+# Not strictly required, but patches may introduce a need to use them.
+# For reasons of simplicity, always require them.
+BuildRequires:	flex bison
+
+BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo} >= 4.2
+BuildRequires:	i586-pc-freebsd8.4-binutils
+BuildRequires:	i586-pc-freebsd8.4-sys-root
+
+Requires:	i586-pc-freebsd8.4-binutils
+Requires:	i586-pc-freebsd8.4-sys-root
+Requires:	i586-pc-freebsd8.4-gcc-libgcc = %{gcc_rpmvers}-%{release}
+
+%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.8.0"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.0/gcc-4.8.0.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.8.0.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.8.0-rtems4.11-20130326.diff
+%endif
+%if "%{gcc_version}" == "4.7.3"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.3/gcc-4.7.3.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.3.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.3-rtems4.11-20130529.diff
+%endif
+%if "%{gcc_version}" == "4.7.2"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.2/gcc-4.7.2.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.2.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.2-rtems4.11-20130318.diff
+%endif
+%if "%{gcc_version}" == "4.7.1"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.1/gcc-4.7.1.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.1.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.1-rtems4.11-20120712.diff
+%endif
+%if "%{gcc_version}" == "4.7.0"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.0/gcc-4.7.0.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.0.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.0-rtems4.11-20120419.diff
+%endif
+%if "%{gcc_version}" == "4.6.3"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.bz2
+Source0:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.6.3.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.6.3-rtems4.11-20120303.diff
+%endif
+%if "%{gcc_version}" == "4.5.4"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.4/gcc-4.5.4.tar.bz2
+Source0:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.5.4.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.4-rtems4.11-20120703.diff
+Patch1:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.4-rtems4.11-20120703.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 i586-pc-freebsd8.4.
+
+%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 ..
+
+%{?SOURCE2:%setup -q -T -D -n %{name}-%{version} -a2}
+%{?PATCH2:%patch2 -p0}
+
+
+
+%{?SOURCE5:%setup -q -T -D -n %{name}-%{version} -a5}
+%{?PATCH5:%patch5 -p0}
+
+%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
+
+
+%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
+
+
+  # Fix timestamps
+  cd gcc-%{gcc_pkgvers}
+  contrib/gcc_update --touch
+  cd ..
+%build
+  mkdir -p build
+
+  cd build
+
+  languages="c"
+  languages="$languages,c++"
+  languages="$languages,fortran"
+  languages="$languages,objc"
+%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=i586-pc-freebsd8.4 \
+    --disable-libstdcxx-pch \
+    --with-gnu-as --with-gnu-ld --verbose \
+    --with-system-zlib \
+    --disable-nls --without-included-gettext \
+    --disable-win32-registry \
+    --enable-version-specific-runtime-libs \
+    --enable-threads \
+    --with-sysroot=%{_exec_prefix}/i586-pc-freebsd8.4/sys-root \
+    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
+    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
+    --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
+  cd ..
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+
+  make DESTDIR=$RPM_BUILD_ROOT install
+  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/i586-pc-freebsd8.4/%{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}/i586-pc-freebsd8.4-c++filt%{_exeext}
+
+
+# Conflict with a native GCC's infos
+  rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# Conflict with a native GCC's man pages
+  rm -rf $RPM_BUILD_ROOT%{_mandir}/man7
+
+  # 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}/i586-pc-freebsd8.4-i586-pc-freebsd8.4-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/i586-pc-freebsd8.4/%{gcc_version}/install-tools
+  rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/install-tools
+
+  # Bug in gcc > 4.1.0: Installs an unused, empty directory
+  if test -d ${RPM_BUILD_ROOT}%{_prefix}/i586-pc-freebsd8.4/include/bits; then
+    rmdir ${RPM_BUILD_ROOT}%{_prefix}/i586-pc-freebsd8.4/include/bits
+  fi
+
+%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,;.*$,,'`
+
+
+  rm -f dirs ;
+  echo "%defattr(-,root,root,-)" >> dirs
+  TGTDIR="%{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{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/i586-pc-freebsd8.4/%{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}/i586-pc-freebsd8.4/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
+  ;;
+esac
+done
+
+sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< 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}/i586-pc-freebsd8.4/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i586-pc-freebsd8.4/'} | %__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}/i586-pc-freebsd8.4/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i586-pc-freebsd8.4/'} | %__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
+
+# ==============================================================
+# i586-pc-freebsd8.4-gcc
+# ==============================================================
+# %package -n i586-pc-freebsd8.4-gcc
+# Summary:        GNU cc compiler for i586-pc-freebsd8.4
+# Group:          Development/Tools
+# Version:        %{gcc_rpmvers}
+# Requires:       i586-pc-freebsd8.4-binutils
+# License:	GPL
+
+# %if %build_infos
+# Requires:      gcc-common
+# %endif
+
+%description -n i586-pc-freebsd8.4-gcc
+GNU cc compiler for i586-pc-freebsd8.4.
+
+# ==============================================================
+# i586-pc-freebsd8.4-gcc-libgcc
+# ==============================================================
+%package -n i586-pc-freebsd8.4-gcc-libgcc
+Summary:        libgcc for i586-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n i586-pc-freebsd8.4-gcc-libgcc
+libgcc i586-pc-freebsd8.4-gcc.
+
+
+%files -n i586-pc-freebsd8.4-gcc
+%defattr(-,root,root)
+
+%{_mandir}/man1/i586-pc-freebsd8.4-gcc.1*
+%{_mandir}/man1/i586-pc-freebsd8.4-cpp.1*
+%{_mandir}/man1/i586-pc-freebsd8.4-gcov.1*
+
+%{_bindir}/i586-pc-freebsd8.4-cpp%{_exeext}
+%{_bindir}/i586-pc-freebsd8.4-gcc%{_exeext}
+%{_bindir}/i586-pc-freebsd8.4-gcc-%{gcc_version}%{_exeext}
+%{_bindir}/i586-pc-freebsd8.4-gcov%{_exeext}
+%if "%{gcc_version}" < "4.6.0"
+%{_bindir}/i586-pc-freebsd8.4-gccbug
+%endif
+%if "%{gcc_version}" >= "4.7.0"
+# FIXME: To ship or not to ship?
+%{_bindir}/i586-pc-freebsd8.4-gcc-ar%{_exeext}
+%{_bindir}/i586-pc-freebsd8.4-gcc-nm%{_exeext}
+%{_bindir}/i586-pc-freebsd8.4-gcc-ranlib%{_exeext}
+%endif
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/i586-pc-freebsd8.4
+%dir %{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}
+%{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/cc1%{_exeext}
+%{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/collect2%{_exeext}
+%if "%{gcc_version}" >= "4.5.0"
+%{?with_lto:%{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/lto%{_exeext}}
+%{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/lto-wrapper%{_exeext}
+%endif
+
+%files -n i586-pc-freebsd8.4-gcc-libgcc -f build/files.gcc
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/include
+
+%if "%{gcc_version}" > "4.0.3"
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/include/ssp
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/include-fixed
+%endif
+
+# ==============================================================
+# i586-pc-freebsd8.4-gcc-c++
+# ==============================================================
+%package -n i586-pc-freebsd8.4-gcc-c++
+Summary:	GCC c++ compiler for i586-pc-freebsd8.4
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+Requires:       i586-pc-freebsd8.4-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
+
+%if "%{_build}" != "%{_host}"
+BuildRequires:  i586-pc-freebsd8.4-gcc-c++ = %{gcc_rpmvers}
+%endif
+
+Requires:       i586-pc-freebsd8.4-gcc = %{gcc_rpmvers}-%{release}
+
+%description -n i586-pc-freebsd8.4-gcc-c++
+GCC c++ compiler for i586-pc-freebsd8.4.
+
+
+%package -n i586-pc-freebsd8.4-gcc-libstdc++
+Summary:	libstdc++ for i586-pc-freebsd8.4
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n i586-pc-freebsd8.4-gcc-libstdc++
+%{summary}
+
+
+%files -n i586-pc-freebsd8.4-gcc-c++
+%defattr(-,root,root)
+
+%{_mandir}/man1/i586-pc-freebsd8.4-g++.1*
+
+%{_bindir}/i586-pc-freebsd8.4-c++%{_exeext}
+%{_bindir}/i586-pc-freebsd8.4-g++%{_exeext}
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/i586-pc-freebsd8.4
+%dir %{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}
+%{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/cc1plus%{_exeext}
+
+
+%files -n i586-pc-freebsd8.4-gcc-libstdc++ -f build/files.g++
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/include
+%{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/include/c++
+
+# ==============================================================
+# i586-pc-freebsd8.4-gcc-gfortran
+# ==============================================================
+%package -n i586-pc-freebsd8.4-gcc-gfortran
+Summary:	Fortran 95 support for i586-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+
+Requires:       i586-pc-freebsd8.4-gcc = %{gcc_rpmvers}-%{release}
+Requires:       i586-pc-freebsd8.4-gcc-libgfortran = %{gcc_rpmvers}-%{release}
+
+%description -n i586-pc-freebsd8.4-gcc-gfortran
+GCC fortran compiler for i586-pc-freebsd8.4.
+
+%files -n i586-pc-freebsd8.4-gcc-gfortran
+%defattr(-,root,root)
+%{_bindir}/i586-pc-freebsd8.4-gfortran%{_exeext}
+
+%{_mandir}/man1/i586-pc-freebsd8.4-gfortran.1*
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/i586-pc-freebsd8.4
+%dir %{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}
+%{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/f951%{_exeext}
+
+# ==============================================================
+# i586-pc-freebsd8.4-gcc-libgfortran
+# ==============================================================
+%package -n i586-pc-freebsd8.4-gcc-libgfortran
+Summary:	Fortran 95 support libraries for i586-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n i586-pc-freebsd8.4-gcc-libgfortran
+%{summary}
+
+%files -n i586-pc-freebsd8.4-gcc-libgfortran -f build/files.gfortran
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}
+%if "%{gcc_version}" >= "4.2.0"
+%{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/finclude
+%endif
+
+# ==============================================================
+# i586-pc-freebsd8.4-gcc-objc
+# ==============================================================
+%package -n i586-pc-freebsd8.4-gcc-objc
+Summary:        Objective C support for i586-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+
+Requires:       i586-pc-freebsd8.4-gcc = %{gcc_rpmvers}-%{release}
+Requires:       i586-pc-freebsd8.4-gcc-libobjc = %{gcc_rpmvers}-%{release}
+
+%description -n i586-pc-freebsd8.4-gcc-objc
+GCC objc compiler for i586-pc-freebsd8.4.
+
+%files -n i586-pc-freebsd8.4-gcc-objc
+%defattr(-,root,root)
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/i586-pc-freebsd8.4
+%dir %{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}
+%{_libexecdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/cc1obj%{_exeext}
+
+# ==============================================================
+# i586-pc-freebsd8.4-gcc-libobjc
+# ==============================================================
+%package -n i586-pc-freebsd8.4-gcc-libobjc
+Summary:        Objective C support for i586-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n i586-pc-freebsd8.4-gcc-libobjc
+Support libraries for GCC's objc compiler for i586-pc-freebsd8.4.
+
+%files -n i586-pc-freebsd8.4-gcc-libobjc -f build/files.objc
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}
+%dir %{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/include
+%{_gcclibdir}/gcc/i586-pc-freebsd8.4/%{gcc_version}/include/objc
+
diff --git a/freebsd8.4/i586/i586-pc-freebsd8.4-libs.spec b/freebsd8.4/i586/i586-pc-freebsd8.4-libs.spec
new file mode 100644
index 0000000..2003609
--- /dev/null
+++ b/freebsd8.4/i586/i586-pc-freebsd8.4-libs.spec
@@ -0,0 +1,218 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%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
+
+%{?!el5:%global _with_noarch_subpackages 1}
+%define freebsd_version 8.4
+%define freebsd_rpmvers %{expand:%(echo 8.4 | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name:		i586-pc-freebsd8.4
+Release:	0.20131002.0%{?dist}
+License:	FreeBSD
+Group:		Development/Tools
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:	noarch
+BuildRequires:  star gzip
+
+Version:      	%freebsd_rpmvers
+Summary:      	i586-pc-freebsd8.4 Libraries
+
+Source0:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.aa
+Source1:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ab
+Source2:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ac
+Source3:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ad
+Source4:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ae
+Source5:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.af
+Source6:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ag
+Source7:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ah
+Source8:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ai
+Source9:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.aj
+Source10: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ak
+Source11: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.al
+Source12: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.am
+Source13: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.an
+Source14: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ao
+Source15: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ap
+Source16: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.aq
+Source17: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ar
+Source18: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.as
+Source19: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.at
+Source20: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.au
+Source21: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.av
+Source22: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.aw
+Source23: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ax
+Source24: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ay
+Source25: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.az
+Source26: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ba
+Source27: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bb
+Source28: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bc
+Source29: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bd
+Source30: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.be
+Source31: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bf
+Source32: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bg
+Source33: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bh
+Source34: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bi
+Source35: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bj
+Source36: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bk
+Source37: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bl
+Source38: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bm
+Source39: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bn
+Source40: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bo
+Source41: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bp
+Source42: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bq
+
+%description
+i586-pc-freebsd8.4 libraries.
+
+%prep
+%setup -q -c -T -n %{name}-%{version}
+
+  cat \
+ %SOURCE0 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 \
+ %SOURCE5 %SOURCE6 %SOURCE7 %SOURCE8 %SOURCE9 \
+ %SOURCE10 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE14 \
+ %SOURCE15 %SOURCE16 %SOURCE17 %SOURCE18 %SOURCE19 \
+ %SOURCE20 %SOURCE21 %SOURCE22 %SOURCE23 %SOURCE24 \
+ %SOURCE25 %SOURCE26 %SOURCE27 %SOURCE28 %SOURCE29 \
+ %SOURCE30 %SOURCE31 %SOURCE32 %SOURCE33 %SOURCE34 \
+ %SOURCE35 %SOURCE36 %SOURCE37 %SOURCE38 %SOURCE39 \
+ %SOURCE40 %SOURCE41 %SOURCE42 \
+ | star -x compress-program=gzip
+
+%build
+  # Setup sys-root (Usable for gcc >= 3.4)
+  mkdir -p i586-pc-freebsd8.4/sys-root
+  %{__tar} cf - lib usr/lib usr/include | ( cd i586-pc-freebsd8.4/sys-root ; %{__tar} xf -)
+
+  pushd i586-pc-freebsd8.4/sys-root/usr/lib > /dev/null
+  # missing files
+  rm -f lib*_p.*
+  # not needed
+  rm -rf aout compat
+
+  # Fix up symlinks
+  find -type l -exec ls -l {} \; | \
+    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
+    case $aA in
+    /lib* ) # link
+       rm $a8;
+       b=`basename $aA`
+       ln -s ../../lib/$b $a8
+       ;;
+    esac
+  done
+  popd > /dev/null
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}
+  cp -a i586-pc-freebsd8.4 $RPM_BUILD_ROOT%{_prefix}
+
+# 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
+  ;;
+esac
+done
+
+sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+
+cat << EOF > %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i586-pc-freebsd8.4/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i586-pc-freebsd8.4/'} | %__find_provides
+EOF
+chmod +x %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
+%define __find_provides %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
+
+cat << EOF > %{_builddir}/%{name}-%{freebsd_rpmvers}/find-requires
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/i586-pc-freebsd8.4/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/i586-pc-freebsd8.4/'} | %__find_requires
+EOF
+chmod +x %{_builddir}/%{name}-%{freebsd_rpmvers}/find-requires
+%define __find_requires %{_builddir}/%{name}-%{freebsd_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
+
+%package sys-root
+Group: Development/Tools
+Summary: i586-pc-freebsd8.4 target files for gcc >= 3.4
+
+%description sys-root
+i586-pc-freebsd8.4 target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/i586-pc-freebsd8.4
+%{_prefix}/i586-pc-freebsd8.4/sys-root
diff --git a/freebsd8.4/i586/libs.add b/freebsd8.4/i586/libs.add
new file mode 100644
index 0000000..999a2a6
--- /dev/null
+++ b/freebsd8.4/i586/libs.add
@@ -0,0 +1,109 @@
+%define freebsd_version @FREEBSD_VERS@
+%define freebsd_rpmvers %{expand:%(echo @FREEBSD_VERS@ | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name:		@rpmprefix@@tool_target@
+Release:	@FREEBSD_RPMREL@
+License:	FreeBSD
+Group:		Development/Tools
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:	noarch
+BuildRequires:  star gzip
+
+Version:      	%freebsd_rpmvers
+Summary:      	@tool_target@ Libraries
+
+Source0:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.aa
+Source1:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ab
+Source2:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ac
+Source3:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ad
+Source4:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ae
+Source5:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.af
+Source6:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ag
+Source7:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ah
+Source8:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ai
+Source9:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.aj
+Source10: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ak
+Source11: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.al
+Source12: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.am
+Source13: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.an
+Source14: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ao
+Source15: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ap
+Source16: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.aq
+Source17: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ar
+Source18: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.as
+Source19: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.at
+Source20: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.au
+Source21: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.av
+Source22: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.aw
+Source23: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ax
+Source24: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ay
+Source25: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.az
+Source26: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ba
+Source27: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bb
+Source28: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bc
+Source29: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bd
+Source30: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.be
+Source31: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bf
+Source32: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bg
+Source33: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bh
+Source34: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bi
+Source35: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bj
+Source36: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bk
+Source37: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bl
+Source38: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bm
+Source39: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bn
+Source40: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bo
+Source41: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bp
+Source42: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bq
+
+%description
+ at tool_target@ libraries.
+
+%prep
+%setup -q -c -T -n %{name}-%{version}
+
+  cat \
+ %SOURCE0 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 \
+ %SOURCE5 %SOURCE6 %SOURCE7 %SOURCE8 %SOURCE9 \
+ %SOURCE10 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE14 \
+ %SOURCE15 %SOURCE16 %SOURCE17 %SOURCE18 %SOURCE19 \
+ %SOURCE20 %SOURCE21 %SOURCE22 %SOURCE23 %SOURCE24 \
+ %SOURCE25 %SOURCE26 %SOURCE27 %SOURCE28 %SOURCE29 \
+ %SOURCE30 %SOURCE31 %SOURCE32 %SOURCE33 %SOURCE34 \
+ %SOURCE35 %SOURCE36 %SOURCE37 %SOURCE38 %SOURCE39 \
+ %SOURCE40 %SOURCE41 %SOURCE42 \
+ | star -x compress-program=gzip
+
+%build
+  # Setup sys-root (Usable for gcc >= 3.4)
+  mkdir -p @tool_target@/sys-root
+  %{__tar} cf - lib usr/lib usr/include | ( cd @tool_target@/sys-root ; %{__tar} xf -)
+
+  pushd @tool_target@/sys-root/usr/lib > /dev/null
+  # missing files
+  rm -f lib*_p.*
+  # not needed
+  rm -rf aout compat
+
+  # Fix up symlinks
+  find -type l -exec ls -l {} \; | \
+    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
+    case $aA in
+    /lib* ) # link
+       rm $a8;
+       b=`basename $aA`
+       ln -s ../../lib/$b $a8
+       ;;
+    esac
+  done
+  popd > /dev/null
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}
+  cp -a @tool_target@ $RPM_BUILD_ROOT%{_prefix}
+
diff --git a/freebsd8.4/i586/target-libs.add b/freebsd8.4/i586/target-libs.add
new file mode 100644
index 0000000..0550fc7
--- /dev/null
+++ b/freebsd8.4/i586/target-libs.add
@@ -0,0 +1,11 @@
+%package sys-root
+Group: Development/Tools
+Summary: @tool_target@ target files for gcc >= 3.4
+
+%description sys-root
+ at tool_target@ target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/@tool_target@
+%{_prefix}/@tool_target@/sys-root
diff --git a/freebsd8.4/libs.am b/freebsd8.4/libs.am
new file mode 100644
index 0000000..a44fe58
--- /dev/null
+++ b/freebsd8.4/libs.am
@@ -0,0 +1,18 @@
+LIBS_SUBPACKAGES = $(top_srcdir)/common/common.add
+LIBS_SUBPACKAGES += $(srcdir)/libs.add
+LIBS_SUBPACKAGES += $(top_srcdir)/gcc/rpm-install.add
+LIBS_SUBPACKAGES += $(top_srcdir)/common/clean.add
+LIBS_SUBPACKAGES += $(srcdir)/target-libs.add
+
+$(TARGET)-libs.spec.in: $(LIBS_SUBPACKAGES) Makefile.am
+	cat $(LIBS_SUBPACKAGES) | sed \
+	  -e "s/[@]FREEBSD_VERS[@]/$(FREEBSD_VERS)/g" \
+	  -e "s/[@]FREEBSD_RPMREL[@]/$(FREEBSD_RPMREL)%{?dist}/g" \
+	  -e "s,%{gcc_rpmvers},%{freebsd_rpmvers},g" \
+	> $(TARGET)-libs.spec.in
+CLEANFILES += $(TARGET)-libs.spec.in
+	                      
+ at rpmprefix@$(TARGET)-libs.spec: $(TARGET)-libs.spec.in
+	$(MKSPEC) $(TARGET)-libs.spec.in | $(SPECSTRIP) > $@
+CLEANFILES += @rpmprefix@$(TARGET)-libs.spec
+noinst_DATA += @rpmprefix@$(TARGET)-libs.spec
diff --git a/freebsd8.4/x86_64/Makefile.am b/freebsd8.4/x86_64/Makefile.am
new file mode 100644
index 0000000..b969167
--- /dev/null
+++ b/freebsd8.4/x86_64/Makefile.am
@@ -0,0 +1,21 @@
+TARGET = amd64-pc-freebsd8.4
+
+include $(top_srcdir)/mkspec.am
+
+FREEBSD_VERS = 8.4
+FREEBSD_RPMREL = 0.20131002.0
+EXTRA_DIST += libs.add
+EXTRA_DIST += target-libs.add
+include ../libs.am
+
+BINUTILS_VERS = 2.23.2
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = 0.20130605.0
+include ../binutils.am
+BINUTILS_OPTS +=
+
+GCC_VERS = 4.7.3
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = 0.20130824.0
+include ../gcc.am
+GCC_OPTS += --languages=cxx,fortran,objc
diff --git a/freebsd8.4/x86_64/Makefile.in b/freebsd8.4/x86_64/Makefile.in
new file mode 100644
index 0000000..959e753
--- /dev/null
+++ b/freebsd8.4/x86_64/Makefile.in
@@ -0,0 +1,488 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+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 = $(top_srcdir)/mkspec.am $(srcdir)/../libs.am \
+	$(srcdir)/../binutils.am $(srcdir)/../gcc.am \
+	$(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ at CUSTOM_RPMPREFIX_TRUE@am__append_1 = @rpmprefix@$(TARGET)-binutils.spec
+ at CUSTOM_RPMPREFIX_TRUE@am__append_2 = @rpmprefix@$(TARGET)-gcc.spec
+subdir = freebsd8.4/x86_64
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(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 =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+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)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+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@
+MAINT = @MAINT@
+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@
+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 = @rtems_api@
+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 = amd64-pc-freebsd8.4
+noinst_DATA = @rpmprefix@$(TARGET)-libs.spec \
+	@rpmprefix@$(TARGET)-binutils.spec \
+	@rpmprefix@$(TARGET)-gcc.spec
+CLEANFILES = $(TARGET)-libs.spec.in @rpmprefix@$(TARGET)-libs.spec \
+	$(TARGET)-binutils.spec.in $(am__append_1) \
+	$(TARGET)-gcc.spec.in $(am__append_2)
+EXTRA_DIST = libs.add target-libs.add binutils-sources.add \
+	$(BINUTILS_SUBPACKAGES) $(srcdir)/../gcc-prep.add \
+	$(srcdir)/gcc-sources.add $(GCC_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"
+
+FREEBSD_VERS = 8.4
+FREEBSD_RPMREL = 0.20131002.0
+LIBS_SUBPACKAGES = $(top_srcdir)/common/common.add $(srcdir)/libs.add \
+	$(top_srcdir)/gcc/rpm-install.add \
+	$(top_srcdir)/common/clean.add $(srcdir)/target-libs.add
+BINUTILS_VERS = 2.23.2
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = 0.20130605.0
+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.3
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = 0.20130824.0
+GCC_OPTS = --languages=cxx,fortran,objc
+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/target-objc.add
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/mkspec.am $(srcdir)/../libs.am $(srcdir)/../binutils.am $(srcdir)/../gcc.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) --foreign freebsd8.4/x86_64/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign freebsd8.4/x86_64/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)/../libs.am $(srcdir)/../binutils.am $(srcdir)/../gcc.am:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+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 cscopelist-am \
+	ctags-am 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 tags-am uninstall uninstall-am
+
+
+$(TARGET)-libs.spec.in: $(LIBS_SUBPACKAGES) Makefile.am
+	cat $(LIBS_SUBPACKAGES) | sed \
+	  -e "s/[@]FREEBSD_VERS[@]/$(FREEBSD_VERS)/g" \
+	  -e "s/[@]FREEBSD_RPMREL[@]/$(FREEBSD_RPMREL)%{?dist}/g" \
+	  -e "s,%{gcc_rpmvers},%{freebsd_rpmvers},g" \
+	> $(TARGET)-libs.spec.in
+
+ at rpmprefix@$(TARGET)-libs.spec: $(TARGET)-libs.spec.in
+	$(MKSPEC) $(TARGET)-libs.spec.in | $(SPECSTRIP) > $@
+
+$(TARGET)-binutils.spec.in: $(BINUTILS_SUBPACKAGES) Makefile.am $(srcdir)/binutils-sources.add
+	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" \
+	  | $(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 "/[@]tool_target[@]-newlib/d" \
+	  -e "/[@]tool_target[@]-w32api-sys-root/d" \
+	  -e "/--with-newlib/d" \
+	  | $(MKSPEC0) > $(TARGET)-gcc.spec.in
+
+ at rpmprefix@$(TARGET)-gcc.spec: $(TARGET)-gcc.spec.in
+	$(MKSPEC) $(TARGET)-gcc.spec.in | $(SPECSTRIP) $(GCC_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/freebsd8.4/x86_64/amd64-pc-freebsd8.4-binutils.spec b/freebsd8.4/x86_64/amd64-pc-freebsd8.4-binutils.spec
new file mode 100644
index 0000000..80fe7c9
--- /dev/null
+++ b/freebsd8.4/x86_64/amd64-pc-freebsd8.4-binutils.spec
@@ -0,0 +1,174 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%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
+
+%{?!el5:%global _with_noarch_subpackages 1}
+%define binutils_pkgvers 2.23.2
+%define binutils_version 2.23.2
+%define binutils_rpmvers %{expand:%(echo "2.23.2" | tr - _ )}
+
+Name:		amd64-pc-freebsd8.4-binutils
+Summary:	Binutils for target amd64-pc-freebsd8.4
+Group:		Development/Tools
+Version:	%{binutils_rpmvers}
+Release:	0.20130605.0%{?dist}
+License:	GPL/LGPL
+URL: 		http://sourceware.org/binutils
+%{?el5: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:	%{?suse:makeinfo}%{!?suse:texinfo} >= 4.2
+%else
+%endif
+BuildRequires:	flex
+BuildRequires:	bison
+
+Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+%if "%{binutils_version}" == "2.23.2"
+Patch0:  ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/binutils-2.23.2-rtems4.11-20130326.diff
+%endif
+
+%description
+Cross binutils for target amd64-pc-freebsd8.4
+%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
+  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=amd64-pc-freebsd8.4 \
+    --verbose --disable-nls \
+    --without-included-gettext \
+    --disable-win32-registry \
+    --disable-werror \
+    --with-sysroot=%{_prefix}/amd64-pc-freebsd8.4/sys-root \
+    --prefix=%{_prefix} --bindir=%{_bindir} \
+    --exec-prefix=%{_exec_prefix} \
+    --includedir=%{_includedir} --libdir=%{_libdir} \
+    --mandir=%{_mandir} --infodir=%{_infodir}
+
+  make %{?_smp_mflags} all
+  cd ..
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+  make DESTDIR=$RPM_BUILD_ROOT install
+
+
+# Conflict with a native binutils' infos
+  rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# We don't ship host files
+  rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty*
+
+# manpages without corresponding tools
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/amd64-pc-freebsd8.4-dlltool%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/amd64-pc-freebsd8.4-dlltool*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/amd64-pc-freebsd8.4-nlmconv%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/amd64-pc-freebsd8.4-nlmconv*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/amd64-pc-freebsd8.4-windres%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/amd64-pc-freebsd8.4-windres*
+  fi
+  if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/amd64-pc-freebsd8.4-windmc%{_exeext}; then 
+    rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/amd64-pc-freebsd8.4-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
+  ;;
+esac
+done
+
+sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+%clean
+  rm -rf $RPM_BUILD_ROOT
+
+# ==============================================================
+# amd64-pc-freebsd8.4-binutils
+# ==============================================================
+# %package -n amd64-pc-freebsd8.4-binutils
+# Summary:      rtems binutils for amd64-pc-freebsd8.4
+# Group: Development/Tools
+# %if %build_infos
+# Requires: binutils-common
+# %endif
+
+%description -n amd64-pc-freebsd8.4-binutils
+GNU binutils targetting amd64-pc-freebsd8.4.
+
+%files -n amd64-pc-freebsd8.4-binutils
+%defattr(-,root,root)
+
+%{_mandir}/man1/amd64-pc-freebsd8.4-*.1*
+
+%{_bindir}/amd64-pc-freebsd8.4-*
+
+%dir %{_exec_prefix}/amd64-pc-freebsd8.4
+%dir %{_exec_prefix}/amd64-pc-freebsd8.4/bin
+%{_exec_prefix}/amd64-pc-freebsd8.4/bin/*
+
+%dir %{_exec_prefix}/amd64-pc-freebsd8.4/lib
+%{_exec_prefix}/amd64-pc-freebsd8.4/lib/ldscripts
+
diff --git a/freebsd8.4/x86_64/amd64-pc-freebsd8.4-gcc.spec b/freebsd8.4/x86_64/amd64-pc-freebsd8.4-gcc.spec
new file mode 100644
index 0000000..f27c2df
--- /dev/null
+++ b/freebsd8.4/x86_64/amd64-pc-freebsd8.4-gcc.spec
@@ -0,0 +1,831 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%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
+
+%{?!el5:%global _with_noarch_subpackages 1}
+
+%define gcc_pkgvers 4.7.3
+%define gcc_version 4.7.3
+%define gcc_rpmvers %{expand:%(echo "4.7.3" | tr - _ )}
+
+
+Name:         	amd64-pc-freebsd8.4-gcc
+Summary:      	amd64-pc-freebsd8.4 gcc
+
+Group:	      	Development/Tools
+Version:        %{gcc_rpmvers}
+Release:      	0.20130824.0%{?dist}
+License:      	GPL
+URL:		http://gcc.gnu.org
+%{?el5:BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)}
+
+%define _use_internal_dependency_generator 0
+
+BuildRequires:  %{_host_rpmprefix}gcc
+%if "%{gcc_version}" >= "4.8.0"
+BuildRequires:  %{_host_rpmprefix}gcc-c++
+%endif
+
+# 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%{?fc20}
+%global mpc_provided 1.0.1
+%global mpfr_provided 3.1.2
+%global gmp_provided 5.1.2
+%endif
+
+%if 0%{?fc19}
+%global mpc_provided 1.0.1
+%global mpfr_provided 3.1.1
+%global gmp_provided 5.1.1
+%endif
+
+%if 0%{?fc18}
+%global mpc_provided 0.9
+%global mpfr_provided 3.1.1
+%global gmp_provided 5.0.5
+%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_3}
+%global mpc_provided 1.0
+%global mpfr_provided 3.1.1
+%global gmp_provided 5.0.5
+%endif
+
+%if 0%{?suse12_2}
+%global mpc_provided 0.8.2
+%global mpfr_provided 3.1.0
+%global gmp_provided 5.0.5
+%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"
+%define gmp_required		4.1
+%define mpfr_required		2.2.1
+%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:  amd64-pc-freebsd8.4-gcc = %{gcc_rpmvers}
+%if "%{gcc_version}" >= "4.8.0"
+BuildRequires:  amd64-pc-freebsd8.4-gcc-c++ = %{gcc_rpmvers}
+%endif
+%endif
+
+# Not strictly required, but patches may introduce a need to use them.
+# For reasons of simplicity, always require them.
+BuildRequires:	flex bison
+
+BuildRequires:	%{?suse:makeinfo}%{!?suse:texinfo} >= 4.2
+BuildRequires:	amd64-pc-freebsd8.4-binutils
+BuildRequires:	amd64-pc-freebsd8.4-sys-root
+
+Requires:	amd64-pc-freebsd8.4-binutils
+Requires:	amd64-pc-freebsd8.4-sys-root
+Requires:	amd64-pc-freebsd8.4-gcc-libgcc = %{gcc_rpmvers}-%{release}
+
+%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.8.0"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.0/gcc-4.8.0.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.8.0.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.8.0-rtems4.11-20130326.diff
+%endif
+%if "%{gcc_version}" == "4.7.3"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.3/gcc-4.7.3.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.3.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.3-rtems4.11-20130529.diff
+%endif
+%if "%{gcc_version}" == "4.7.2"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.2/gcc-4.7.2.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.2.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.2-rtems4.11-20130318.diff
+%endif
+%if "%{gcc_version}" == "4.7.1"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.1/gcc-4.7.1.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.1.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.1-rtems4.11-20120712.diff
+%endif
+%if "%{gcc_version}" == "4.7.0"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.0/gcc-4.7.0.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.0.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.0-rtems4.11-20120419.diff
+%endif
+%if "%{gcc_version}" == "4.6.3"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.bz2
+Source0:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.6.3.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.6.3-rtems4.11-20120303.diff
+%endif
+%if "%{gcc_version}" == "4.5.4"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.4/gcc-4.5.4.tar.bz2
+Source0:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.5.4.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.4-rtems4.11-20120703.diff
+Patch1:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.4-rtems4.11-20120703.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 amd64-pc-freebsd8.4.
+
+%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 ..
+
+%{?SOURCE2:%setup -q -T -D -n %{name}-%{version} -a2}
+%{?PATCH2:%patch2 -p0}
+
+
+
+%{?SOURCE5:%setup -q -T -D -n %{name}-%{version} -a5}
+%{?PATCH5:%patch5 -p0}
+
+%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
+
+
+%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
+
+
+  # Fix timestamps
+  cd gcc-%{gcc_pkgvers}
+  contrib/gcc_update --touch
+  cd ..
+%build
+  mkdir -p build
+
+  cd build
+
+  languages="c"
+  languages="$languages,c++"
+  languages="$languages,fortran"
+  languages="$languages,objc"
+%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=amd64-pc-freebsd8.4 \
+    --disable-libstdcxx-pch \
+    --with-gnu-as --with-gnu-ld --verbose \
+    --with-system-zlib \
+    --disable-nls --without-included-gettext \
+    --disable-win32-registry \
+    --enable-version-specific-runtime-libs \
+    --enable-threads \
+    --with-sysroot=%{_exec_prefix}/amd64-pc-freebsd8.4/sys-root \
+    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
+    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
+    --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
+  cd ..
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+
+  cd build
+
+  make DESTDIR=$RPM_BUILD_ROOT install
+  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/amd64-pc-freebsd8.4/%{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}/amd64-pc-freebsd8.4-c++filt%{_exeext}
+
+
+# Conflict with a native GCC's infos
+  rm -rf $RPM_BUILD_ROOT%{_infodir}
+
+# Conflict with a native GCC's man pages
+  rm -rf $RPM_BUILD_ROOT%{_mandir}/man7
+
+  # 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}/amd64-pc-freebsd8.4-amd64-pc-freebsd8.4-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/amd64-pc-freebsd8.4/%{gcc_version}/install-tools
+  rm -rf ${RPM_BUILD_ROOT}%{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/install-tools
+
+  # Bug in gcc > 4.1.0: Installs an unused, empty directory
+  if test -d ${RPM_BUILD_ROOT}%{_prefix}/amd64-pc-freebsd8.4/include/bits; then
+    rmdir ${RPM_BUILD_ROOT}%{_prefix}/amd64-pc-freebsd8.4/include/bits
+  fi
+
+%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,;.*$,,'`
+
+
+  rm -f dirs ;
+  echo "%defattr(-,root,root,-)" >> dirs
+  TGTDIR="%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{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/amd64-pc-freebsd8.4/%{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}/amd64-pc-freebsd8.4/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
+  ;;
+esac
+done
+
+sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< 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}/amd64-pc-freebsd8.4/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/'} | %__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}/amd64-pc-freebsd8.4/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/'} | %__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
+
+# ==============================================================
+# amd64-pc-freebsd8.4-gcc
+# ==============================================================
+# %package -n amd64-pc-freebsd8.4-gcc
+# Summary:        GNU cc compiler for amd64-pc-freebsd8.4
+# Group:          Development/Tools
+# Version:        %{gcc_rpmvers}
+# Requires:       amd64-pc-freebsd8.4-binutils
+# License:	GPL
+
+# %if %build_infos
+# Requires:      gcc-common
+# %endif
+
+%description -n amd64-pc-freebsd8.4-gcc
+GNU cc compiler for amd64-pc-freebsd8.4.
+
+# ==============================================================
+# amd64-pc-freebsd8.4-gcc-libgcc
+# ==============================================================
+%package -n amd64-pc-freebsd8.4-gcc-libgcc
+Summary:        libgcc for amd64-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n amd64-pc-freebsd8.4-gcc-libgcc
+libgcc amd64-pc-freebsd8.4-gcc.
+
+
+%files -n amd64-pc-freebsd8.4-gcc
+%defattr(-,root,root)
+
+%{_mandir}/man1/amd64-pc-freebsd8.4-gcc.1*
+%{_mandir}/man1/amd64-pc-freebsd8.4-cpp.1*
+%{_mandir}/man1/amd64-pc-freebsd8.4-gcov.1*
+
+%{_bindir}/amd64-pc-freebsd8.4-cpp%{_exeext}
+%{_bindir}/amd64-pc-freebsd8.4-gcc%{_exeext}
+%{_bindir}/amd64-pc-freebsd8.4-gcc-%{gcc_version}%{_exeext}
+%{_bindir}/amd64-pc-freebsd8.4-gcov%{_exeext}
+%if "%{gcc_version}" < "4.6.0"
+%{_bindir}/amd64-pc-freebsd8.4-gccbug
+%endif
+%if "%{gcc_version}" >= "4.7.0"
+# FIXME: To ship or not to ship?
+%{_bindir}/amd64-pc-freebsd8.4-gcc-ar%{_exeext}
+%{_bindir}/amd64-pc-freebsd8.4-gcc-nm%{_exeext}
+%{_bindir}/amd64-pc-freebsd8.4-gcc-ranlib%{_exeext}
+%endif
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/amd64-pc-freebsd8.4
+%dir %{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}
+%{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/cc1%{_exeext}
+%{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/collect2%{_exeext}
+%if "%{gcc_version}" >= "4.5.0"
+%{?with_lto:%{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/lto%{_exeext}}
+%{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/lto-wrapper%{_exeext}
+%endif
+
+%files -n amd64-pc-freebsd8.4-gcc-libgcc -f build/files.gcc
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/include
+
+%if "%{gcc_version}" > "4.0.3"
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/include/ssp
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/include-fixed
+%endif
+
+# ==============================================================
+# amd64-pc-freebsd8.4-gcc-c++
+# ==============================================================
+%package -n amd64-pc-freebsd8.4-gcc-c++
+Summary:	GCC c++ compiler for amd64-pc-freebsd8.4
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+Requires:       amd64-pc-freebsd8.4-gcc-libstdc++ = %{gcc_rpmvers}-%{release}
+
+%if "%{_build}" != "%{_host}"
+BuildRequires:  amd64-pc-freebsd8.4-gcc-c++ = %{gcc_rpmvers}
+%endif
+
+Requires:       amd64-pc-freebsd8.4-gcc = %{gcc_rpmvers}-%{release}
+
+%description -n amd64-pc-freebsd8.4-gcc-c++
+GCC c++ compiler for amd64-pc-freebsd8.4.
+
+
+%package -n amd64-pc-freebsd8.4-gcc-libstdc++
+Summary:	libstdc++ for amd64-pc-freebsd8.4
+Group:		Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n amd64-pc-freebsd8.4-gcc-libstdc++
+%{summary}
+
+
+%files -n amd64-pc-freebsd8.4-gcc-c++
+%defattr(-,root,root)
+
+%{_mandir}/man1/amd64-pc-freebsd8.4-g++.1*
+
+%{_bindir}/amd64-pc-freebsd8.4-c++%{_exeext}
+%{_bindir}/amd64-pc-freebsd8.4-g++%{_exeext}
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/amd64-pc-freebsd8.4
+%dir %{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}
+%{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/cc1plus%{_exeext}
+
+
+%files -n amd64-pc-freebsd8.4-gcc-libstdc++ -f build/files.g++
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/include
+%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/include/c++
+
+# ==============================================================
+# amd64-pc-freebsd8.4-gcc-gfortran
+# ==============================================================
+%package -n amd64-pc-freebsd8.4-gcc-gfortran
+Summary:	Fortran 95 support for amd64-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+
+Requires:       amd64-pc-freebsd8.4-gcc = %{gcc_rpmvers}-%{release}
+Requires:       amd64-pc-freebsd8.4-gcc-libgfortran = %{gcc_rpmvers}-%{release}
+
+%description -n amd64-pc-freebsd8.4-gcc-gfortran
+GCC fortran compiler for amd64-pc-freebsd8.4.
+
+%files -n amd64-pc-freebsd8.4-gcc-gfortran
+%defattr(-,root,root)
+%{_bindir}/amd64-pc-freebsd8.4-gfortran%{_exeext}
+
+%{_mandir}/man1/amd64-pc-freebsd8.4-gfortran.1*
+
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/amd64-pc-freebsd8.4
+%dir %{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}
+%{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/f951%{_exeext}
+
+# ==============================================================
+# amd64-pc-freebsd8.4-gcc-libgfortran
+# ==============================================================
+%package -n amd64-pc-freebsd8.4-gcc-libgfortran
+Summary:	Fortran 95 support libraries for amd64-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n amd64-pc-freebsd8.4-gcc-libgfortran
+%{summary}
+
+%files -n amd64-pc-freebsd8.4-gcc-libgfortran -f build/files.gfortran
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}
+%if "%{gcc_version}" >= "4.2.0"
+%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/finclude
+%endif
+
+# ==============================================================
+# amd64-pc-freebsd8.4-gcc-objc
+# ==============================================================
+%package -n amd64-pc-freebsd8.4-gcc-objc
+Summary:        Objective C support for amd64-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+License:	GPL
+
+Requires:       amd64-pc-freebsd8.4-gcc = %{gcc_rpmvers}-%{release}
+Requires:       amd64-pc-freebsd8.4-gcc-libobjc = %{gcc_rpmvers}-%{release}
+
+%description -n amd64-pc-freebsd8.4-gcc-objc
+GCC objc compiler for amd64-pc-freebsd8.4.
+
+%files -n amd64-pc-freebsd8.4-gcc-objc
+%defattr(-,root,root)
+%dir %{_libexecdir}/gcc
+%dir %{_libexecdir}/gcc/amd64-pc-freebsd8.4
+%dir %{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}
+%{_libexecdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/cc1obj%{_exeext}
+
+# ==============================================================
+# amd64-pc-freebsd8.4-gcc-libobjc
+# ==============================================================
+%package -n amd64-pc-freebsd8.4-gcc-libobjc
+Summary:        Objective C support for amd64-pc-freebsd8.4-gcc
+Group:          Development/Tools
+Version:        %{gcc_rpmvers}
+%{?_with_noarch_subpackages:BuildArch: noarch}
+License:	GPL
+
+%description -n amd64-pc-freebsd8.4-gcc-libobjc
+Support libraries for GCC's objc compiler for amd64-pc-freebsd8.4.
+
+%files -n amd64-pc-freebsd8.4-gcc-libobjc -f build/files.objc
+%defattr(-,root,root)
+%dir %{_gcclibdir}/gcc
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}
+%dir %{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/include
+%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/%{gcc_version}/include/objc
+
diff --git a/freebsd8.4/x86_64/amd64-pc-freebsd8.4-libs.spec b/freebsd8.4/x86_64/amd64-pc-freebsd8.4-libs.spec
new file mode 100644
index 0000000..4f99f76
--- /dev/null
+++ b/freebsd8.4/x86_64/amd64-pc-freebsd8.4-libs.spec
@@ -0,0 +1,222 @@
+#
+# Please send bugfixes or comments to
+# 	http://www.rtems.org/bugzilla
+#
+
+
+%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
+
+%{?!el5:%global _with_noarch_subpackages 1}
+%define freebsd_version 8.4
+%define freebsd_rpmvers %{expand:%(echo 8.4 | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name:		amd64-pc-freebsd8.4
+Release:	0.20131002.0%{?dist}
+License:	FreeBSD
+Group:		Development/Tools
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:	noarch
+BuildRequires:  star gzip
+
+Version:      	%freebsd_rpmvers
+Summary:      	amd64-pc-freebsd8.4 Libraries
+
+Source0:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.aa
+Source1:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ab
+Source2:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ac
+Source3:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ad
+Source4:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ae
+Source5:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.af
+Source6:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ag
+Source7:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ah
+Source8:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ai
+Source9:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.aj
+Source10: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ak
+Source11: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.al
+Source12: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.am
+Source13: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.an
+Source14: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ao
+Source15: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ap
+Source16: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.aq
+Source17: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ar
+Source18: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.as
+Source19: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.at
+Source20: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.au
+Source21: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.av
+Source22: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.aw
+Source23: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ax
+Source24: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ay
+Source25: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.az
+Source26: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.ba
+Source27: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bb
+Source28: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bc
+Source29: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bd
+Source30: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.be
+Source31: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bf
+Source32: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bg
+Source33: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bh
+Source34: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bi
+Source35: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bj
+Source36: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bk
+Source37: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bl
+Source38: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bm
+Source39: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bn
+Source40: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bo
+Source41: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bp
+Source42: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bq
+Source43: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.br
+Source44: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bs
+Source45: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/8.4-RELEASE/base/base.bt
+
+%description
+amd64-pc-freebsd8.4 libraries.
+
+%prep
+%setup -q -c -T -n %{name}-%{version}
+
+  cat \
+ %SOURCE0 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 \
+ %SOURCE5 %SOURCE6 %SOURCE7 %SOURCE8 %SOURCE9 \
+ %SOURCE10 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE14 \
+ %SOURCE15 %SOURCE16 %SOURCE17 %SOURCE18 %SOURCE19 \
+ %SOURCE20 %SOURCE21 %SOURCE22 %SOURCE23 %SOURCE24 \
+ %SOURCE25 %SOURCE26 %SOURCE27 %SOURCE28 %SOURCE29 \
+ %SOURCE30 %SOURCE31 %SOURCE32 %SOURCE33 %SOURCE34 \
+ %SOURCE35 %SOURCE36 %SOURCE37 %SOURCE38 %SOURCE39 \
+ %SOURCE40 %SOURCE41 %SOURCE42 %SOURCE43 %SOURCE44 \
+ %SOURCE45 \
+ | star -x compress-program=gzip
+
+%build
+  # Setup sys-root (Usable for gcc >= 3.4)
+  mkdir -p amd64-pc-freebsd8.4/sys-root
+  %{__tar} cf - lib usr/lib usr/include | ( cd amd64-pc-freebsd8.4/sys-root ; %{__tar} xf -)
+
+  pushd amd64-pc-freebsd8.4/sys-root/usr/lib > /dev/null
+  # missing files
+  rm -f lib*_p.*
+  # not needed
+  rm -rf aout compat
+
+  # Fix up symlinks
+  find -type l -exec ls -l {} \; | \
+    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
+    case $aA in
+    /lib* ) # link
+       rm $a8;
+       b=`basename $aA`
+       ln -s ../../lib/$b $a8
+       ;;
+    esac
+  done
+  popd > /dev/null
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}
+  cp -a amd64-pc-freebsd8.4 $RPM_BUILD_ROOT%{_prefix}
+
+# 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
+  ;;
+esac
+done
+
+sed -e 's,^\s*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
+< os_install_post~ > os_install_post 
+%define __os_install_post . ./os_install_post
+
+
+cat << EOF > %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/amd64-pc-freebsd8.4/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/'} | %__find_provides
+EOF
+chmod +x %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
+%define __find_provides %{_builddir}/%{name}-%{freebsd_rpmvers}/find-provides
+
+cat << EOF > %{_builddir}/%{name}-%{freebsd_rpmvers}/find-requires
+#!/bin/sh
+grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/amd64-pc-freebsd8.4/(lib|include|sys-root)' \
+  %{?_gcclibdir:| grep -v '^${RPM_BUILD_ROOT}%{_gcclibdir}/gcc/amd64-pc-freebsd8.4/'} | %__find_requires
+EOF
+chmod +x %{_builddir}/%{name}-%{freebsd_rpmvers}/find-requires
+%define __find_requires %{_builddir}/%{name}-%{freebsd_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
+
+%package sys-root
+Group: Development/Tools
+Summary: amd64-pc-freebsd8.4 target files for gcc >= 3.4
+
+%description sys-root
+amd64-pc-freebsd8.4 target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/amd64-pc-freebsd8.4
+%{_prefix}/amd64-pc-freebsd8.4/sys-root
diff --git a/freebsd8.4/x86_64/binutils-sources.add b/freebsd8.4/x86_64/binutils-sources.add
new file mode 100644
index 0000000..d6e461e
--- /dev/null
+++ b/freebsd8.4/x86_64/binutils-sources.add
@@ -0,0 +1,4 @@
+Source0: ftp://ftp.gnu.org/gnu/binutils/binutils-%{binutils_pkgvers}.tar.bz2
+%if "%{binutils_version}" == "2.23.2"
+Patch0:  ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/binutils-2.23.2-rtems4.11-20130326.diff
+%endif
diff --git a/freebsd8.4/x86_64/gcc-sources.add b/freebsd8.4/x86_64/gcc-sources.add
new file mode 100644
index 0000000..ed8a73d
--- /dev/null
+++ b/freebsd8.4/x86_64/gcc-sources.add
@@ -0,0 +1,43 @@
+%if "%{gcc_version}" == "4.8.0"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.0/gcc-4.8.0.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.8.0.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.8.0-rtems4.11-20130326.diff
+%endif
+%if "%{gcc_version}" == "4.7.3"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.3/gcc-4.7.3.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.3.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.3-rtems4.11-20130529.diff
+%endif
+%if "%{gcc_version}" == "4.7.2"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.2/gcc-4.7.2.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.2.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.2-rtems4.11-20130318.diff
+%endif
+%if "%{gcc_version}" == "4.7.1"
+# Source0:      ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.1/gcc-4.7.1.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.1.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.1-rtems4.11-20120712.diff
+%endif
+%if "%{gcc_version}" == "4.7.0"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.0/gcc-4.7.0.tar.bz2
+Source0:        ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.0.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.7.0-rtems4.11-20120419.diff
+%endif
+%if "%{gcc_version}" == "4.6.3"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.bz2
+Source0:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.6.3.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.6.3-rtems4.11-20120303.diff
+%endif
+%if "%{gcc_version}" == "4.5.4"
+# Source0:	ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.4/gcc-4.5.4.tar.bz2
+Source0:	ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-4.5.4.tar.%{?el5:bz2}%{!?el5:xz}
+Patch0:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-core-4.5.4-rtems4.11-20120703.diff
+Patch1:         ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/gcc-g++-4.5.4-rtems4.11-20120703.diff
+%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-20130325.diff
+%endif
+%endif
diff --git a/freebsd8.4/x86_64/libs.add b/freebsd8.4/x86_64/libs.add
new file mode 100644
index 0000000..0341b54
--- /dev/null
+++ b/freebsd8.4/x86_64/libs.add
@@ -0,0 +1,113 @@
+%define freebsd_version @FREEBSD_VERS@
+%define freebsd_rpmvers %{expand:%(echo @FREEBSD_VERS@ | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name:		@rpmprefix@@tool_target@
+Release:	@FREEBSD_RPMREL@
+License:	FreeBSD
+Group:		Development/Tools
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:	noarch
+BuildRequires:  star gzip
+
+Version:      	%freebsd_rpmvers
+Summary:      	@tool_target@ Libraries
+
+Source0:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.aa
+Source1:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ab
+Source2:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ac
+Source3:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ad
+Source4:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ae
+Source5:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.af
+Source6:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ag
+Source7:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ah
+Source8:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ai
+Source9:  ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.aj
+Source10: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ak
+Source11: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.al
+Source12: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.am
+Source13: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.an
+Source14: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ao
+Source15: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ap
+Source16: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.aq
+Source17: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ar
+Source18: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.as
+Source19: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.at
+Source20: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.au
+Source21: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.av
+Source22: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.aw
+Source23: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ax
+Source24: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ay
+Source25: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.az
+Source26: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.ba
+Source27: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bb
+Source28: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bc
+Source29: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bd
+Source30: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.be
+Source31: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bf
+Source32: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bg
+Source33: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bh
+Source34: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bi
+Source35: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bj
+Source36: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bk
+Source37: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bl
+Source38: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bm
+Source39: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bn
+Source40: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bo
+Source41: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bp
+Source42: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bq
+Source43: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.br
+Source44: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bs
+Source45: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/@FREEBSD_VERS@-RELEASE/base/base.bt
+
+%description
+ at tool_target@ libraries.
+
+%prep
+%setup -q -c -T -n %{name}-%{version}
+
+  cat \
+ %SOURCE0 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 \
+ %SOURCE5 %SOURCE6 %SOURCE7 %SOURCE8 %SOURCE9 \
+ %SOURCE10 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE14 \
+ %SOURCE15 %SOURCE16 %SOURCE17 %SOURCE18 %SOURCE19 \
+ %SOURCE20 %SOURCE21 %SOURCE22 %SOURCE23 %SOURCE24 \
+ %SOURCE25 %SOURCE26 %SOURCE27 %SOURCE28 %SOURCE29 \
+ %SOURCE30 %SOURCE31 %SOURCE32 %SOURCE33 %SOURCE34 \
+ %SOURCE35 %SOURCE36 %SOURCE37 %SOURCE38 %SOURCE39 \
+ %SOURCE40 %SOURCE41 %SOURCE42 %SOURCE43 %SOURCE44 \
+ %SOURCE45 \
+ | star -x compress-program=gzip
+
+%build
+  # Setup sys-root (Usable for gcc >= 3.4)
+  mkdir -p @tool_target@/sys-root
+  %{__tar} cf - lib usr/lib usr/include | ( cd @tool_target@/sys-root ; %{__tar} xf -)
+
+  pushd @tool_target@/sys-root/usr/lib > /dev/null
+  # missing files
+  rm -f lib*_p.*
+  # not needed
+  rm -rf aout compat
+
+  # Fix up symlinks
+  find -type l -exec ls -l {} \; | \
+    while read a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aA ; do \
+    case $aA in
+    /lib* ) # link
+       rm $a8;
+       b=`basename $aA`
+       ln -s ../../lib/$b $a8
+       ;;
+    esac
+  done
+  popd > /dev/null
+
+%install
+  rm -rf $RPM_BUILD_ROOT
+  mkdir -p $RPM_BUILD_ROOT%{_prefix}
+  cp -a @tool_target@ $RPM_BUILD_ROOT%{_prefix}
+
diff --git a/freebsd8.4/x86_64/target-libs.add b/freebsd8.4/x86_64/target-libs.add
new file mode 100644
index 0000000..0550fc7
--- /dev/null
+++ b/freebsd8.4/x86_64/target-libs.add
@@ -0,0 +1,11 @@
+%package sys-root
+Group: Development/Tools
+Summary: @tool_target@ target files for gcc >= 3.4
+
+%description sys-root
+ at tool_target@ target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/@tool_target@
+%{_prefix}/@tool_target@/sys-root




More information about the vc mailing list