summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-02-05 20:01:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-02-05 20:01:45 +0000
commit68babc62f60cd06ab4fb94579d1721c97e45f17f (patch)
tree9fbfe6468f50a75e5b6612267e06807ed9aaef6b
parent9535ba46030e24b36d6233d71ee9ee1e8044d506 (diff)
downloadrtems-68babc62f60cd06ab4fb94579d1721c97e45f17f.tar.bz2
2004-02-05 Joel Sherrill <joel@OARcorp.com>
* ChangeLog, configure.ac, setup, setup.def, sparc-solaris-binutils.spec.in, sparc-solaris-gcc.spec.in, sparc-solaris-libs.spec.in: New files.
-rw-r--r--contrib/solaris/ChangeLog6
-rw-r--r--contrib/solaris/configure.ac78
-rw-r--r--contrib/solaris/setup99
-rw-r--r--contrib/solaris/setup.def12
-rw-r--r--contrib/solaris/sparc-solaris-binutils.spec.in86
-rw-r--r--contrib/solaris/sparc-solaris-gcc.spec.in98
-rw-r--r--contrib/solaris/sparc-solaris-libs.spec.in50
7 files changed, 429 insertions, 0 deletions
diff --git a/contrib/solaris/ChangeLog b/contrib/solaris/ChangeLog
new file mode 100644
index 0000000000..6cea7a8ef4
--- /dev/null
+++ b/contrib/solaris/ChangeLog
@@ -0,0 +1,6 @@
+2004-02-05 Joel Sherrill <joel@OARcorp.com>
+
+ * ChangeLog, configure.ac, setup, setup.def,
+ sparc-solaris-binutils.spec.in, sparc-solaris-gcc.spec.in,
+ sparc-solaris-libs.spec.in: New files.
+
diff --git a/contrib/solaris/configure.ac b/contrib/solaris/configure.ac
new file mode 100644
index 0000000000..8b06ad335f
--- /dev/null
+++ b/contrib/solaris/configure.ac
@@ -0,0 +1,78 @@
+## $Id$
+
+AC_PREREQ(2.52)
+AC_INIT
+AC_CONFIG_SRCDIR([setup])
+
+AM_INIT_AUTOMAKE(solaris-rpmsscripts,20010426,no)
+
+test -f ./setup.cache || cp ${srcdir}/setup.def ./setup.cache
+. ./setup.cache
+
+# Some linux distributions use /usr/src/packages
+# redhat uses /usr/src/redhat
+# others might use /usr/src
+AC_MSG_CHECKING(for rpm SPECS directory)
+if test -d /usr/src/packages/SPECS;
+then
+ RPM_SPECSdir=/usr/src/packages/SPECS;
+elif test -d /usr/src/redhat/SPECS;
+then
+ RPM_SPECSdir=/usr/src/redhat/SPECS;
+elif test -d /usr/src/SPECS;
+then
+ RPM_SPECSdir=/usr/src/SPECS;
+elif test -d /usr/local/src/redhat/SPECS;
+then
+ RPM_SPECSdir=/usr/local/src/redhat/SPECS;
+fi
+if test x"$RPM_SPECSdir" = x"" ; then
+AC_MSG_ERROR(not found)
+fi
+AC_MSG_RESULT($RPM_SPECSdir)
+AC_SUBST(RPM_SPECSdir)
+
+BINUTILS_VERS="${binutils_version}"
+AC_SUBST(BINUTILS_VERS)
+BINUTILS_RPMVERS=`echo ${binutils_version} | tr '-' '_'`
+AC_SUBST(BINUTILS_RPMVERS)
+BINUTILS_RPMREL="${binutils_rpm_release}"
+AC_SUBST(BINUTILS_RPMREL)
+
+MINGW_VERS="${mingw_version}"
+AC_SUBST(MINGW_VERS)
+MINGW_RPMVERS=`echo ${mingw_version} | tr '-' '_'`
+AC_SUBST(MINGW_RPMVERS)
+MINGW_RPMREL="${mingw_rpm_release}"
+AC_SUBST(MINGW_RPMREL)
+
+W32API_VERS="${w32api_version}"
+AC_SUBST(W32API_VERS)
+W32API_RPMVERS=`echo ${w32api_version} | tr '-' '_'`
+AC_SUBST(W32API_RPMVERS)
+W32API_RPMREL="${w32api_rpm_release}"
+AC_SUBST(W32API_RPMREL)
+
+SOLARIS_VERS="${solaris_version}"
+AC_SUBST(SOLARIS_VERS)
+SOLARIS_RPMVERS=`echo ${solaris_version} | tr '-' '_'`
+AC_SUBST(SOLARIS_RPMVERS)
+SOLARIS_RPMREL="${solaris_rpm_release}"
+AC_SUBST(SOLARIS_RPMREL)
+
+GCC_VERS="${gcc_version}"
+AC_SUBST(GCC_VERS)
+GCC_RPMVERS=`echo ${gcc_version} | tr '-' '_'`
+AC_SUBST(GCC_RPMVERS)
+GCC_RPMREL="${gcc_rpm_release}"
+AC_SUBST(GCC_RPMREL)
+
+RPM_BUILD_ROOT="$rpm_build_root/%{name}-root"
+AC_SUBST(RPM_BUILD_ROOT)
+
+AC_CONFIG_FILES([Makefile
+sparc-solaris-binutils.spec
+sparc-solaris-libs.spec
+sparc-solaris-gcc.spec
+])
+AC_OUTPUT
diff --git a/contrib/solaris/setup b/contrib/solaris/setup
new file mode 100644
index 0000000000..cdab037a74
--- /dev/null
+++ b/contrib/solaris/setup
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+CFG=setup.cache
+
+# RTEMS tools setup
+
+if test ! -f ./$CFG;
+then
+ echo -n "restoring default setup.cache .."
+ cp ./setup.def ./$CFG
+ echo " done"
+fi
+
+echo -n "loading setup from ./$CFG .."
+. ./$CFG
+echo " done"
+echo
+
+menu_setup()
+{
+while true;
+do
+ echo
+ echo " Source packages setup"
+ echo
+ echo "0 binutils version : $binutils_version"
+ echo "1 binutils rpm release : $binutils_rpm_release"
+ echo "2 solaris version : $cygwin_version"
+ echo "3 solaris rpm release : $cygwin_rpm_release"
+ echo "4 gcc version : $gcc_version"
+ echo "5 gcc rpm release : $gcc_rpm_release"
+ echo "a rpm build root : $rpm_build_root"
+ echo
+
+ echo -n "[0-9a] or any other key to quit >"
+ read sel
+ case $sel in
+ 0) echo -n "BINUTILS source >"
+ read binutils_version ;;
+ 1) echo -n "BINUTILS rpm release >"
+ read binutils_rpm_release ;;
+ 2) echo -n "SOLARIS source >"
+ read solaris_version ;;
+ 3) echo -n "SOLARIS rpm release >"
+ read solaris_rpm_release ;;
+ 4) echo -n "GCC source >"
+ read gcc_version ;;
+ 5) echo -n "GCC RPM release >"
+ read gcc_rpm_release ;;
+ a) echo -n "RPM build root >"
+ read rpm_build_root ;;
+ *)
+ return 0 ;;
+ esac
+done
+}
+
+
+save_setup()
+{
+echo -n "saving setup to $CFG .."
+
+echo "# RTEMS tools setup" > $CFG
+
+echo "binutils_version=$binutils_version" >> $CFG
+echo "binutils_patch_version=$binutils_patch_version" >> $CFG
+echo "binutils_rpm_release=$binutils_rpm_release" >> $CFG
+
+echo "mingw_version=$mingw_version" >> $CFG
+echo "mingw_patch_version=$mingw_patch_version" >> $CFG
+echo "mingw_rpm_release=$mingw_rpm_release" >> $CFG
+
+echo "solaris_version=$cygwin_version" >> $CFG
+echo "solaris_patch_version=$cygwin_patch_version" >> $CFG
+echo "solaris_rpm_release=$cygwin_rpm_release" >> $CFG
+
+echo "w32api_version=$w32api_version" >> $CFG
+echo "w32api_patch_version=$w32api_patch_version" >> $CFG
+echo "w32api_rpm_release=$w32api_rpm_release" >> $CFG
+
+echo "gcc_version=$gcc_version" >> $CFG
+echo "gcc_patch_version=$gcc_patch_version" >> $CFG
+echo "gcc_rpm_release=$gcc_rpm_release" >> $CFG
+
+echo "rpm_build_root=$rpm_build_root" >> $CFG
+
+echo " done"
+test -f Makefile || ./configure
+}
+
+menu_setup
+
+echo
+echo -n "Save setup [y|n] >"
+read sel
+case $sel in
+''|y*|Y*) save_setup ;;
+*) ;;
+esac
diff --git a/contrib/solaris/setup.def b/contrib/solaris/setup.def
new file mode 100644
index 0000000000..a6e8360af0
--- /dev/null
+++ b/contrib/solaris/setup.def
@@ -0,0 +1,12 @@
+#
+# Cygwin cross tools setup
+#
+# $Id$
+#
+binutils_version=2.11.2
+binutils_rpm_release=1
+solaris_version=8
+solaris_rpm_release=1
+gcc_version=2.95.3
+gcc_rpm_release=1
+rpm_build_root=/var/tmp
diff --git a/contrib/solaris/sparc-solaris-binutils.spec.in b/contrib/solaris/sparc-solaris-binutils.spec.in
new file mode 100644
index 0000000000..df0b74fdc5
--- /dev/null
+++ b/contrib/solaris/sparc-solaris-binutils.spec.in
@@ -0,0 +1,86 @@
+#
+# spec file for binutils package targetting solaris
+#
+
+%define binutils_version @BINUTILS_VERS@
+%define binutils_rpmvers @BINUTILS_RPMVERS@
+
+Vendor: OAR Corporation
+Distribution: Linux
+Name: sparc-solaris-binutils
+Summary: binutils for target sparc-solaris
+Group: solaris
+Release: @BINUTILS_RPMREL@
+Summary: binutils for sparc-solaris
+License: GPL/LGPL
+Autoreqprov: off
+Packager: joel@OARcorp.com
+Prefix: /opt/solaris
+BuildRoot: @RPM_BUILD_ROOT@
+
+Version: %binutils_rpmvers
+Source0: ftp://ftp.gnu.org.com/pub/gnu/binutils/binutils-%{binutils_version}.tar.gz
+NoSource: 0
+%description
+
+Cross binutils for target solaris
+
+%prep
+# untar the sources inside sparc-solaris-binutils
+%setup -c -n sparc-solaris-binutils -a 0
+
+%build
+ test -d build || mkdir build
+ cd build
+ ../binutils-%{binutils_version}/configure --target=sparc-solaris \
+ --disable-nls --disable-win32-registry \
+ --verbose --prefix=%{prefix}
+
+ make all
+
+%install
+ cd build
+ make prefix=$RPM_BUILD_ROOT%{prefix} install
+
+# A bug in binutils: binutils does not install share/locale
+# however it uses it
+ ../binutils-%{binutils_version}/mkinstalldirs \
+ $RPM_BUILD_ROOT%{prefix}/share/locale
+
+# We don't want info files
+ rm -rf $RPM_BUILD_ROOT%{prefix}/info
+
+# c++filt now comes from gcc
+ rm -f $RPM_BUILD_ROOT%{prefix}/bin/sparc-solaris-c++filt
+
+%clean
+# let rpm --clean remove BuildRoot iff using the default BuildRoot
+ test "$RPM_BUILD_ROOT" = "@RPM_BUILD_ROOT@" && \
+ rm -rf $RPM_BUILD_ROOT
+
+%files
+
+%dir %{prefix}/man
+%dir %{prefix}/man/man1
+%doc %{prefix}/man/man1/sparc-solaris-*.1*
+
+%dir %{prefix}/include
+%{prefix}/include/*.h
+
+%dir %{prefix}/lib
+%{prefix}/lib/libbfd*
+%{prefix}/lib/libiberty*
+%{prefix}/lib/libopcodes*
+
+%dir %{prefix}/share
+%dir %{prefix}/share/locale
+
+%dir %{prefix}/bin
+%{prefix}/bin/*
+
+%dir %{prefix}/sparc-solaris
+%dir %{prefix}/sparc-solaris/bin
+%{prefix}/sparc-solaris/bin/*
+
+%dir %{prefix}/sparc-solaris/lib
+%{prefix}/sparc-solaris/lib/ldscripts
diff --git a/contrib/solaris/sparc-solaris-gcc.spec.in b/contrib/solaris/sparc-solaris-gcc.spec.in
new file mode 100644
index 0000000000..bb95f8170c
--- /dev/null
+++ b/contrib/solaris/sparc-solaris-gcc.spec.in
@@ -0,0 +1,98 @@
+#
+# spec file for building gcc for solaris
+#
+
+%define gcc_version @GCC_VERS@
+%define gcc_rpmvers @GCC_RPMVERS@
+
+Vendor: OAR Corporation
+Distribution: Linux
+Name: sparc-solaris-gcc
+Summary: sparc-solaris gcc.
+Requires: sparc-solaris-binutils
+Requires: sparc-solaris-libs
+Group: solaris
+Release: @GCC_RPMREL@
+License: gcc is GPL/LGPL
+Prefix: /opt/solaris
+Autoreqprov: on
+Packager: joel@OARcorp.com
+Version: %gcc_rpmvers
+
+Source0: ftp://sourceware.cygnus.com/pub/solaris/latest/gcc/gcc-everything-%{gcc_version}.tar.gz
+NoSource: 0
+
+BuildRoot: @RPM_BUILD_ROOT@
+
+%description
+Cross gcc for target solaris
+
+%prep
+# untar the sources inside sparc-solaris-gcc
+%setup -c -n %{name} -a 0
+
+ test -d build || mkdir build
+
+%build
+ cd build
+
+ ../gcc-%{gcc_version}/configure --target=sparc-solaris \
+ --with-gnu-as --with-gnu-ld --verbose \
+ --disable-nls --enable-languages=c,c++ \
+ --prefix=%{prefix}
+
+ make all
+# We don't want info files
+# make info
+
+%install
+ cd build
+ # Bug in gcc-2.95.1: It doesn't build this installation directory
+ # If it doesn't find it, gcc doesn't install sparc-solaris/bin/gcc
+ ../gcc-%{gcc_version}/mkinstalldirs \
+ $RPM_BUILD_ROOT%{prefix}/sparc-solaris/bin
+
+ make prefix=$RPM_BUILD_ROOT%{prefix} install
+ # cd back to build/
+ cd ../..
+
+ # We don't want info files
+ rm -rf $RPM_BUILD_ROOT%{prefix}/info
+
+ # libiberty comes from solaris-libs
+ rm -f $RPM_BUILD_ROOT%{prefix}/sparc-solaris/lib/libiberty.a
+
+%clean
+# let rpm --clean remove BuildRoot iff using the default BuildRoot
+ test "$RPM_BUILD_ROOT" = "@RPM_BUILD_ROOT@" && \
+ rm -rf $RPM_BUILD_ROOT
+
+%files
+
+%dir %{prefix}/bin
+%{prefix}/bin/cpp
+%{prefix}/bin/gcov
+
+%dir %{prefix}/man
+%dir %{prefix}/man/man1
+%doc %{prefix}/man/man1/cccp.1*
+%doc %{prefix}/man/man1/sparc-solaris-gcc.1*
+%doc %{prefix}/man/man1/sparc-solaris-g++.1*
+
+%dir %{prefix}/include
+
+%{prefix}/include/g++-3
+%{prefix}/bin/sparc-solaris-c++
+%{prefix}/bin/sparc-solaris-c++filt
+%{prefix}/bin/sparc-solaris-g++
+%{prefix}/bin/sparc-solaris-gcc
+%{prefix}/bin/sparc-solaris-protoize
+%{prefix}/bin/sparc-solaris-unprotoize
+
+# %dir %{prefix}/lib/gcc-lib/sparc-solaris/%{gcc_version}/include
+
+%{prefix}/sparc-solaris
+%dir %{prefix}/lib
+%dir %{prefix}/lib/gcc-lib
+%dir %{prefix}/lib/gcc-lib/sparc-solaris
+%{prefix}/lib/gcc-lib/sparc-solaris/%{gcc_version}
diff --git a/contrib/solaris/sparc-solaris-libs.spec.in b/contrib/solaris/sparc-solaris-libs.spec.in
new file mode 100644
index 0000000000..0c02dca28e
--- /dev/null
+++ b/contrib/solaris/sparc-solaris-libs.spec.in
@@ -0,0 +1,50 @@
+#
+# spec file for package sparc-solaris-libs
+#
+
+%define solaris_version @SOLARIS_VERS@
+%define solaris_rpmvers @SOLARIS_RPMVERS@
+
+Vendor: Ralf Corsepius
+Distribution: Linux
+Name: sparc-solaris-libs
+Release: @SOLARIS_RPMREL@
+Copyright: SUN Microsystems
+Group: solaris
+Provides: sparc-solaris-libs
+
+Autoreqprov: off
+Packager: joel@OARcorp.com
+Prefix: /opt/solaris
+BuildRoot: @RPM_BUILD_ROOT@
+
+Version: %solaris_rpmvers
+Summary: solaris
+
+Source0: solaris-libs-%{solaris_version}.tar.bz2
+NoSource: 0
+
+%description
+Cygwin libs
+
+%prep
+%setup -c
+
+%build
+ rm -rf usr/bin
+ rm -rf usr/info
+ mv usr/include usr/sys-include
+ mv usr sparc-solaris
+
+%install
+ mkdir -p $RPM_BUILD_ROOT%{prefix}
+ cp -a sparc-solaris $RPM_BUILD_ROOT%{prefix}
+
+%clean
+# let rpm --clean remove BuildRoot iff using the default BuildRoot
+ test "$RPM_BUILD_ROOT" = "@RPM_BUILD_ROOT@" && \
+ rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%{prefix}/sparc-solaris