summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2003-09-05 03:23:17 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2003-09-05 03:23:17 +0000
commit792f23905ccb6a881895a82a8ba530f329b76492 (patch)
tree4be0ce3e257c4438692da2ec01d1ac9b7a346e44 /scripts
parent2003-09-04 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-792f23905ccb6a881895a82a8ba530f329b76492.tar.bz2
2003-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* binutils/base-binutils.add: Add osversion support. * binutils/binutils.add: Add osversion support. %setup -n %{name}-%{version}. Don't remove c++filt. * binutils/target-binutils.add: Add osversion support. Pickup c++filt. * gcc3newlib/base-g77.add: Add osversion support. * gcc3newlib/base-gcc.add: Add osversion support. * gcc3newlib/base-gcj.add: Add osversion support. * gcc3newlib/base-gnat.add: Add osversion support. * gcc3newlib/gccnewlib.add: Add osversion support. Remove c++filt, %setup -n -n %{name}-%{version}. * gcc3newlib/target-c++.add: Add osversion support. Don't pickup c++filt. * gcc3newlib/target-g77.add: Add osversion support. * gcc3newlib/target-gcc.add: Add osversion support. * gcc3newlib/target-gcj.add: Add osversion support. * gcc3newlib/target-gnat.add: Add osversion support. * gccnewlib/gccnewlib.add: %setup -n %{name}-%{version}. * gdb/base-gdb.add: Add osversion support, rpmgroup, rpmprefix, gdb_version, gdb_target. * gdb/target-gdb.add: Ditto. * gdb/gdb.add: Ditto. %setup -n -n %{name}-%{version}. 2003-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de> * binutils/Makefile.am: Fix osversion support for sh-rtemself. * gcc3newlib/Makefile.am: Fix osversion support for sh-rtemself. 2003-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de> * configure.ac: Add --enable-osversions (OS-versioned RPMS support). * binutils/Makefile.am: Add osversion support. * binutils/mkspec.in: Add osversion support. * gcc3newlib/Makefile.am: Add osversion support. * gcc3newlib/mkspec.in: Add osversion support. * gdb/Makefile.am: Add osversion support. * gdb/mkspec.in: Add osversion support. Add rpmprefix, rpmgroup.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ChangeLog44
-rw-r--r--scripts/binutils/Makefile.am84
-rw-r--r--scripts/binutils/base-binutils.add10
-rw-r--r--scripts/binutils/binutils.add5
-rw-r--r--scripts/binutils/mkspec.in2
-rw-r--r--scripts/binutils/target-binutils.add9
-rw-r--r--scripts/configure.ac9
-rw-r--r--scripts/gcc3newlib/Makefile.am78
-rw-r--r--scripts/gcc3newlib/base-g77.add10
-rw-r--r--scripts/gcc3newlib/base-gcc.add12
-rw-r--r--scripts/gcc3newlib/base-gcj.add8
-rw-r--r--scripts/gcc3newlib/base-gnat.add6
-rw-r--r--scripts/gcc3newlib/gccnewlib.add40
-rw-r--r--scripts/gcc3newlib/mkspec.in1
-rw-r--r--scripts/gcc3newlib/target-c++.add3
-rw-r--r--scripts/gcc3newlib/target-g77.add2
-rw-r--r--scripts/gcc3newlib/target-gcc.add2
-rw-r--r--scripts/gcc3newlib/target-gcj.add2
-rw-r--r--scripts/gcc3newlib/target-gnat.add2
-rw-r--r--scripts/gccnewlib/gccnewlib.add2
-rw-r--r--scripts/gdb/Makefile.am84
-rw-r--r--scripts/gdb/base-gdb.add17
-rw-r--r--scripts/gdb/gdb.add38
-rw-r--r--scripts/gdb/mkspec.in3
-rw-r--r--scripts/gdb/target-gdb.add31
25 files changed, 279 insertions, 225 deletions
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index ae26c17c37..e6e155342e 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,47 @@
+2003-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * binutils/base-binutils.add: Add osversion support.
+ * binutils/binutils.add: Add osversion support.
+ %setup -n %{name}-%{version}.
+ Don't remove c++filt.
+ * binutils/target-binutils.add: Add osversion support.
+ Pickup c++filt.
+ * gcc3newlib/base-g77.add: Add osversion support.
+ * gcc3newlib/base-gcc.add: Add osversion support.
+ * gcc3newlib/base-gcj.add: Add osversion support.
+ * gcc3newlib/base-gnat.add: Add osversion support.
+ * gcc3newlib/gccnewlib.add: Add osversion support.
+ Remove c++filt,
+ %setup -n -n %{name}-%{version}.
+ * gcc3newlib/target-c++.add: Add osversion support.
+ Don't pickup c++filt.
+ * gcc3newlib/target-g77.add: Add osversion support.
+ * gcc3newlib/target-gcc.add: Add osversion support.
+ * gcc3newlib/target-gcj.add: Add osversion support.
+ * gcc3newlib/target-gnat.add: Add osversion support.
+ * gccnewlib/gccnewlib.add: %setup -n %{name}-%{version}.
+ * gdb/base-gdb.add: Add osversion support, rpmgroup, rpmprefix,
+ gdb_version, gdb_target.
+ * gdb/target-gdb.add: Ditto.
+ * gdb/gdb.add: Ditto.
+ %setup -n -n %{name}-%{version}.
+
+2003-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * binutils/Makefile.am: Fix osversion support for sh-rtemself.
+ * gcc3newlib/Makefile.am: Fix osversion support for sh-rtemself.
+
+2003-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * configure.ac: Add --enable-osversions (OS-versioned RPMS support).
+ * binutils/Makefile.am: Add osversion support.
+ * binutils/mkspec.in: Add osversion support.
+ * gcc3newlib/Makefile.am: Add osversion support.
+ * gcc3newlib/mkspec.in: Add osversion support.
+ * gdb/Makefile.am: Add osversion support.
+ * gdb/mkspec.in: Add osversion support.
+ Add rpmprefix, rpmgroup.
+
2003-09-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* binutils/base-binutils.add: Preps for 2.14 (Merger from CVS trunk).
diff --git a/scripts/binutils/Makefile.am b/scripts/binutils/Makefile.am
index 9953111019..eb3511a8f2 100644
--- a/scripts/binutils/Makefile.am
+++ b/scripts/binutils/Makefile.am
@@ -19,61 +19,61 @@ RPM_SPECS_DATA =
MKBINUTILSSPEC_DEPS = mkspec binutils.spec.in \
$(top_builddir)/setup.cache
-arm-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache arm-rtems > $@
-RPM_SPECS_DATA += arm-rtems-$(BINUTILSVERS).spec
+arm-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache arm-rtems@osversion@ > $@
+RPM_SPECS_DATA += arm-rtems@osversion@-$(BINUTILSVERS).spec
-c4x-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache c4x-rtems > $@
-RPM_SPECS_DATA += c4x-rtems-$(BINUTILSVERS).spec
+c4x-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache c4x-rtems@osversion@ > $@
+RPM_SPECS_DATA += c4x-rtems@osversion@-$(BINUTILSVERS).spec
-h8300-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache h8300-rtems > $@
-RPM_SPECS_DATA += h8300-rtems-$(BINUTILSVERS).spec
+h8300-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache h8300-rtems@osversion@ > $@
+RPM_SPECS_DATA += h8300-rtems@osversion@-$(BINUTILSVERS).spec
-hppa1.1-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache hppa1.1-rtems > $@
-RPM_SPECS_DATA += hppa1.1-rtems-$(BINUTILSVERS).spec
+hppa1.1-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache hppa1.1-rtems@osversion@ > $@
+RPM_SPECS_DATA += hppa1.1-rtems@osversion@-$(BINUTILSVERS).spec
-i386-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache i386-rtems > $@
-RPM_SPECS_DATA += i386-rtems-$(BINUTILSVERS).spec
+i386-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache i386-rtems@osversion@ > $@
+RPM_SPECS_DATA += i386-rtems@osversion@-$(BINUTILSVERS).spec
-i960-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache i960-rtems > $@
-RPM_SPECS_DATA += i960-rtems-$(BINUTILSVERS).spec
+i960-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache i960-rtems@osversion@ > $@
+RPM_SPECS_DATA += i960-rtems@osversion@-$(BINUTILSVERS).spec
-m68k-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache m68k-rtems > $@
-RPM_SPECS_DATA += m68k-rtems-$(BINUTILSVERS).spec
+m68k-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache m68k-rtems@osversion@ > $@
+RPM_SPECS_DATA += m68k-rtems@osversion@-$(BINUTILSVERS).spec
-mips64orion-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache mips64orion-rtems > $@
-RPM_SPECS_DATA += mips64orion-rtems-$(BINUTILSVERS).spec
+mips64orion-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache mips64orion-rtems@osversion@ > $@
+RPM_SPECS_DATA += mips64orion-rtems@osversion@-$(BINUTILSVERS).spec
-mips-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache mips-rtems > $@
-RPM_SPECS_DATA += mips-rtems-$(BINUTILSVERS).spec
+mips-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache mips-rtems@osversion@ > $@
+RPM_SPECS_DATA += mips-rtems@osversion@-$(BINUTILSVERS).spec
-or32-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache or32-rtems > $@
-RPM_SPECS_DATA += or32-rtems-$(BINUTILSVERS).spec
+or32-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache or32-rtems@osversion@ > $@
+RPM_SPECS_DATA += or32-rtems@osversion@-$(BINUTILSVERS).spec
-powerpc-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache powerpc-rtems > $@
-RPM_SPECS_DATA += powerpc-rtems-$(BINUTILSVERS).spec
+powerpc-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache powerpc-rtems@osversion@ > $@
+RPM_SPECS_DATA += powerpc-rtems@osversion@-$(BINUTILSVERS).spec
-sh-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache sh-rtems > $@
-RPM_SPECS_DATA += sh-rtems-$(BINUTILSVERS).spec
+sh-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache sh-rtems@osversion@ > $@
+RPM_SPECS_DATA += sh-rtems@osversion@-$(BINUTILSVERS).spec
-sh-rtemself-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache sh-rtemself > $@
-RPM_SPECS_DATA += sh-rtemself-$(BINUTILSVERS).spec
+sh-rtemself@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache sh-rtemself@osversion@ > $@
+RPM_SPECS_DATA += sh-rtemself@osversion@-$(BINUTILSVERS).spec
-sparc-rtems-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
- $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache sparc-rtems > $@
-RPM_SPECS_DATA += sparc-rtems-$(BINUTILSVERS).spec
+sparc-rtems@osversion@-$(BINUTILSVERS).spec: $(MKBINUTILSSPEC_DEPS)
+ $(MKBINUTILSSPEC) -cfg $(top_builddir)/setup.cache sparc-rtems@osversion@ > $@
+RPM_SPECS_DATA += sparc-rtems@osversion@-$(BINUTILSVERS).spec
CLEANFILES += $(RPM_SPECS_DATA)
diff --git a/scripts/binutils/base-binutils.add b/scripts/binutils/base-binutils.add
index 21644618a2..c7e555f0ad 100644
--- a/scripts/binutils/base-binutils.add
+++ b/scripts/binutils/base-binutils.add
@@ -1,18 +1,18 @@
# ==============================================================
# rtems-base-binutils
# ==============================================================
-%package -n %{rpmprefix}rtems-base-binutils
+%package -n %{rpmprefix}rtems@osversion@-base-binutils
Summary: base package for rtems binutils
Group: %{rpmgroup}
PreReq: /sbin/install-info
-%description -n %{rpmprefix}rtems-base-binutils
+%description -n %{rpmprefix}rtems@osversion@-base-binutils
RTEMS is an open source operating system for embedded systems.
This is the base for binutils regardless of target CPU.
-%post -n %{rpmprefix}rtems-base-binutils
+%post -n %{rpmprefix}rtems@osversion@-base-binutils
if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
then
rm -f $RPM_INSTALL_PREFIX%{_prefix}/info/dir
@@ -22,7 +22,7 @@ This is the base for binutils regardless of target CPU.
done
fi
-%postun -n %{rpmprefix}rtems-base-binutils
+%postun -n %{rpmprefix}rtems@osversion@-base-binutils
if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
then
rm -f $RPM_INSTALL_PREFIX%{_prefix}/info/dir
@@ -32,7 +32,7 @@ This is the base for binutils regardless of target CPU.
done
fi
-%files -n %{rpmprefix}rtems-base-binutils -f files
+%files -n %{rpmprefix}rtems@osversion@-base-binutils -f files
%defattr(-,root,root)
%dir %{_prefix}/info
%doc %{_prefix}/info/dir
diff --git a/scripts/binutils/binutils.add b/scripts/binutils/binutils.add
index e811d33a99..4c303331c3 100644
--- a/scripts/binutils/binutils.add
+++ b/scripts/binutils/binutils.add
@@ -38,8 +38,7 @@ RTEMS is an open source operating system for embedded systems.
This is binutils sources with patches for RTEMS.
%prep
-# untar the sources inside %{binutils_target}-binutils
-%setup -c -n %{binutils_target}-binutils
+%setup -c -n %{name}-%{version}
@PATCH2@
test -d build || mkdir build
@@ -63,7 +62,7 @@ This is binutils sources with patches for RTEMS.
../binutils-%{binutils_version}/mkinstalldirs \
$RPM_BUILD_ROOT%{_prefix}/share/locale
- rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{binutils_target}-c++filt%{_exeext}
+# rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{binutils_target}-c++filt%{_exeext}
# gzip info files
gzip -9qf $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null
gzip -9qf $RPM_BUILD_ROOT%{_prefix}/info/*.info-* 2>/dev/null
diff --git a/scripts/binutils/mkspec.in b/scripts/binutils/mkspec.in
index bbba80989b..ce19c4aa70 100644
--- a/scripts/binutils/mkspec.in
+++ b/scripts/binutils/mkspec.in
@@ -59,6 +59,8 @@ sed -e "s%@Release\@%${binutils_rpm_release}%g" \
-e "s%@prefix\@%@prefix@%g" \
-e "s,@rpmprefix\@,@rpmprefix@,g" \
-e "s%@rpmgroup\@%@rpmgroup@%g" \
+ -e "s%@rpmgroup\@%@rpmgroup@%g" \
+ -e "s%@osversion\@%@osversion@%g" \
-e "s%@binutils_version\@%${binutils_version}%g" \
-e "s%@binutils_patch_version\@%${binutils_patch_version}%g" \
-e "s,@PATCH1\@,${PATCH1}," \
diff --git a/scripts/binutils/target-binutils.add b/scripts/binutils/target-binutils.add
index 7cd9da0a85..6694671321 100644
--- a/scripts/binutils/target-binutils.add
+++ b/scripts/binutils/target-binutils.add
@@ -4,7 +4,7 @@
%package -n %{rpmprefix}%{binutils_target}-binutils
Summary: rtems binutils for %{binutils_target}
Group: %{rpmgroup}
-Requires: %{rpmprefix}rtems-base-binutils
+Requires: %{rpmprefix}rtems@osversion@-base-binutils
Autoreqprov: off
%description -n %{rpmprefix}%{binutils_target}-binutils
@@ -21,10 +21,11 @@ This is the GNU binutils for RTEMS targetting %{binutils_target}.
%{_prefix}/bin/%{binutils_target}-addr2line%{_exeext}
%{_prefix}/bin/%{binutils_target}-ar%{_exeext}
%{_prefix}/bin/%{binutils_target}-as%{_exeext}
-# c++filt now comes from gcc
-# %{_prefix}/bin/%{binutils_target}-c++filt%{_exeext}
+%{_prefix}/bin/%{binutils_target}-c++filt%{_exeext}
+%if "%{binutils_version}" < "2.13"
# deleted as of 2.13
-# %{_prefix}/bin/%{binutils_target}-gasp%{_exeext}
+%{_prefix}/bin/%{binutils_target}-gasp%{_exeext}
+%endif
%{_prefix}/bin/%{binutils_target}-ld%{_exeext}
%{_prefix}/bin/%{binutils_target}-nm%{_exeext}
%{_prefix}/bin/%{binutils_target}-objcopy%{_exeext}
diff --git a/scripts/configure.ac b/scripts/configure.ac
index 7ce93f907f..a328e6822d 100644
--- a/scripts/configure.ac
+++ b/scripts/configure.ac
@@ -23,6 +23,14 @@ no ) rpmprefix="%{nil}";;
esac],
[rpmprefix="rtems-"]RTEMS_API["-"])
+AC_ARG_ENABLE([osversions],
+[ --enable-osversions whether to use version numbers in os-tripples],
+[case $enable_osversions in
+yes ) osversion=RTEMS_API;;
+* ) osversion=;;
+esac],
+[osversion=])
+
AC_MSG_CHECKING(for rpm SPECS directory)
# Allow users to override RPM_SPECSdir from the environment.
if test -z "$RPM_SPECSdir" ;
@@ -79,6 +87,7 @@ AC_SUBST(BSPVERS)
AC_SUBST(RPM_CPU)
AC_SUBST(rpmprefix,$rpmprefix)
AC_SUBST(rpmgroup,[Rtems/][RTEMS_API])
+AC_SUBST(osversion,$osversion)
AC_CONFIG_FILES([Makefile
binutils/Makefile
diff --git a/scripts/gcc3newlib/Makefile.am b/scripts/gcc3newlib/Makefile.am
index b1e68cfe26..96c31ca24d 100644
--- a/scripts/gcc3newlib/Makefile.am
+++ b/scripts/gcc3newlib/Makefile.am
@@ -28,57 +28,57 @@ MKGCCNEWLIBSPEC_DEPS = mkspec gccnewlib.spec.in \
RPM_SPECS_DATA =
-arm-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache arm-rtems > $@
-RPM_SPECS_DATA += arm-rtems-$(GCC3NEWLIBVERS).spec
+arm-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache arm-rtems@osversion@ > $@
+RPM_SPECS_DATA += arm-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-c4x-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache c4x-rtems > $@
-RPM_SPECS_DATA += c4x-rtems-$(GCC3NEWLIBVERS).spec
+c4x-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache c4x-rtems@osversion@ > $@
+RPM_SPECS_DATA += c4x-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-h8300-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache h8300-rtems > $@
-RPM_SPECS_DATA += h8300-rtems-$(GCC3NEWLIBVERS).spec
+h8300-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache h8300-rtems@osversion@ > $@
+RPM_SPECS_DATA += h8300-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-hppa1.1-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache hppa1.1-rtems > $@
-RPM_SPECS_DATA += hppa1.1-rtems-$(GCC3NEWLIBVERS).spec
+hppa1.1-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache hppa1.1-rtems@osversion@ > $@
+RPM_SPECS_DATA += hppa1.1-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-i386-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache i386-rtems > $@
-RPM_SPECS_DATA += i386-rtems-$(GCC3NEWLIBVERS).spec
+i386-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache i386-rtems@osversion@ > $@
+RPM_SPECS_DATA += i386-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-i960-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache i960-rtems > $@
-RPM_SPECS_DATA += i960-rtems-$(GCC3NEWLIBVERS).spec
+i960-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache i960-rtems@osversion@ > $@
+RPM_SPECS_DATA += i960-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-m68k-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache m68k-rtems > $@
-RPM_SPECS_DATA += m68k-rtems-$(GCC3NEWLIBVERS).spec
+m68k-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache m68k-rtems@osversion@ > $@
+RPM_SPECS_DATA += m68k-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-mips64orion-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache mips64orion-rtems > $@
-RPM_SPECS_DATA += mips64orion-rtems-$(GCC3NEWLIBVERS).spec
+mips64orion-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache mips64orion-rtems@osversion@ > $@
+RPM_SPECS_DATA += mips64orion-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-mips-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache mips-rtems > $@
-RPM_SPECS_DATA += mips-rtems-$(GCC3NEWLIBVERS).spec
+mips-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache mips-rtems@osversion@ > $@
+RPM_SPECS_DATA += mips-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-powerpc-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache powerpc-rtems > $@
-RPM_SPECS_DATA += powerpc-rtems-$(GCC3NEWLIBVERS).spec
+powerpc-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache powerpc-rtems@osversion@ > $@
+RPM_SPECS_DATA += powerpc-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-sh-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtems > $@
-RPM_SPECS_DATA += sh-rtems-$(GCC3NEWLIBVERS).spec
+sh-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtems@osversion@ > $@
+RPM_SPECS_DATA += sh-rtems@osversion@-$(GCC3NEWLIBVERS).spec
-sh-rtemself-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtemself > $@
-RPM_SPECS_DATA += sh-rtemself-$(GCC3NEWLIBVERS).spec
+sh-rtemself@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtemself@osversion@ > $@
+RPM_SPECS_DATA += sh-rtemself@osversion@-$(GCC3NEWLIBVERS).spec
-sparc-rtems-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache sparc-rtems > $@
-RPM_SPECS_DATA += sparc-rtems-$(GCC3NEWLIBVERS).spec
+sparc-rtems@osversion@-$(GCC3NEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sparc-rtems@osversion@ > $@
+RPM_SPECS_DATA += sparc-rtems@osversion@-$(GCC3NEWLIBVERS).spec
CLEANFILES += $(RPM_SPECS_DATA)
diff --git a/scripts/gcc3newlib/base-g77.add b/scripts/gcc3newlib/base-g77.add
index 06f96e8e61..1500007930 100644
--- a/scripts/gcc3newlib/base-g77.add
+++ b/scripts/gcc3newlib/base-g77.add
@@ -2,17 +2,17 @@
# ==============================================================
# rtems-base-g77
# ==============================================================
-%package -n %{rpmprefix}rtems-base-g77
+%package -n %{rpmprefix}rtems@osversion@-base-g77
Summary: rtems base package for gcc/g77 compiler
Group: %{rpmgroup}
Requires: rtems-base-gcc
-%description -n %{rpmprefix}rtems-base-g77
+%description -n %{rpmprefix}rtems@osversion@-base-g77
RTEMS is an open source operating system for embedded systems.
This is the files for gcc/g77 that are shared by all targets.
-%files -n %{rpmprefix}rtems-base-g77
+%files -n %{rpmprefix}rtems@osversion@-base-g77
%defattr(-,root,root)
%dir %{_prefix}/info
%doc %{_prefix}/info/g77.info*.gz
@@ -21,7 +21,7 @@ This is the files for gcc/g77 that are shared by all targets.
%dir %{_prefix}/man/man1
%doc %{_prefix}/man/man1/%{gcc_target}-g77.1*
-%post -n %{rpmprefix}rtems-base-g77
+%post -n %{rpmprefix}rtems@osversion@-base-g77
if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
then
rm -f $RPM_INSTALL_PREFIX%{_prefix}/info/dir
@@ -31,7 +31,7 @@ This is the files for gcc/g77 that are shared by all targets.
done
fi
-%postun -n %{rpmprefix}rtems-base-g77
+%postun -n %{rpmprefix}rtems@osversion@-base-g77
if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
then
rm -f $RPM_INSTALL_PREFIX%{_prefix}/info/dir
diff --git a/scripts/gcc3newlib/base-gcc.add b/scripts/gcc3newlib/base-gcc.add
index f628b8d50c..27d0288929 100644
--- a/scripts/gcc3newlib/base-gcc.add
+++ b/scripts/gcc3newlib/base-gcc.add
@@ -1,17 +1,17 @@
# ==============================================================
-# %{rpmprefix}rtems-base-gcc
+# %{rpmprefix}rtems@osversion@-base-gcc
# ==============================================================
-%package -n %{rpmprefix}rtems-base-gcc
+%package -n %{rpmprefix}rtems@osversion@-base-gcc
Summary: base package for rtems gcc and newlib C Library
Group: %{rpmgroup}
-%description -n %{rpmprefix}rtems-base-gcc
+%description -n %{rpmprefix}rtems@osversion@-base-gcc
RTEMS is an open source operating system for embedded systems.
This is the files for gcc and newlib that are shared by all targets.
-%files -n %{rpmprefix}rtems-base-gcc
+%files -n %{rpmprefix}rtems@osversion@-base-gcc
%defattr(-,root,root)
%dir %{_prefix}/info
%doc %{_prefix}/info/cpp.info*.gz
@@ -32,7 +32,7 @@ This is the files for gcc and newlib that are shared by all targets.
%dir %{_prefix}/include
-%post -n %{rpmprefix}rtems-base-gcc
+%post -n %{rpmprefix}rtems@osversion@-base-gcc
if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
then
rm -f $RPM_INSTALL_PREFIX%{_prefix}/info/dir
@@ -42,7 +42,7 @@ This is the files for gcc and newlib that are shared by all targets.
done
fi
-%postun -n %{rpmprefix}rtems-base-gcc
+%postun -n %{rpmprefix}rtems@osversion@-base-gcc
if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
then
rm -f $RPM_INSTALL_PREFIX%{_prefix}/info/dir
diff --git a/scripts/gcc3newlib/base-gcj.add b/scripts/gcc3newlib/base-gcj.add
index 93d4f9f25d..7fdb6c18d1 100644
--- a/scripts/gcc3newlib/base-gcj.add
+++ b/scripts/gcc3newlib/base-gcj.add
@@ -2,17 +2,17 @@
# ==============================================================
# rtems-base-gcj
# ==============================================================
-%package -n %{rpmprefix}rtems-base-gcj
+%package -n %{rpmprefix}rtems@osversion@-base-gcj
Summary: base package for rtems gcc/java compiler (gcj).
Group: %{rpmgroup}
-Requires: %{rpmprefix}rtems-base-gcc
+Requires: %{rpmprefix}rtems@osversion@-base-gcc
-%description -n %{rpmprefix}rtems-base-gcj
+%description -n %{rpmprefix}rtems@osversion@-base-gcj
RTEMS is an open source operating system for embedded systems.
This is the files for gcc/java (gcj) that are shared by all targets.
-%files -n %{rpmprefix}rtems-base-gcj
+%files -n %{rpmprefix}rtems@osversion@-base-gcj
%defattr(-,root,root)
%dir %{_prefix}/bin
%{_prefix}/bin/jar%{_exeext}
diff --git a/scripts/gcc3newlib/base-gnat.add b/scripts/gcc3newlib/base-gnat.add
index 451994596a..090d187615 100644
--- a/scripts/gcc3newlib/base-gnat.add
+++ b/scripts/gcc3newlib/base-gnat.add
@@ -2,16 +2,16 @@
# ==============================================================
# rtems-base-gnat
# ==============================================================
-%package -n %{rpmprefix}rtems-base-gnat
+%package -n %{rpmprefix}rtems@osversion@-base-gnat
Summary: gcc/gnat tools
Group: %{rpmgroup}
-%description -n %{rpmprefix}rtems-base-gnat
+%description -n %{rpmprefix}rtems@osversion@-base-gnat
RTEMS is an open source operating system for embedded systems.
This is the gcc/gnat tools for the gcc/gnat compiler
-%files -n %{rpmprefix}rtems-base-gnat
+%files -n %{rpmprefix}rtems@osversion@-base-gnat
%defattr(-,root,root)
%dir %{_prefix}/bin
# %{_prefix}/bin/gnat*
diff --git a/scripts/gcc3newlib/gccnewlib.add b/scripts/gcc3newlib/gccnewlib.add
index 66a77139ba..098953708d 100644
--- a/scripts/gcc3newlib/gccnewlib.add
+++ b/scripts/gcc3newlib/gccnewlib.add
@@ -71,38 +71,38 @@ NoSource: 1
%define build_gcj 0
%define build_gnat 0
-%if "%{gcc_target}" == "arm-rtems"
+%if "%{gcc_target}" == "arm-rtems@osversion@"
%define build_gcj %_gcj
%endif
-%if "%{gcc_target}" == "c4x-rtems"
+%if "%{gcc_target}" == "c4x-rtems@osversion@"
%define build_cxx 0
%endif
-%if "%{gcc_target}" == "i386-rtems"
+%if "%{gcc_target}" == "i386-rtems@osversion@"
%define build_gnat %_gnat
%define build_gcj %_gcj
%endif
-%if "%{gcc_target}" == "i960-rtems"
+%if "%{gcc_target}" == "i960-rtems@osversion@"
%define build_cxx 0
%endif
-%if "%{gcc_target}" == "m68k-rtems"
+%if "%{gcc_target}" == "m68k-rtems@osversion@"
%define build_gcj %_gcj
%endif
-%if "%{gcc_target}" == "mips-rtems"
+%if "%{gcc_target}" == "mips-rtems@osversion@"
%define build_gnat %_gnat
%define build_gcj %_gcj
%endif
-%if "%{gcc_target}" == "powerpc-rtems"
+%if "%{gcc_target}" == "powerpc-rtems@osversion@"
%define build_gnat %_gnat
%define build_gcj %_gcj
%endif
-%if "%{gcc_target}" == "sparc-rtems"
+%if "%{gcc_target}" == "sparc-rtems@osversion@"
%define build_gnat %_gnat
%define build_gcj %_gcj
%endif
@@ -140,7 +140,7 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
%prep
# untar the sources inside %{gcc_target}-gcc-newlib
-%setup -c -T -n %{name} -a0 -a1
+%setup -c -T -n %{name}-%{version} -a0 -a1
@PATCH2@
@PATCH4@
@@ -199,11 +199,7 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
cp ../gcc-%{gcc_version}/gcc/gsyslimits.h gcc/include/syslimits.h
%endif
-%if %build_cxx
-%if "%{gcc_version}" >= "3.3"
- make -C %{gcc_target}/libiberty CFLAGS="$RPM_OPT_FLAGS" c++filt
-%endif
-%endif
+ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{gcc_target}-c++filt%{_exeext}
%if %build_gnat
cd ../gcc-%{gcc_version}/gcc/ada
@@ -230,11 +226,12 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
GNATLIBCFLAGS="$GNATLIBCFLAGS -isystem `pwd`/../newlib-%{newlib_version}/newlib/libc/include"
# Without this xgcc doesn't find the target's binutils.
GNATLIBCFLAGS="$GNATLIBCFLAGS -B%{_prefix}/%{gcc_target}/bin/"
-%if "%{gcc_target}" == "mips-rtems"
+%if "%{gcc_target}" == "mips-rtems@osversion@"
GNATLIBCFLAGS="$GNATLIBCFLAGS -G0"
%endif
make -C gcc GNATLIBCFLAGS="${GNATLIBCFLAGS}" gnatlib
%endif
+
make info
%install
@@ -268,6 +265,11 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
# host library
rm -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libiberty.a
+%if "%{gcc_version}" < "3.3"
+ # We use the version from binutils
+ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{gcc_target}-c++filt%{_exeext}
+%endif
+
%if "%{gcc_version}" < "3.0"
# Bug in gcc-2.95.x: It bogusly tries to share cpp for all targets.
# Rename it to target_alias-cpp
@@ -278,14 +280,6 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
fi
%endif
-%if %build_cxx
-%if "%{gcc_version}" >= "3.3"
- install -d $RPM_BUILD_ROOT%{_prefix}/bin
- install -c -m 755 %{gcc_target}/libiberty/c++filt%{_exeext} \
- $RPM_BUILD_ROOT%{_prefix}/bin/%{target_alias}-c++filt%{_exeext}
-%endif
-%endif
-
# gzip info files
gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null
%if "%{gcc_version}" < "3.3"
diff --git a/scripts/gcc3newlib/mkspec.in b/scripts/gcc3newlib/mkspec.in
index 0492edd10a..aa9abd675b 100644
--- a/scripts/gcc3newlib/mkspec.in
+++ b/scripts/gcc3newlib/mkspec.in
@@ -71,6 +71,7 @@ sed -e "s,@PATCH1\@,${PATCH1}," \
-e "s%@prefix\@%@prefix@%g" \
-e "s,@rpmprefix\@,@rpmprefix@,g" \
-e "s%@rpmgroup\@%@rpmgroup@%g" \
+ -e "s%@osversion\@%@osversion@%g" \
-e "s,@rpm_build_root\@,${rpm_build_root},g" \
-e "s%@gcc_version\@%${gcc3_version}%g" \
-e "s%@gcc_patch_version\@%${gcc3_patch_version}%g" \
diff --git a/scripts/gcc3newlib/target-c++.add b/scripts/gcc3newlib/target-c++.add
index e2fe80a86b..e96f876f42 100644
--- a/scripts/gcc3newlib/target-c++.add
+++ b/scripts/gcc3newlib/target-c++.add
@@ -5,7 +5,7 @@
%package -n %{rpmprefix}%{gcc_target}-c++
Summary: gcc/g++ compiler (c++) for %{gcc_target}
Group: %{rpmgroup}
-Requires: %{rpmprefix}rtems-base-gcc %{rpmprefix}%{gcc_target}-gcc
+Requires: %{rpmprefix}rtems@osversion@-base-gcc %{rpmprefix}%{gcc_target}-gcc
%description -n %{rpmprefix}%{gcc_target}-c++
RTEMS is an open source operating system for embedded systems.
@@ -19,7 +19,6 @@ This is the gcc/g++ compiler for %{gcc_target}
%dir %{_prefix}/bin
%{_prefix}/bin/%{gcc_target}-c++%{_exeext}
%{_prefix}/bin/%{gcc_target}-g++%{_exeext}
-%{_prefix}/bin/%{gcc_target}-c++filt%{_exeext}
%{_prefix}/lib/gcc-lib/%{gcc_target}/%{gcc_version}/cc1plus%{_exeext}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target}/%{gcc_version}/include
diff --git a/scripts/gcc3newlib/target-g77.add b/scripts/gcc3newlib/target-g77.add
index 0e2b696855..bbf5c07fbd 100644
--- a/scripts/gcc3newlib/target-g77.add
+++ b/scripts/gcc3newlib/target-g77.add
@@ -5,7 +5,7 @@
%package -n %{rpmprefix}%{gcc_target}-g77
Summary: gcc/g77 compiler for %{gcc_target}
Group: %{rpmgroup}
-Requires: %{rpmprefix}rtems-base-g77 %{rpmprefix}%{gcc_target}-gcc
+Requires: %{rpmprefix}rtems@osversion@-base-g77 %{rpmprefix}%{gcc_target}-gcc
%description -n %{rpmprefix}%{gcc_target}-g77
RTEMS is an open source operating system for embedded systems.
diff --git a/scripts/gcc3newlib/target-gcc.add b/scripts/gcc3newlib/target-gcc.add
index 161d902524..b2f48ff091 100644
--- a/scripts/gcc3newlib/target-gcc.add
+++ b/scripts/gcc3newlib/target-gcc.add
@@ -4,7 +4,7 @@
%package -n %{rpmprefix}%{gcc_target}-gcc
Summary: rtems gcc and newlib C Library for %{gcc_target}
Group: %{rpmgroup}
-Requires: %{rpmprefix}%{gcc_target}-binutils %{rpmprefix}rtems-base-gcc
+Requires: %{rpmprefix}%{gcc_target}-binutils %{rpmprefix}rtems@osversion@-base-gcc
%description -n %{rpmprefix}%{gcc_target}-gcc
RTEMS is an open source operating system for embedded systems.
diff --git a/scripts/gcc3newlib/target-gcj.add b/scripts/gcc3newlib/target-gcj.add
index d1a5e6b9c2..1f32281e6f 100644
--- a/scripts/gcc3newlib/target-gcj.add
+++ b/scripts/gcc3newlib/target-gcj.add
@@ -5,7 +5,7 @@
%package -n %{rpmprefix}%{gcc_target}-gcj
Summary: gcc/java compiler (gcj) for %{gcc_target}
Group: %{rpmgroup}
-Requires: %{rpmprefix}rtems-base-gcj %{rpmprefix}%{gcc_target}-gcc
+Requires: %{rpmprefix}rtems@osversion@-base-gcj %{rpmprefix}%{gcc_target}-gcc
%description -n %{rpmprefix}%{gcc_target}-gcj
RTEMS is an open source operating system for embedded systems.
diff --git a/scripts/gcc3newlib/target-gnat.add b/scripts/gcc3newlib/target-gnat.add
index 6e9d1166a0..ccd1670b09 100644
--- a/scripts/gcc3newlib/target-gnat.add
+++ b/scripts/gcc3newlib/target-gnat.add
@@ -5,7 +5,7 @@
%package -n %{rpmprefix}%{gcc_target}-gnat
Summary: gcc/gnat compiler for %{gcc_target}
Group: %{rpmgroup}
-Requires: %{rpmprefix}rtems-base-gnat %{rpmprefix}%{gcc_target}-gcc
+Requires: %{rpmprefix}rtems@osversion@-base-gnat %{rpmprefix}%{gcc_target}-gcc
%description -n %{rpmprefix}%{gcc_target}-gnat
RTEMS is an open source operating system for embedded systems.
diff --git a/scripts/gccnewlib/gccnewlib.add b/scripts/gccnewlib/gccnewlib.add
index 6921882ac2..9959b3222c 100644
--- a/scripts/gccnewlib/gccnewlib.add
+++ b/scripts/gccnewlib/gccnewlib.add
@@ -47,7 +47,7 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
%prep
# untar the sources inside @target_alias@-gcc-newlib
-%setup -c -n %{name} -a 0 -a 1
+%setup -c -n %{name}-%{version} -a 0 -a 1
%patch0 -p0
%patch1 -p0
diff --git a/scripts/gdb/Makefile.am b/scripts/gdb/Makefile.am
index f4d60a92ca..da59ed4d4b 100644
--- a/scripts/gdb/Makefile.am
+++ b/scripts/gdb/Makefile.am
@@ -23,73 +23,73 @@ MKGDBSPEC_DEPS = mkspec gdb.spec.in \
RPM_SPECS_DATA =
-arm-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache arm-rtems > $@
-RPM_SPECS_DATA += arm-rtems-$(GDBVERS).spec
+arm-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache arm-rtems@osversion@ > $@
+RPM_SPECS_DATA += arm-rtems@osversion@-$(GDBVERS).spec
# does not build with 5.2
-# c4x-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
-# $(MKSPEC) -cfg $(top_builddir)/setup.cache c4x-rtems > $@
-# RPM_SPECS_DATA += c4x-rtems-$(GDBVERS).spec
+# c4x-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+# $(MKSPEC) -cfg $(top_builddir)/setup.cache c4x-rtems@osversion@ > $@
+# RPM_SPECS_DATA += c4x-rtems@osversion@-$(GDBVERS).spec
-h8300-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache h8300-rtems > $@
-RPM_SPECS_DATA += h8300-rtems-$(GDBVERS).spec
+h8300-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache h8300-rtems@osversion@ > $@
+RPM_SPECS_DATA += h8300-rtems@osversion@-$(GDBVERS).spec
# does not build with 5.2
-# hppa1.1-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
-# $(MKSPEC) -cfg $(top_builddir)/setup.cache hppa1.1-rtems > $@
-# RPM_SPECS_DATA += hppa1.1-rtems-$(GDBVERS).spec
+# hppa1.1-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+# $(MKSPEC) -cfg $(top_builddir)/setup.cache hppa1.1-rtems@osversion@ > $@
+# RPM_SPECS_DATA += hppa1.1-rtems@osversion@-$(GDBVERS).spec
-RPM_SPECS_DATA += i386-rtems-$(GDBVERS).spec
-i386-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache i386-rtems > $@
+RPM_SPECS_DATA += i386-rtems@osversion@-$(GDBVERS).spec
+i386-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache i386-rtems@osversion@ > $@
# does not build with 5.2
# i386-RTEMS-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
# $(MKSPEC) -cfg $(top_builddir)/setup.cache i386-RTEMS > $@
# RPM_SPECS_DATA += i386-RTEMS-$(GDBVERS).spec
-i960-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache i960-rtems > $@
-RPM_SPECS_DATA += i960-rtems-$(GDBVERS).spec
+i960-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache i960-rtems@osversion@ > $@
+RPM_SPECS_DATA += i960-rtems@osversion@-$(GDBVERS).spec
-m68k-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache m68k-rtems > $@
-RPM_SPECS_DATA += m68k-rtems-$(GDBVERS).spec
+m68k-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache m68k-rtems@osversion@ > $@
+RPM_SPECS_DATA += m68k-rtems@osversion@-$(GDBVERS).spec
-mips64orion-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache mips64orion-rtems > $@
-RPM_SPECS_DATA += mips64orion-rtems-$(GDBVERS).spec
+mips64orion-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache mips64orion-rtems@osversion@ > $@
+RPM_SPECS_DATA += mips64orion-rtems@osversion@-$(GDBVERS).spec
-mips-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache mips-rtems > $@
-RPM_SPECS_DATA += mips-rtems-$(GDBVERS).spec
+mips-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache mips-rtems@osversion@ > $@
+RPM_SPECS_DATA += mips-rtems@osversion@-$(GDBVERS).spec
-mipstx39-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache mipstx39-rtems > $@
-RPM_SPECS_DATA += mipstx39-rtems-$(GDBVERS).spec
+mipstx39-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache mipstx39-rtems@osversion@ > $@
+RPM_SPECS_DATA += mipstx39-rtems@osversion@-$(GDBVERS).spec
# does not build with 5.2
# powerpc-RTEMS-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
# $(MKSPEC) -cfg $(top_builddir)/setup.cache powerpc-RTEMS > $@
# RPM_SPECS_DATA += powerpc-RTEMS-$(GDBVERS).spec
-powerpc-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache powerpc-rtems > $@
-RPM_SPECS_DATA += powerpc-rtems-$(GDBVERS).spec
+powerpc-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache powerpc-rtems@osversion@ > $@
+RPM_SPECS_DATA += powerpc-rtems@osversion@-$(GDBVERS).spec
-sh-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtems > $@
-RPM_SPECS_DATA += sh-rtems-$(GDBVERS).spec
+sh-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtems@osversion@ > $@
+RPM_SPECS_DATA += sh-rtems@osversion@-$(GDBVERS).spec
-sh-rtemself-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtemself > $@
-RPM_SPECS_DATA += sh-rtemself-$(GDBVERS).spec
+sh-rtemself@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtemself@osversion@ > $@
+RPM_SPECS_DATA += sh-rtemself@osversion@-$(GDBVERS).spec
-sparc-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKSPEC) -cfg $(top_builddir)/setup.cache sparc-rtems > $@
-RPM_SPECS_DATA += sparc-rtems-$(GDBVERS).spec
+sparc-rtems@osversion@-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sparc-rtems@osversion@ > $@
+RPM_SPECS_DATA += sparc-rtems@osversion@-$(GDBVERS).spec
CLEANFILES += $(RPM_SPECS_DATA)
diff --git a/scripts/gdb/base-gdb.add b/scripts/gdb/base-gdb.add
index 5698484788..d98040486f 100644
--- a/scripts/gdb/base-gdb.add
+++ b/scripts/gdb/base-gdb.add
@@ -2,30 +2,29 @@
# rtems-base-gdb
# =====================================================================
-%package -n rtems-base-gdb
-Provides: rtems-base-gdb
+%package -n %{rpmprefix}rtems@osversion@-base-gdb
Summary: base package for rtems gdb
-Group: rtems
+Group: %{rpmgroup}
-%description -n rtems-base-gdb
+%description -n %{rpmprefix}rtems@osversion@-base-gdb
RTEMS is an open source operating system for embedded systems.
This is the base for gdb regardless of target CPU.
-%files -n rtems-base-gdb
+%files -n %{rpmprefix}rtems@osversion@-base-gdb
%defattr(-,root,root)
%dir %{_prefix}/info
%doc %{_prefix}/info/gdb.info*
%doc %{_prefix}/info/mmalloc.info*
# FIXME: When had gdbint and stabs been introduced?
-%if "@gdb_version@" >= "5.0"
+%if "%{gdb_version}" >= "5.0"
%doc %{_prefix}/info/gdbint.info*
%doc %{_prefix}/info/stabs.info*
%endif
# gdb 4.18 installed this, gdb 5.0 does not
-%if "@gdb_version@" < "5.0"
+%if "%{gdb_version}" < "5.0"
%doc %{_prefix}/info/readline.info*
%endif
@@ -43,7 +42,7 @@ This is the base for gdb regardless of target CPU.
# We use libiberty from gcc
# %{_prefix}/lib/libiberty*
-%post -n rtems-base-gdb
+%post -n %{rpmprefix}rtems@osversion@-base-gdb
if test -d $RPM_INSTALL_PREFIX/rtems/info;
then
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
@@ -53,7 +52,7 @@ This is the base for gdb regardless of target CPU.
done
fi
-%postun -n rtems-base-gdb
+%postun -n %{rpmprefix}rtems@osversion@-base-gdb
if test -d $RPM_INSTALL_PREFIX/rtems/info;
then
rm -f $RPM_INSTALL_PREFIX/rtems/info/dir
diff --git a/scripts/gdb/gdb.add b/scripts/gdb/gdb.add
index b939352fff..316cd29b92 100644
--- a/scripts/gdb/gdb.add
+++ b/scripts/gdb/gdb.add
@@ -1,17 +1,21 @@
-Name: @target_alias@-gdb-collection
+
+%define gdb_version @gdb_version@
+%define gdb_target @target_alias@
+
+Name: %{rpmprefix}%{gdb_target}-gdb-collection
Release: @Release@
License: GPL/LGPL
-Group: rtems
+Group: %{rpmgroup}
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
-Version: @gdb_version@
-Summary: gdb for target @target_alias@
-Source0: ftp://ftp.gnu.org/pub/gnu/gdb-@gdb_version@.tar.gz
-Patch0: gdb-@gdb_version@-rtems-base-@gdb_patch_version@.diff
-Patch1: gdb-@gdb_version@-rtems-cg-@gdb_patch_version@.diff
-Patch2: gdb-@gdb_version@-rtems-rdbg-@gdb_patch_version@.diff
+Version: %{gdb_version}
+Summary: gdb for target %{gdb_version}
+Source0: ftp://ftp.gnu.org/pub/gnu/gdb-%{gdb_version}.tar.gz
+Patch0: gdb-%{gdb_version}-rtems-base-@gdb_patch_version@.diff
+Patch1: gdb-%{gdb_version}-rtems-cg-@gdb_patch_version@.diff
+Patch2: gdb-%{gdb_version}-rtems-rdbg-@gdb_patch_version@.diff
%if "%{_vendor}" == "redhat"
BuildPreReq: ncurses-devel
@@ -34,10 +38,10 @@ NoSource: 0
# and targets which require extra arguments.
%define _sim 1
-%if "@target_alias@" == "m68k-rtems"
+%if "%{gdb_target}" == "m68k-rtems@osversion@"
%define _sim 0
%endif
-%if "@target_alias@" == "i386-rtems"
+%if "%{gdb_target}" == "i386-rtems@osversion@"
%define _sim 0
%endif
@@ -45,13 +49,12 @@ NoSource: 0
%description
RTEMS is an open source operating system for embedded systems.
-This is the GNU gdb for RTEMS targetting @target_alias@.
+This is the GNU gdb for RTEMS targetting %{gdb_version}.
%prep
-# untar the sources inside @target_alias@-gdb
-%setup -c -n @target_alias@-gdb -a 0
+%setup -c -n %{name}-%{version} -a 0
-cd gdb-@gdb_version@
+cd gdb-%{gdb_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
@@ -61,7 +64,7 @@ cd gdb-@gdb_version@
simargs="--enable-sim"
%endif
-%if "@target_alias@" == "powerpc-rtems"
+%if "%{gdb_target}" == "powerpc-rtems@osversion@"
simargs="$simargs --enable-sim-timebase --enable-sim-hardware"
# Enabling this causes the program image to be huge and causes
# some gcc/hosts combinations to run out of memory.
@@ -70,9 +73,10 @@ cd gdb-@gdb_version@
test -d build || mkdir build
cd build
- ../gdb-@gdb_version@/configure \
+ export PATH="%{_bindir}:${PATH}"
+ ../gdb-%{gdb_version}/configure \
--build=%_build --host=%_host \
- --target=@target_alias@ \
+ --target=%{gdb_target} \
--verbose --prefix=%{_prefix} $simargs \
--disable-nls
diff --git a/scripts/gdb/mkspec.in b/scripts/gdb/mkspec.in
index 12e20928fa..39cfa6df0f 100644
--- a/scripts/gdb/mkspec.in
+++ b/scripts/gdb/mkspec.in
@@ -52,6 +52,9 @@ sed -e "s%@Release\@%${gdb_rpm_release}%g" \
-e "s,@rpm_build_root\@,${rpm_build_root},g" \
-e "s%@prefix\@%@prefix@%g" \
-e "s%@target_alias\@%${target_alias}%g" \
+ -e "s,@rpmprefix\@,@rpmprefix@,g" \
+ -e "s%@rpmgroup\@%@rpmgroup@%g" \
+ -e "s%@osversion\@%@osversion@%g" \
-e "s%@gdb_version\@%${gdb_version}%g" \
-e "s%@gdb_patch_version\@%${gdb_patch_version}%g" \
-e "s%@extra_configure_arguments\@%${extra_configure_arguments}%g" \
diff --git a/scripts/gdb/target-gdb.add b/scripts/gdb/target-gdb.add
index 76b3724634..eff9807ea0 100644
--- a/scripts/gdb/target-gdb.add
+++ b/scripts/gdb/target-gdb.add
@@ -1,31 +1,30 @@
# =====================================================================
-# @target_alias@-gdb
+# %{gdb_target}-gdb
# =====================================================================
-%package -n @target_alias@-gdb
-Provides: @target_alias@-gdb
-Summary: rtems gdb for @target_alias@
-Group: rtems
-Requires: rtems-base-gdb
+%package -n %{rpmprefix}%{gdb_target}-gdb
+Summary: rtems gdb for %{gdb_target}
+Group: %{rpmgroup}
+Requires: %{rpmprefix}rtems@osversion@-base-gdb
-%description -n @target_alias@-gdb
+%description -n %{rpmprefix}%{gdb_target}-gdb
RTEMS is an open source operating system for embedded systems.
-This is the GNU gdb for RTEMS targetting @target_alias@.
+This is the GNU gdb for RTEMS targetting %{gdb_target}.
-%files -n @target_alias@-gdb
-%defattr(-,attr,attr)
-%doc %{_prefix}/man/man1/@target_alias@-gdb.1*
+%files -n %{rpmprefix}%{gdb_target}-gdb
+%defattr(-,root,root)
+%doc %{_prefix}/man/man1/%{gdb_target}-gdb.1*
%if "%_sim" == "1"
-%doc %{_prefix}/man/man1/@target_alias@-run.1*
+%doc %{_prefix}/man/man1/%{gdb_target}-run.1*
%endif
%dir %{_prefix}/bin
-%{_prefix}/bin/@target_alias@-gdb%{_exeext}
+%{_prefix}/bin/%{gdb_target}-gdb%{_exeext}
%if "%_sim" == "1"
-%{_prefix}/bin/@target_alias@-run%{_exeext}
+%{_prefix}/bin/%{gdb_target}-run%{_exeext}
%endif
-%if "@target_alias@" == "sparc-rtems"
-%{_prefix}/bin/@target_alias@-sis%{_exeext}
+%if "%{gdb_target}" == "sparc-rtems@osversion@"
+%{_prefix}/bin/%{gdb_target}-sis%{_exeext}
%endif