summaryrefslogtreecommitdiffstats
path: root/scripts/gcc3newlib/gccnewlib.add
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2003-09-02 16:41:50 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2003-09-02 16:41:50 +0000
commit087a6c86f55b8ddbd6a5bc1961e28a044225475f (patch)
tree5c71ad71a2d40b73f01790d14c082780c9418b3e /scripts/gcc3newlib/gccnewlib.add
parent2003-08-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-087a6c86f55b8ddbd6a5bc1961e28a044225475f.tar.bz2
2003-09-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am, configure.ac, autotools/autoconf-rtems.spec.in, autotools/automake-rtems.spec.in, binutils/Makefile.am, binutils/base-binutils.add, binutils/binutils.add, binutils/mkspec.in, binutils/target-binutils.add, common/common.add.in, cpukit/Makefile.am, gcc3newlib/Makefile.am, gcc3newlib/base-g77.add, gcc3newlib/base-gcc.add, gcc3newlib/base-gcj.add, gcc3newlib/base-gnat.add, gcc3newlib/gccnewlib.add, gcc3newlib/mkspec.in, gcc3newlib/target-c++.add, gcc3newlib/target-g77.add, gcc3newlib/target-gcc.add, gcc3newlib/target-gcj.add, gcc3newlib/target-gnat.add, gcc3newlib/target-objc.add, gccnewlib/Makefile.am, gdb/Makefile.am, rtems/Makefile.am, rtemsdoc/Makefile.am: Merger from rtems-4-6-branch. * common/common.am: New.
Diffstat (limited to 'scripts/gcc3newlib/gccnewlib.add')
-rw-r--r--scripts/gcc3newlib/gccnewlib.add39
1 files changed, 30 insertions, 9 deletions
diff --git a/scripts/gcc3newlib/gccnewlib.add b/scripts/gcc3newlib/gccnewlib.add
index fc806527d0..66a77139ba 100644
--- a/scripts/gcc3newlib/gccnewlib.add
+++ b/scripts/gcc3newlib/gccnewlib.add
@@ -4,9 +4,9 @@
%define gcc_target @target_alias@
-Name: %{gcc_target}-gcc-newlib
+Name: %{rpmprefix}%{gcc_target}-gcc-newlib
Summary: gcc and newlib C Library for %{gcc_target}.
-Group: rtems
+Group: %{rpmgroup}
Release: @Release@
License: gcc is GPL/LGPL ; newlib no has restrictions on run-time usage
@@ -14,16 +14,20 @@ Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
Version: gcc%{gcc_version}newlib%{newlib_version}
-# gcc 3.x and gcc 2.9
-# Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}.tar.gz
-Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}.tar.bz2
-# gcc 2.95.x
-# Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}.tar.bz2
+%if "%{gcc_version}" >= "3.2.2"
+Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.bz2
+%else
+%if "%{gcc_version}" >= "3.0"
+Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}.tar.gz
+%else
+Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}-everything.tar.gz
+%endif
+%endif
Source1: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_version}.tar.gz
@PATCH1@
@PATCH3@
BuildPreReq: texinfo >= 4.2
-BuildPreReq: %{gcc_target}-binutils
+BuildPreReq: %{rpmprefix}%{gcc_target}-binutils
#
# The original sources are not included in the source RPM.
# If we included them, then the source RPMs for each target
@@ -57,7 +61,7 @@ NoSource: 1
%define _gcj %{?gcj:%gcj}%{!?gcj:1}
%else
# default to not building gcj
-%define _gcj %{?gnat:%gcj}%{!?gcj:0}
+%define _gcj %{?gcj:%gcj}%{!?gcj:0}
%endif
@@ -177,6 +181,8 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
%if %build_gnat
languages="$languages,ada"
%endif
+
+ export PATH="%{_bindir}:${PATH}"
../gcc-%{gcc_version}/configure \
--build=%_build --host=%_host \
--target=%{gcc_target} \
@@ -193,6 +199,12 @@ 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
+
%if %build_gnat
cd ../gcc-%{gcc_version}/gcc/ada
touch treeprs.ads [es]info.h nmake.ad[bs]
@@ -226,6 +238,7 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
make info
%install
+ export PATH="%{_bindir}:${PATH}"
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 %{gcc_target}/bin/gcc
@@ -265,6 +278,14 @@ 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"