summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2003-01-29 14:06:02 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2003-01-29 14:06:02 +0000
commitc86d8e7f37286f5d6a5ae3fe7a8fd57eeab36017 (patch)
tree4dbfc276f70c7d612ea4301016b86959ad3ff633
parentb36cca289ba7c61a0caa993c379378f5d10fb250 (diff)
downloadrtems-c86d8e7f37286f5d6a5ae3fe7a8fd57eeab36017.tar.bz2
2003-01-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* ChangeLog: Fix yesterday's entry. * gdb/target-gdb.add: %defattr(-,root,root). Use %{_prefix} instead of /opt/rtems. Misc. minor changes. * gdb/gdb.add: Use %{_prefix} instead of /opt/rtems. Remove stray unpackaged files. Use %{_defaultbuildroot} instead of hard-coded values. configure --disable-nls. Misc. minor changes. Add BuildPreReq: ncurses-devel. * gdb/base-gdb.add: %defattr(-,root,root). Use %{_prefix} instead of /opt/rtems. Misc. minor changes. * gdb/mkspec.in: New. * gdb/Makefile.am: Reflect addition of gdb/mkspec.in. * gcc3newlib/mkspec.in: Fix usage. * gcc3newlib/gccnewlib.add: Use %{_defaultbuildroot} instead of hard-coded values. Update copyright notice. * mkgdbspec.in: Removed. * Makefile.am: Remove mkgdbspec. * configure.ac: Remove mkgdbspec. Add gdb/mkspec.
-rw-r--r--scripts/ChangeLog47
-rw-r--r--scripts/Makefile.am2
-rw-r--r--scripts/configure.ac2
-rw-r--r--scripts/gcc3newlib/gccnewlib.add7
-rw-r--r--scripts/gcc3newlib/mkspec.in4
-rw-r--r--scripts/gdb/Makefile.am39
-rw-r--r--scripts/gdb/base-gdb.add32
-rw-r--r--scripts/gdb/gdb.add34
-rw-r--r--scripts/gdb/mkspec.in (renamed from scripts/mkgdbspec.in)33
-rw-r--r--scripts/gdb/target-gdb.add12
10 files changed, 126 insertions, 86 deletions
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index 0689b704e4..4a9770dbf3 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,17 +1,42 @@
+2003-01-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * ChangeLog: Fix yesterday's entry.
+ * gdb/target-gdb.add: %defattr(-,root,root).
+ Use %{_prefix} instead of /opt/rtems.
+ Misc. minor changes.
+ * gdb/gdb.add: Use %{_prefix} instead of /opt/rtems.
+ Remove stray unpackaged files.
+ Use %{_defaultbuildroot} instead of hard-coded values.
+ configure --disable-nls.
+ Misc. minor changes.
+ Add BuildPreReq: ncurses-devel.
+ * gdb/base-gdb.add: %defattr(-,root,root).
+ Use %{_prefix} instead of /opt/rtems.
+ Misc. minor changes.
+ * gdb/mkspec.in: New.
+ * gdb/Makefile.am: Reflect addition of gdb/mkspec.in.
+ * gcc3newlib/mkspec.in: Fix usage.
+ * gcc3newlib/gccnewlib.add: Use %{_defaultbuildroot} instead of
+ hard-coded values. Update copyright notice.
+ * mkgdbspec.in: Removed.
+ * Makefile.am: Remove mkgdbspec.
+ * configure.ac: Remove mkgdbspec.
+ Add gdb/mkspec.
+
2003-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
- * gccnewlib.add: Add various BuildPreReq.
+ * gcc3newlib/gccnewlib.add: Add various BuildPreReq.
Add %defattr(-,root,root) to "dir".
- * base-g77.add: %defattr(-,root,root).
- * base-gcc.add %defattr(-,root,root).
- * base-gcj.add %defattr(-,root,root).
- * base-gnat.add %defattr(-,root,root).
- * target-c++.add %defattr(-,root,root).
- * target-g77.add %defattr(-,root,root).
- * target-gcc.add %defattr(-,root,root).
- * target-gcj.add %defattr(-,root,root).
- * target-gnat.add %defattr(-,root,root).
- * target-objc.add %defattr(-,root,root).
+ * gcc3newlib/base-g77.add: %defattr(-,root,root).
+ * gcc3newlib/base-gcc.add %defattr(-,root,root).
+ * gcc3newlib/base-gcj.add %defattr(-,root,root).
+ * gcc3newlib/base-gnat.add %defattr(-,root,root).
+ * gcc3newlib/target-c++.add %defattr(-,root,root).
+ * gcc3newlib/target-g77.add %defattr(-,root,root).
+ * gcc3newlib/target-gcc.add %defattr(-,root,root).
+ * gcc3newlib/target-gcj.add %defattr(-,root,root).
+ * gcc3newlib/target-gnat.add %defattr(-,root,root).
+ * gcc3newlib/target-objc.add %defattr(-,root,root).
2003-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index cbd273d02e..8052b01e22 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -8,7 +8,7 @@ SUBDIRS = . binutils gccnewlib gcc3newlib gdb rtems autotools cpukit
SUBDIRS += rtemsdoc
noinst_SCRIPTS = setup buildall buildalltar mkbinutilspec mkbspspec \
- mkgccnewlibspec mkgdbspec mkrpms mkspec
+ mkgccnewlibspec mkrpms mkspec
TEMPLATES =
diff --git a/scripts/configure.ac b/scripts/configure.ac
index fcb477e2b2..0842d054e6 100644
--- a/scripts/configure.ac
+++ b/scripts/configure.ac
@@ -92,7 +92,7 @@ rtemsdoc/Makefile
AC_CONFIG_FILES([buildalltar],[chmod +x buildalltar])
AC_CONFIG_FILES([buildall],[chmod +x buildall])
-AC_CONFIG_FILES([mkgdbspec],[chmod +x mkgdbspec])
+AC_CONFIG_FILES([gdb/mkspec],[chmod +x gdb/mkspec])
AC_CONFIG_FILES([mkbinutilspec],[chmod +x mkbinutilspec])
AC_CONFIG_FILES([mkgccnewlibspec],[chmod +x mkgccnewlibspec])
AC_CONFIG_FILES([mkbspspec],[chmod +x mkbspspec])
diff --git a/scripts/gcc3newlib/gccnewlib.add b/scripts/gcc3newlib/gccnewlib.add
index b966956231..0116502ca2 100644
--- a/scripts/gcc3newlib/gccnewlib.add
+++ b/scripts/gcc3newlib/gccnewlib.add
@@ -1,12 +1,13 @@
#
# spec file for building gcc for rtems
#
-# Copyright (c) 1999,2000,2001 OARCorp, Huntsville, AL
+# Copyright (c) 1999,2000,2001,2002,2003 OARCorp, Huntsville, AL
#
# please send bugfixes or comments to joel@OARcorp.com
#
%define _prefix @prefix@
+%define _defaultbuildroot %{_tmppath}/%{name}-%{version}
Vendor: OAR Corporation
Distribution: Linux
@@ -28,7 +29,7 @@ Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.gz
Source1: ftp://sources.redhat.com/pub/newlib/newlib-@newlib_version@.tar.gz
@PATCH1@
@PATCH3@
-Buildroot: %{_tmppath}/%{name}
+Buildroot: %{_defaultbuildroot}
BuildPreReq: texinfo >= 4.2
BuildPreReq: @target_alias@-binutils
#
@@ -330,5 +331,5 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
%clean
# let rpm --clean remove BuildRoot iif using the default BuildRoot
- test "$RPM_BUILD_ROOT" = "%{_tmppath}/%{name}" && \
+ test "$RPM_BUILD_ROOT" = "%{_defaultbuildroot}" && \
rm -rf $RPM_BUILD_ROOT
diff --git a/scripts/gcc3newlib/mkspec.in b/scripts/gcc3newlib/mkspec.in
index ffe0591b39..07615c7fa2 100644
--- a/scripts/gcc3newlib/mkspec.in
+++ b/scripts/gcc3newlib/mkspec.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Usage: mktoolspec CPU
+# Usage: mkspec CPU
#
RTEMS_DIR=`dirname $0`/@top_srcdir@
@@ -13,7 +13,7 @@ usage()
echo "$0 [options] <target_alias>"
echo " options:"
echo " -cfg <setup.cache>"
- echo " -o <rpm-spec-dir>"
+ echo " -a <alternate specs.in>"
exit 1 ;
}
diff --git a/scripts/gdb/Makefile.am b/scripts/gdb/Makefile.am
index d3c35b7e7a..7ab0826f5c 100644
--- a/scripts/gdb/Makefile.am
+++ b/scripts/gdb/Makefile.am
@@ -2,65 +2,66 @@
## $Id$
##
-
-MKGDBSPEC = $(SHELL) $(top_builddir)/mkgdbspec
+MKSPEC = $(SHELL) ./mkspec
SUBPACKAGES = gdb.add base-gdb.add target-gdb.add
+noinst_DATA = gdb.spec.in
+
gdb.spec.in: $(SUBPACKAGES)
cat $^ > $@
CLEANFILES = gdb.spec.in
-MKGDBSPEC_DEPS = $(top_builddir)/mkgdbspec gdb.spec.in \
+MKGDBSPEC_DEPS = $(top_builddir)/mkspec gdb.spec.in \
$(top_builddir)/setup.cache
arm-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . arm-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache arm-rtems > $@
c4x-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . c4x-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache c4x-rtems > $@
h8300-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . h8300-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache h8300-rtems > $@
hppa1.1-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . hppa1.1-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache hppa1.1-rtems > $@
i386-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . i386-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache i386-rtems > $@
i386-RTEMS-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . i386-RTEMS
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache i386-RTEMS > $@
i960-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . i960-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache i960-rtems > $@
m68k-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache m68k-rtems > $@
mips64orion-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . mips64orion-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache mips64orion-rtems > $@
mips-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . mips-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache mips-rtems > $@
mipstx39-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . mipstx39-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache mipstx39-rtems > $@
powerpc-RTEMS-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . powerpc-RTEMS
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache powerpc-RTEMS > $@
powerpc-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . powerpc-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache powerpc-rtems > $@
sh-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtems > $@
sh-rtemself-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . sh-rtemself
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sh-rtemself > $@
sparc-rtems-$(GDBVERS).spec: $(MKGDBSPEC_DEPS)
- $(MKGDBSPEC) -cfg $(top_builddir)/setup.cache -o . sparc-rtems
+ $(MKSPEC) -cfg $(top_builddir)/setup.cache sparc-rtems > $@
RPM_SPECS_DATA = \
arm-rtems-$(GDBVERS).spec c4x-rtems-$(GDBVERS).spec \
diff --git a/scripts/gdb/base-gdb.add b/scripts/gdb/base-gdb.add
index 0c26569bbe..5698484788 100644
--- a/scripts/gdb/base-gdb.add
+++ b/scripts/gdb/base-gdb.add
@@ -14,26 +14,34 @@ 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
+%defattr(-,root,root)
-%dir /opt/rtems/info
-%doc /opt/rtems/info/gdb.info*
-%doc /opt/rtems/info/mmalloc.info*
+%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"
+%doc %{_prefix}/info/gdbint.info*
+%doc %{_prefix}/info/stabs.info*
+%endif
# gdb 4.18 installed this, gdb 5.0 does not
-# %doc /opt/rtems/info/readline.info*
+%if "@gdb_version@" < "5.0"
+%doc %{_prefix}/info/readline.info*
+%endif
-%dir /opt/rtems/man
-%dir /opt/rtems/man/man1
+%dir %{_prefix}/man
+%dir %{_prefix}/man/man1
-%dir /opt/rtems/include
+%dir %{_prefix}/include
# We install libbfd from binutils
-# /opt/rtems/include/bfd.h
-# /opt/rtems/include/bfdlink.h
+# %{_prefix}/include/bfd.h
+# %{_prefix}/include/bfdlink.h
-%dir /opt/rtems/lib
+%dir %{_prefix}/lib
# We install libbfd from binutils
-# /opt/rtems/lib/libbfd*
+# %{_prefix}/lib/libbfd*
# We use libiberty from gcc
-# /opt/rtems/lib/libiberty*
+# %{_prefix}/lib/libiberty*
%post -n rtems-base-gdb
if test -d $RPM_INSTALL_PREFIX/rtems/info;
diff --git a/scripts/gdb/gdb.add b/scripts/gdb/gdb.add
index 55f0143a93..3e2ef9ec40 100644
--- a/scripts/gdb/gdb.add
+++ b/scripts/gdb/gdb.add
@@ -6,7 +6,8 @@
# please send bugfixes or comments to joel@OARcorp.com
#
-# neededforbuild -- nothing
+%define _prefix @prefix@
+%define _defaultbuildroot %{_tmppath}/%{name}-%{version}
Vendor: OAR Corporation
Distribution: Linux
@@ -24,7 +25,11 @@ 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
-Buildroot: /tmp/@target_alias@-gdb
+Buildroot: %{_defaultbuildroot}
+
+%if "%{_vendor}" == "redhat"
+BuildPreReq: ncurses-devel
+%endif
#
# The original sources are not included in the source RPM.
@@ -46,7 +51,6 @@ RTEMS is an open source operating system for embedded systems.
This is the GNU gdb for RTEMS targetting @target_alias@.
%prep
-echo RPM_BUILD_ROOT=${RPM_BUILD_ROOT}
# untar the sources inside @target_alias@-gdb
%setup -c -n @target_alias@-gdb -a 0
@@ -59,22 +63,32 @@ cd gdb-@gdb_version@
test -d build || mkdir build
cd build
../gdb-@gdb_version@/configure --target=@target_alias@ \
- --verbose --prefix=/opt/rtems @extra_configure_arguments@
+ --verbose --prefix=%{_prefix} @extra_configure_arguments@ \
+ --disable-nls
make all
make info
%install
cd build
- make prefix=$RPM_BUILD_ROOT/opt/rtems install
- make prefix=$RPM_BUILD_ROOT/opt/rtems install-info
+ make prefix=$RPM_BUILD_ROOT%{_prefix} install
+ make prefix=$RPM_BUILD_ROOT%{_prefix} install-info
+
+ # host files
+ rm -rf $RPM_BUILD_ROOT%{_prefix}/include/*.h
+ rm -rf $RPM_BUILD_ROOT%{_prefix}/lib/lib*a
+ # These come from other packages
+ rm -rf $RPM_BUILD_ROOT%{_prefix}/info/bfd*
+ rm -rf $RPM_BUILD_ROOT%{_prefix}/info/configure*
+ rm -rf $RPM_BUILD_ROOT%{_prefix}/info/standards*
+
# gzip info files
- gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info 2>/dev/null
- gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-? 2>/dev/null
- gzip -f $RPM_BUILD_ROOT/opt/rtems/info/*.info-?? 2>/dev/null
+ gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null
+ gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-? 2>/dev/null
+ gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-?? 2>/dev/null
%clean
# let rpm --clean remove BuildRoot iif using the default BuildRoot
- test "$RPM_BUILD_ROOT" = "/tmp/@target_alias@-gdb" && \
+ test "$RPM_BUILD_ROOT" = "%{_defaultbuildroot}" && \
rm -rf $RPM_BUILD_ROOT
diff --git a/scripts/mkgdbspec.in b/scripts/gdb/mkspec.in
index 22aed37c1d..e3b17339ac 100644
--- a/scripts/mkgdbspec.in
+++ b/scripts/gdb/mkspec.in
@@ -1,20 +1,21 @@
#!/bin/sh
#
-# Usage: mkgdbspec CPU
+# Usage: mkspec CPU
#
RTEMS_DIR=`dirname $0`/@top_srcdir@
-CFG=setup.cache
-dst=@RPM_SPECSdir@
+CFG=../setup.cache
exe_ext=@EXEEXT@
+specsrc=${RTEMS_DIR}/gdb/gdb.spec.in
+
usage()
{
echo "$0 [options] <target_alias>"
echo " options:"
echo " -cfg <setup.cache>"
- echo " -o <rpm-spec-dir>"
+ echo " -a <alternate specs.in>"
exit 1 ;
}
@@ -25,9 +26,9 @@ case $1 in
CFG=$1
shift
;;
--o)
+-a) # alternate specs file
shift
- dst=$1
+ specsrc=$1
shift
;;
-*)
@@ -48,8 +49,6 @@ target_alias=$1
. ./$CFG
-specfile=${dst}/$target_alias-gdb-${gdb_version}.spec
-
case ${target_alias} in
arm* | d10v* | d30v* | erc32* | fr30* | h8300* | h8500* | hppa1.1* | \
i960* | m32r* | mcore* | mips* | mn10200* | mn10300* | sh* | sparc*| \
@@ -68,24 +67,10 @@ esac
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%@gdb_version\@%${gdb_version}%g" \
-e "s%@gdb_patch_version\@%${gdb_patch_version}%g" \
-e "s%@extra_configure_arguments\@%${extra_configure_arguments}%g" \
-e "s%@exe_ext\@%${exe_ext}%g" \
-< ${RTEMS_DIR}/gdb/gdb.spec.in \
-> ${specfile}
-
-case ${target_alias} in
- arm* | d10v* | d30v* | erc32* | fr30* | h8300* | h8500* | i960* | m32r* | \
- mcore* | mips* | mn10200* | mn10300* | powerpc* | sh* | v850* | w65* | z8k*)
- echo "/opt/rtems/bin/${target_alias}-run${exe_ext}"
- ;;
- sparc*)
- echo "/opt/rtems/bin/${target_alias}-run${exe_ext}"
- echo "/opt/rtems/bin/${target_alias}-sis${exe_ext}"
- ;;
- *) ;;
-esac >> ${specfile}
-
-echo Generated ${specfile}
+< ${specsrc}
diff --git a/scripts/gdb/target-gdb.add b/scripts/gdb/target-gdb.add
index 5def2d93e9..294fbd1d9e 100644
--- a/scripts/gdb/target-gdb.add
+++ b/scripts/gdb/target-gdb.add
@@ -15,7 +15,13 @@ RTEMS is an open source operating system for embedded systems.
This is the GNU gdb for RTEMS targetting @target_alias@.
%files -n @target_alias@-gdb
-%doc /opt/rtems/man/man1/@target_alias@-gdb.1
+%defattr(-,attr,attr)
+%doc %{_prefix}/man/man1/@target_alias@-gdb.1*
+%doc %{_prefix}/man/man1/@target_alias@-run.1*
-%dir /opt/rtems/bin
-/opt/rtems/bin/@target_alias@-gdb@exe_ext@
+%dir %{_prefix}/bin
+%{_prefix}/bin/@target_alias@-gdb@exe_ext@
+%{_prefix}/bin/@target_alias@-run@exe_ext@
+%if "@target_alias@" == "sparc-rtems"
+%{_prefix}/bin/@target_alias@-sis@exe_ext@
+%endif