summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-05-05 22:06:31 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-05-05 22:06:31 +0000
commit307cbcb5fd5152007c4396c47956550cc222c921 (patch)
tree8a9f1a5c9254821fd7509845306a0319dbe18021 /contrib
parent2009-05-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-307cbcb5fd5152007c4396c47956550cc222c921.tar.bz2
New.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/crossrpms/freebsd7.2/.cvsignore2
-rw-r--r--contrib/crossrpms/freebsd7.2/Makefile.am3
-rw-r--r--contrib/crossrpms/freebsd7.2/binutils.am30
-rw-r--r--contrib/crossrpms/freebsd7.2/gcc-prep.add0
-rw-r--r--contrib/crossrpms/freebsd7.2/gcc.am40
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/.cvsignore4
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/Makefile.am42
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/binutils-sources.add2
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/gcc-sources.add33
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-binutils.spec177
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-gcc.spec551
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-libs.spec206
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/libs.add98
-rw-r--r--contrib/crossrpms/freebsd7.2/i586/target-libs.add11
14 files changed, 1199 insertions, 0 deletions
diff --git a/contrib/crossrpms/freebsd7.2/.cvsignore b/contrib/crossrpms/freebsd7.2/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/contrib/crossrpms/freebsd7.2/Makefile.am b/contrib/crossrpms/freebsd7.2/Makefile.am
new file mode 100644
index 0000000000..184ab637ca
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/Makefile.am
@@ -0,0 +1,3 @@
+# $Id$
+
+SUBDIRS = i586
diff --git a/contrib/crossrpms/freebsd7.2/binutils.am b/contrib/crossrpms/freebsd7.2/binutils.am
new file mode 100644
index 0000000000..2772db3784
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/binutils.am
@@ -0,0 +1,30 @@
+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)/g" \
+ | $(MKSPEC0) > $(TARGET)-binutils.spec.in
+CLEANFILES += $(TARGET)-binutils.spec.in
+
+@rpmprefix@$(TARGET)-binutils.spec: $(TARGET)-binutils.spec.in
+ $(MKSPEC) $(TARGET)-binutils.spec.in | $(SPECSTRIP) $(BINUTILS_OPTS) > $@
+CLEANFILES += @rpmprefix@$(TARGET)-binutils.spec
+noinst_DATA += @rpmprefix@$(TARGET)-binutils.spec
+
+EXTRA_DIST += $(BINUTILS_SUBPACKAGES)
diff --git a/contrib/crossrpms/freebsd7.2/gcc-prep.add b/contrib/crossrpms/freebsd7.2/gcc-prep.add
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/gcc-prep.add
diff --git a/contrib/crossrpms/freebsd7.2/gcc.am b/contrib/crossrpms/freebsd7.2/gcc.am
new file mode 100644
index 0000000000..5114102ccb
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/gcc.am
@@ -0,0 +1,40 @@
+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
+ cat $(GCC_SUBPACKAGES) | sed \
+ -e "/[@]SOURCES[@]/r $(srcdir)/gcc-sources.add" \
+ -e "/[@]SOURCES[@]/d" \
+ -e "/[@]PREP[@]/r $(srcdir)/../gcc-prep.add" \
+ -e "/[@]PREP[@]/d" \
+ -e "s/[@]GCC_VERS[@]/$(GCC_VERS)/g" \
+ -e "s/[@]GCC_PKGVERS[@]/$(GCC_PKGVERS)/g" \
+ -e "s/[@]GCC_RPMREL[@]/$(GCC_RPMREL)/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
+
+@rpmprefix@$(TARGET)-gcc.spec: $(TARGET)-gcc.spec.in
+ $(MKSPEC) $(TARGET)-gcc.spec.in | $(SPECSTRIP) $(GCC_OPTS) > $@
+CLEANFILES += @rpmprefix@$(TARGET)-gcc.spec
+noinst_DATA += @rpmprefix@$(TARGET)-gcc.spec
+
+EXTRA_DIST += $(GCC_SUBPACKAGES)
diff --git a/contrib/crossrpms/freebsd7.2/i586/.cvsignore b/contrib/crossrpms/freebsd7.2/i586/.cvsignore
new file mode 100644
index 0000000000..c3dcdce8bd
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/i586/.cvsignore
@@ -0,0 +1,4 @@
+Makefile
+Makefile.in
+*.spec
+*.spec.in
diff --git a/contrib/crossrpms/freebsd7.2/i586/Makefile.am b/contrib/crossrpms/freebsd7.2/i586/Makefile.am
new file mode 100644
index 0000000000..0d7f7eeffe
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/i586/Makefile.am
@@ -0,0 +1,42 @@
+# $Id$
+
+TARGET = i586-pc-freebsd7.2
+
+include $(top_srcdir)/mkspec.am
+
+FREEBSD_VERS = 7.2
+FREEBSD_RPMREL = @VERSION@
+EXTRA_DIST += libs.add
+EXTRA_DIST += target-libs.add
+
+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)/g" \
+ -e "s,%{gcc_rpmvers},%{freebsd_rpmvers},g" \
+ > $(TARGET)-libs.spec.in
+CLEANFILES += $(TARGET)-libs.spec.in
+
+@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
+
+
+BINUTILS_VERS = 2.19
+BINUTILS_PKGVERS = $(BINUTILS_VERS)
+BINUTILS_RPMREL = @VERSION@%{?dist}
+include ../binutils.am
+BINUTILS_OPTS +=
+
+GCC_VERS = 4.3.3
+GCC_PKGVERS = $(GCC_VERS)
+GCC_RPMREL = @VERSION@%{?dist}
+include ../gcc.am
+GCC_OPTS += --languages=cxx,f95,objc
diff --git a/contrib/crossrpms/freebsd7.2/i586/binutils-sources.add b/contrib/crossrpms/freebsd7.2/i586/binutils-sources.add
new file mode 100644
index 0000000000..057c363814
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/i586/binutils-sources.add
@@ -0,0 +1,2 @@
+Source0: http://ftp.gnu.org/gnu/binutils/binutils-2.19.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.19-rtems4.10-20081023.diff
diff --git a/contrib/crossrpms/freebsd7.2/i586/gcc-sources.add b/contrib/crossrpms/freebsd7.2/i586/gcc-sources.add
new file mode 100644
index 0000000000..a88f28b0ea
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/i586/gcc-sources.add
@@ -0,0 +1,33 @@
+Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+@PATCH0@
+%{?_without_sources:NoSource: 0}
+
+%if %build_cxx
+Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+@PATCH1@
+%{?_without_sources:NoSource: 1}
+
+%endif
+%if %build_f95
+Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
+@PATCH2@
+%{?_without_sources:NoSource: 2}
+
+%endif
+%if %build_gcj
+Source3: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-java-%{gcc_pkgvers}.tar.bz2
+@PATCH3@
+%{?_without_sources:NoSource: 3}
+
+%endif
+%if %build_gnat
+Source4: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-ada-%{gcc_pkgvers}.tar.bz2
+@PATCH4@
+%{?_without_sources:NoSource: 4}
+
+%endif
+%if %build_objc
+Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-objc-%{gcc_pkgvers}.tar.bz2
+@PATCH5@
+%{?_without_sources:NoSource: 5}
+%endif
diff --git a/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-binutils.spec b/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-binutils.spec
new file mode 100644
index 0000000000..64fe2cd0c3
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-binutils.spec
@@ -0,0 +1,177 @@
+#
+# 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
+
+%define binutils_pkgvers 2.19
+%define binutils_version 2.19
+%define binutils_rpmvers %{expand:%(echo "2.19" | tr - _ )}
+
+Name: i586-pc-freebsd7.2-binutils
+Summary: Binutils for target i586-pc-freebsd7.2
+Group: Development/Tools
+Version: %{binutils_rpmvers}
+Release: 0.20090505.1%{?dist}
+License: GPL/LGPL
+URL: http://sources.redhat.com/binutils
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: %{_host_rpmprefix}gcc
+
+%if "%{binutils_version}" >= "2.18"
+# Bug in bfd: Doesn't build without texinfo installed
+BuildRequires: texinfo >= 4.2
+%else
+%if "i586-pc-freebsd7.2" == "i686-pc-cygwin"
+BuildRequires: texinfo >= 4.2
+%endif
+%endif
+BuildRequires: flex
+BuildRequires: bison
+
+Source0: http://ftp.gnu.org/gnu/binutils/binutils-2.19.tar.bz2
+Patch0: ftp://ftp.rtems.org/pub/rtems/SOURCES/4.10/binutils-2.19-rtems4.10-20081023.diff
+
+%description
+Cross binutils for target i586-pc-freebsd7.2
+%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
+%if "i586-pc-freebsd7.2" == "i686-pc-cygwin"
+# The cygwin sources are leaking memory
+ RPM_OPT_FLAGS="$(echo "$RPM_OPT_FLAGS"|sed -e 's; -Wp,-D_FORTIFY_SOURCE=2;;')"
+%endif
+ 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-freebsd7.2 \
+ --verbose --disable-nls \
+ --without-included-gettext \
+ --disable-win32-registry \
+ --disable-werror \
+ --with-sysroot=%{_prefix}/i586-pc-freebsd7.2/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-freebsd7.2-dlltool%{_exeext}; then
+ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.2-dlltool*
+ fi
+ if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.2-nlmconv%{_exeext}; then
+ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.2-nlmconv*
+ fi
+ if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.2-windres%{_exeext}; then
+ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.2-windres*
+ fi
+ if test ! -f ${RPM_BUILD_ROOT}%{_bindir}/i586-pc-freebsd7.2-windmc%{_exeext}; then
+ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/i586-pc-freebsd7.2-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,^[ ]*/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-freebsd7.2-binutils
+# ==============================================================
+# %package -n i586-pc-freebsd7.2-binutils
+# Summary: rtems binutils for i586-pc-freebsd7.2
+# Group: Development/Tools
+# %if %build_infos
+# Requires: binutils-common
+# %endif
+
+%description -n i586-pc-freebsd7.2-binutils
+GNU binutils targetting i586-pc-freebsd7.2.
+
+%files -n i586-pc-freebsd7.2-binutils
+%defattr(-,root,root)
+%{_mandir}/man1/i586-pc-freebsd7.2-*.1*
+
+%{_bindir}/i586-pc-freebsd7.2-*
+
+%dir %{_exec_prefix}/i586-pc-freebsd7.2
+%dir %{_exec_prefix}/i586-pc-freebsd7.2/bin
+%{_exec_prefix}/i586-pc-freebsd7.2/bin/*
+
+%dir %{_exec_prefix}/i586-pc-freebsd7.2/lib
+%{_exec_prefix}/i586-pc-freebsd7.2/lib/ldscripts
+
diff --git a/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-gcc.spec b/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-gcc.spec
new file mode 100644
index 0000000000..ea8fcc01d7
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-gcc.spec
@@ -0,0 +1,551 @@
+#
+# 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
+
+
+%define gcc_pkgvers 4.3.3
+%define gcc_version 4.3.3
+%define gcc_rpmvers %{expand:%(echo "4.3.3" | tr - _ )}
+
+
+Name: i586-pc-freebsd7.2-gcc
+Summary: i586-pc-freebsd7.2 gcc
+
+Group: Development/Tools
+Version: %{gcc_rpmvers}
+Release: 0.20090505.1%{?dist}
+License: GPL
+URL: http://gcc.gnu.org
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%define _use_internal_dependency_generator 0
+
+BuildRequires: %{_host_rpmprefix}gcc
+
+%if "%{gcc_version}" >= "4.3.0"
+%define _gmp_minvers 4.1
+%else
+%if "%{gcc_version}" >= "4.2.0"
+%define _gmp_minvers 4.1
+%endif
+%endif
+
+%if %{defined _gmp_minvers}
+BuildRequires: gmp-devel >= %{_gmp_minvers}
+%if "%{_build}" != "%{_host}"
+BuildRequires: %{_host_rpmprefix}gmp-devel >= %{_gmp_minvers}
+%endif
+%endif
+
+
+%if "%{gcc_version}" >= "4.4.0"
+%define _mpfr_minvers 2.3.2
+%define mpfr_version 2.4.1
+%else
+%if "%{gcc_version}" >= "4.3.0"
+%define _mpfr_minvers 2.3.1
+%define mpfr_version 2.3.2
+%else
+%if "%{gcc_version}" >= "4.2.0"
+%define _mpfr_minvers 2.2.1
+%define mpfr_version 2.3.2
+%endif
+%endif
+%endif
+
+%if %{defined _mpfr_minvers}
+# FIXME: This is an ugly cludge
+%{?fc9:%global mpfr_provided 2.3.1}
+%{?fc10:%global mpfr_provided 2.3.2}
+%{?fc11:%global mpfr_provided 2.4.1}
+%{?suse10_3:%global mpfr_provided 2.2.1}
+%{?cygwin:%global mpfr_provided 2.4.1}
+%{?mingw32:%global mpfr_provided %{nil}}
+
+%if %{defined mpfr_provided}
+%if "%{mpfr_provided}" < "%{_mpfr_minvers}"
+%define _build_mpfr 1
+%else
+%if "%{_build}" != "%{_host}"
+BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{_mpfr_minvers}
+%else
+BuildRequires: mpfr-devel >= %{_mpfr_minvers}
+%endif
+%endif
+%else
+%define _build_mpfr 1
+%endif
+
+%endif
+
+%if "%{_build}" != "%{_host}"
+BuildRequires: i586-pc-freebsd7.2-gcc = %{gcc_rpmvers}
+%endif
+
+%if "%{gcc_version}" >= "4.2.0"
+BuildRequires: flex bison
+%endif
+
+
+BuildRequires: texinfo >= 4.2
+BuildRequires: i586-pc-freebsd7.2-binutils
+BuildRequires: i586-pc-freebsd7.2-sys-root
+
+Requires: i586-pc-freebsd7.2-binutils
+Requires: i586-pc-freebsd7.2-sys-root
+
+
+%if "%{gcc_version}" >= "3.4"
+%define gcclib %{_libdir}/gcc
+%define gccexec %{_libexecdir}/gcc
+%else
+%define gcclib %{_libdir}/gcc-lib
+%define gccexec %{_libdir}/gcc-lib
+%endif
+
+Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource: 0}
+
+Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource: 1}
+
+Source2: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-fortran-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource: 2}
+
+Source5: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-objc-%{gcc_pkgvers}.tar.bz2
+%{?_without_sources:NoSource: 5}
+
+%if "%{gcc_version}" >= "4.3.0"
+Source60: http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2
+%endif
+
+%description
+Cross gcc for i586-pc-freebsd7.2.
+
+%prep
+%setup -c -T -n %{name}-%{version}
+
+%setup -q -T -D -n %{name}-%{version} -a0
+%{?PATCH0:%patch0 -p0}
+
+%setup -q -T -D -n %{name}-%{version} -a1
+%{?PATCH1:%patch1 -p0}
+
+%setup -q -T -D -n %{name}-%{version} -a2
+%{?PATCH2:%patch2 -p0}
+
+
+
+%setup -q -T -D -n %{name}-%{version} -a5
+%{?PATCH5:%patch5 -p0}
+
+
+%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
+
+
+ # Fix timestamps
+ cd gcc-%{gcc_pkgvers}
+ contrib/gcc_update --touch
+ cd ..
+%build
+ mkdir -p build
+
+ cd build
+
+ languages="c"
+ languages="$languages,c++"
+ languages="$languages,f95"
+ 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=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
+ --mandir=%{_mandir} \
+ --infodir=%{_infodir} \
+ --datadir=%{_datadir} \
+ --build=%_build --host=%_host \
+ --target=i586-pc-freebsd7.2 \
+ --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-freebsd7.2/sys-root \
+ --enable-languages="$languages" $optargs
+
+%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%{gcclib}/i586-pc-freebsd7.2/%{gcc_version}/include/
+ fi
+%endif
+
+ # host library
+ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libiberty.a
+
+ # We use the version from binutils
+ rm -f $RPM_BUILD_ROOT%{_bindir}/i586-pc-freebsd7.2-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
+
+# # Bug in gcc-4.0.0pre
+# mv $RPM_BUILD_ROOT%{_bindir}/gfortran $RPM_BUILD_ROOT%{_bindir}/i586-pc-freebsd7.2-gfortran
+
+%if "%{gcc_version}" >= "3.4"
+ # Bug in gcc-3.4.0pre
+ rm -f $RPM_BUILD_ROOT%{_bindir}/i586-pc-freebsd7.2-i586-pc-freebsd7.2-gcjh%{_exeext}
+%endif
+
+%if "%{gcc_version}" >= "3.3"
+ # 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}%{gcclib}/i586-pc-freebsd7.2/%{gcc_version}/install-tools
+ rm -rf ${RPM_BUILD_ROOT}%{gccexec}/i586-pc-freebsd7.2/%{gcc_version}/install-tools
+%endif
+
+ # Bug in gcc > 4.1.0: Installs an unused, empty directory
+ if test -d ${RPM_BUILD_ROOT}%{_prefix}/i586-pc-freebsd7.2/include/bits; then
+ rmdir ${RPM_BUILD_ROOT}%{_prefix}/i586-pc-freebsd7.2/include/bits
+ fi
+
+ # Collect multilib subdirectories
+ f=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
+
+
+ rm -f dirs ;
+ echo "%defattr(-,root,root,-)" >> dirs
+ echo "%dir %{gcclib}" >> dirs
+ echo "%dir %{gcclib}/i586-pc-freebsd7.2" >> dirs
+
+ TGTDIR="%{gcclib}/i586-pc-freebsd7.2/%{gcc_version}"
+ for i in $f; do
+ case $i in
+ \.) echo "%dir ${TGTDIR}" >> dirs
+ ;;
+ *) echo "%dir ${TGTDIR}/$i" >> dirs
+ ;;
+ esac
+ done
+
+ # Collect files to go into different packages
+ cp dirs build/files.gcc
+ cp dirs build/files.g77
+ cp dirs build/files.gfortran
+ cp dirs build/files.objc
+ cp dirs build/files.gcj
+ cp dirs build/files.g++
+
+ TGTDIR="%{gcclib}/i586-pc-freebsd7.2/%{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 ;;
+ *include/objc*) ;;
+ *include/g++*);;
+ *include/c++*);;
+ *adainclude*);;
+ *adalib*);;
+ *gnat1);;
+ *jc1) ;;
+ *jvgenmain) ;;
+ */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
+ */libstdc++.*) echo "$i" >> build/files.g++ ;;
+ */libsupc++.*) echo "$i" >> build/files.g++ ;;
+ *) echo "$i" >> build/files.gcc ;;
+ esac
+ done
+
+ TGTDIR="%{_exec_prefix}/i586-pc-freebsd7.2/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,^[ ]*/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-freebsd7.2/(lib|include|sys-root)' \
+ | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i586-pc-freebsd7.2/' | %__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-freebsd7.2/(lib|include|sys-root)' \
+ | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i586-pc-freebsd7.2/' | %__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-freebsd7.2-gcc
+# ==============================================================
+# %package -n i586-pc-freebsd7.2-gcc
+# Summary: GNU cc compiler for i586-pc-freebsd7.2
+# Group: Development/Tools
+# Version: %{gcc_rpmvers}
+# Requires: i586-pc-freebsd7.2-binutils
+# License: GPL
+
+# %if %build_infos
+# Requires: gcc-common
+# %endif
+
+%description -n i586-pc-freebsd7.2-gcc
+GNU cc compiler for i586-pc-freebsd7.2.
+
+%files -n i586-pc-freebsd7.2-gcc -f build/files.gcc
+%defattr(-,root,root)
+%{_mandir}/man1/i586-pc-freebsd7.2-gcc.1*
+%if "%{gcc_version}" >= "3.4"
+%{_mandir}/man1/i586-pc-freebsd7.2-cpp.1*
+%{_mandir}/man1/i586-pc-freebsd7.2-gcov.1*
+%endif
+
+%{_bindir}/i586-pc-freebsd7.2-cpp%{_exeext}
+%{_bindir}/i586-pc-freebsd7.2-gcc%{_exeext}
+%if "%{gcc_version}" >= "3.3"
+%{_bindir}/i586-pc-freebsd7.2-gcc-%{gcc_version}%{_exeext}
+%endif
+%{_bindir}/i586-pc-freebsd7.2-gcov%{_exeext}
+%{_bindir}/i586-pc-freebsd7.2-gccbug
+
+%dir %{gcclib}/i586-pc-freebsd7.2/%{gcc_version}/include
+%if "%{gcc_version}" > "4.0.3"
+%if "i586-pc-freebsd7.2" != "bfin-rtems4.10"
+%if "i586-pc-freebsd7.2" != "avr-rtems4.10"
+%dir %{gcclib}/i586-pc-freebsd7.2/%{gcc_version}/include/ssp
+%endif
+%endif
+%endif
+
+%if "%{gcc_version}" >= "4.3.0"
+%dir %{gcclib}/i586-pc-freebsd7.2/%{gcc_version}/include-fixed
+%endif
+
+%dir %{gccexec}
+%dir %{gccexec}/i586-pc-freebsd7.2
+%dir %{gccexec}/i586-pc-freebsd7.2/%{gcc_version}
+%{gccexec}/i586-pc-freebsd7.2/%{gcc_version}/cc1%{_exeext}
+%{gccexec}/i586-pc-freebsd7.2/%{gcc_version}/collect2%{_exeext}
+
+# ==============================================================
+# i586-pc-freebsd7.2-gcc-c++
+# ==============================================================
+%package -n i586-pc-freebsd7.2-gcc-c++
+Summary: GCC c++ compiler for i586-pc-freebsd7.2
+Group: Development/Tools
+Version: %{gcc_rpmvers}
+License: GPL
+
+%if "%{_build}" != "%{_host}"
+BuildRequires: i586-pc-freebsd7.2-gcc-c++ = %{gcc_rpmvers}
+%endif
+Provides: i586-pc-freebsd7.2-c++ = %{gcc_rpmvers}-%{release}
+Obsoletes: i586-pc-freebsd7.2-c++ < %{gcc_rpmvers}-%{release}
+
+Requires: i586-pc-freebsd7.2-gcc = %{gcc_rpmvers}-%{release}
+
+%description -n i586-pc-freebsd7.2-gcc-c++
+GCC c++ compiler for i586-pc-freebsd7.2.
+
+%files -n i586-pc-freebsd7.2-gcc-c++ -f build/files.g++
+%defattr(-,root,root)
+%{_mandir}/man1/i586-pc-freebsd7.2-g++.1*
+
+%{_bindir}/i586-pc-freebsd7.2-c++%{_exeext}
+%{_bindir}/i586-pc-freebsd7.2-g++%{_exeext}
+
+%dir %{gccexec}
+%dir %{gccexec}/i586-pc-freebsd7.2
+%dir %{gccexec}/i586-pc-freebsd7.2/%{gcc_version}
+%{gccexec}/i586-pc-freebsd7.2/%{gcc_version}/cc1plus%{_exeext}
+
+%dir %{gcclib}/i586-pc-freebsd7.2/%{gcc_version}/include
+%{gcclib}/i586-pc-freebsd7.2/%{gcc_version}/include/c++
+
+# ==============================================================
+# i586-pc-freebsd7.2-gcc-gfortran
+# ==============================================================
+%package -n i586-pc-freebsd7.2-gcc-gfortran
+Summary: Fortran 95 support for i586-pc-freebsd7.2-gcc
+Group: Development/Tools
+Version: %{gcc_rpmvers}
+License: GPL
+
+Provides: i586-pc-freebsd7.2-gfortran = %{gcc_rpmvers}-%{release}
+Obsoletes: i586-pc-freebsd7.2-gfortran < %{gcc_rpmvers}-%{release}
+
+Requires: i586-pc-freebsd7.2-gcc = %{gcc_rpmvers}-%{release}
+Obsoletes: i586-pc-freebsd7.2-g77 < %{gcc_rpmvers}-%{release}
+
+%description -n i586-pc-freebsd7.2-gcc-gfortran
+GCC fortran compiler for i586-pc-freebsd7.2.
+
+%files -n i586-pc-freebsd7.2-gcc-gfortran -f build/files.gfortran
+%defattr(-,root,root)
+%{_bindir}/i586-pc-freebsd7.2-gfortran%{_exeext}
+
+%{_mandir}/man1/i586-pc-freebsd7.2-gfortran.1*
+
+%dir %{gccexec}
+%dir %{gccexec}/i586-pc-freebsd7.2
+%dir %{gccexec}/i586-pc-freebsd7.2/%{gcc_version}
+%{gccexec}/i586-pc-freebsd7.2/%{gcc_version}/f951%{_exeext}
+
+# ==============================================================
+# i586-pc-freebsd7.2-gcc-objc
+# ==============================================================
+%package -n i586-pc-freebsd7.2-gcc-objc
+Summary: Objective C support for i586-pc-freebsd7.2-gcc
+Group: Development/Tools
+Version: %{gcc_rpmvers}
+License: GPL
+Provides: i586-pc-freebsd7.2-objc = %{gcc_rpmvers}-%{release}
+Obsoletes: i586-pc-freebsd7.2-objc < %{gcc_rpmvers}-%{release}
+
+Requires: i586-pc-freebsd7.2-gcc = %{gcc_rpmvers}-%{release}
+
+%description -n i586-pc-freebsd7.2-gcc-objc
+GCC objc compiler for i586-pc-freebsd7.2.
+
+%files -n i586-pc-freebsd7.2-gcc-objc -f build/files.objc
+%defattr(-,root,root)
+
+%dir %{gccexec}
+%dir %{gccexec}/i586-pc-freebsd7.2
+%dir %{gccexec}/i586-pc-freebsd7.2/%{gcc_version}
+%{gccexec}/i586-pc-freebsd7.2/%{gcc_version}/cc1obj%{_exeext}
+
+%{gcclib}/i586-pc-freebsd7.2/%{gcc_version}/include/objc
+
diff --git a/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-libs.spec b/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-libs.spec
new file mode 100644
index 0000000000..731fb48bb9
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/i586/i586-pc-freebsd7.2-libs.spec
@@ -0,0 +1,206 @@
+#
+# 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
+
+%define freebsd_version 7.2
+%define freebsd_rpmvers %{expand:%(echo 7.2 | tr - _)}
+
+%define _use_internal_dependency_generator 0
+%define __debug_install_post %{nil}
+
+Name: i586-pc-freebsd7.2
+Release: 0.20090505.1%{?dist}
+License: FreeBSD
+Group: Development/Tools
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+
+Version: %freebsd_rpmvers
+Summary: i586-pc-freebsd7.2 Libraries
+
+Source0: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.aa
+Source1: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ab
+Source2: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ac
+Source3: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ad
+Source4: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ae
+Source5: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.af
+Source6: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ag
+Source7: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ah
+Source8: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ai
+Source9: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.aj
+Source10: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ak
+Source11: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.al
+Source12: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.am
+Source13: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.an
+Source14: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ao
+Source15: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ap
+Source16: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.aq
+Source17: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ar
+Source18: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.as
+Source19: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.at
+Source20: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.au
+Source21: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.av
+Source22: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.aw
+Source23: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ax
+Source24: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ay
+Source25: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.az
+Source26: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.ba
+Source27: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bb
+Source28: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bc
+Source29: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bd
+Source30: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.be
+Source31: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bf
+Source32: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bg
+Source33: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bh
+Source34: ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/7.2-RELEASE/base/base.bi
+
+%description
+i586-pc-freebsd7.2 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 \
+ | %{__tar} --unlink -pxzf - ./lib ./usr/lib ./usr/include
+
+%build
+ # Setup sys-root (Usable for gcc >= 3.4)
+ mkdir -p i586-pc-freebsd7.2/sys-root
+ %{__tar} cf - lib usr/lib usr/include | ( cd i586-pc-freebsd7.2/sys-root ; %{__tar} xf -)
+
+ pushd i586-pc-freebsd7.2/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-freebsd7.2 $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,^[ ]*/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-freebsd7.2/(lib|include|sys-root)' \
+ | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i586-pc-freebsd7.2/' | %__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-freebsd7.2/(lib|include|sys-root)' \
+ | grep -v '^${RPM_BUILD_ROOT}%{gcclib}/i586-pc-freebsd7.2/' | %__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-freebsd7.2 target files for gcc >= 3.4
+
+%description sys-root
+i586-pc-freebsd7.2 target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/i586-pc-freebsd7.2
+%{_prefix}/i586-pc-freebsd7.2/sys-root
diff --git a/contrib/crossrpms/freebsd7.2/i586/libs.add b/contrib/crossrpms/freebsd7.2/i586/libs.add
new file mode 100644
index 0000000000..8e5d476d02
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/i586/libs.add
@@ -0,0 +1,98 @@
+%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@%{?dist}
+License: FreeBSD
+Group: Development/Tools
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+
+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
+
+%description
+@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 \
+ | %{__tar} --unlink -pxzf - ./lib ./usr/lib ./usr/include
+
+%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/contrib/crossrpms/freebsd7.2/i586/target-libs.add b/contrib/crossrpms/freebsd7.2/i586/target-libs.add
new file mode 100644
index 0000000000..0550fc7c07
--- /dev/null
+++ b/contrib/crossrpms/freebsd7.2/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
+@tool_target@ target files for gcc >= 3.4
+
+%files sys-root
+%defattr(-,root,root,-)
+%dir %{_prefix}/@tool_target@
+%{_prefix}/@tool_target@/sys-root