3 changed files with 211 additions and 0 deletions
@ -0,0 +1,23 @@
|
||||
--- libiberty/strerror.c.orig Sun Sep 2 13:52:50 2001 |
||||
+++ libiberty/strerror.c Sun Sep 2 13:52:24 2001 |
||||
@@ -462,7 +462,9 @@ |
||||
|
||||
#else |
||||
|
||||
+#ifndef __FreeBSD__ |
||||
extern int sys_nerr; |
||||
+#endif |
||||
extern char *sys_errlist[]; |
||||
|
||||
#endif |
||||
--- libiberty/strsignal.c.orig Sat May 16 01:42:42 1998 |
||||
+++ libiberty/strsignal.c Mon Sep 3 08:59:59 2001 |
||||
@@ -243,7 +243,7 @@ |
||||
|
||||
#else |
||||
|
||||
-#ifdef NSIG |
||||
+#if defined(NSIG) && !defined(__FreeBSD__) |
||||
static int sys_nsig = NSIG; |
||||
#else |
||||
#ifdef _NSIG |
@ -0,0 +1,20 @@
|
||||
--- gcc/configure.old Wed May 23 15:05:36 2001 |
||||
+++ gcc/configure Wed May 23 15:05:40 2001 |
||||
@@ -3092,7 +3092,7 @@ |
||||
*-*-osf[23]*) |
||||
tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h" |
||||
;; |
||||
- *-*-osf4*) |
||||
+ *-*-osf[45]*) |
||||
tm_file="${tm_file} alpha/osf.h" |
||||
# Some versions of OSF4 (specifically X4.0-9 296.7) have |
||||
# a broken tar, so we use cpio instead. |
||||
@@ -3100,7 +3100,7 @@ |
||||
;; |
||||
esac |
||||
case $machine in |
||||
- *-*-osf4.0[b-z] | *-*-osf4.[1-9]*) |
||||
+ *-*-osf4.0[b-z] | *-*-osf4.[1-9]* | *-*-osf5.* ) |
||||
target_cpu_default=MASK_SUPPORT_ARCH |
||||
;; |
||||
esac |
@ -0,0 +1,168 @@
|
||||
## |
||||
## gcc2.spec -- OpenPKG RPM Specification |
||||
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH |
||||
## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com> |
||||
## |
||||
## Permission to use, copy, modify, and distribute this software for |
||||
## any purpose with or without fee is hereby granted, provided that |
||||
## the above copyright notice and this permission notice appear in all |
||||
## copies. |
||||
## |
||||
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
||||
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
||||
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
||||
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
||||
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
||||
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||||
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
||||
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
||||
## SUCH DAMAGE. |
||||
## |
||||
|
||||
# package information |
||||
Name: gcc2 |
||||
Summary: Old GNU C/C++ Compiler |
||||
Group: Language |
||||
URL: http://gcc.gnu.org/ |
||||
Vendor: Free Software Foundation |
||||
Packager: rse@openpkg.org |
||||
Distribution: OpenPKG [EXP] |
||||
License: GPL |
||||
Version: 2.95.3 |
||||
Release: 20020123 |
||||
|
||||
# list of sources |
||||
Source0: ftp://gcc.gnu.org/pub/gcc/releases/%{version}/gcc-%{version}.tar.bz2 |
||||
Patch0: gcc-2.95.3.patch-osf |
||||
Patch1: gcc-2.95.3.patch-freebsd |
||||
|
||||
# build information |
||||
Prefix: %{l_prefix} |
||||
BuildRoot: %{l_buildroot} |
||||
BuildPreReq: OpenPKG, openpkg >= 1.0.0, make |
||||
PreReq: OpenPKG, openpkg >= 1.0.0 |
||||
AutoReq: no |
||||
AutoReqProv: no |
||||
|
||||
%description |
||||
The GNU Compiler Collection (GCC) provides C and C++ compilers. |
||||
|
||||
%prep |
||||
%setup -q -n gcc-%{version} |
||||
%patch0 -p0 |
||||
%patch1 -p0 |
||||
# fix --with-local-prefix in advance |
||||
find . -type f -print |\ |
||||
xargs %{l_rpmtool} subst -v -s "s;/gcc-lib;/gcc2-lib;g" -- |
||||
|
||||
%build |
||||
# configure the package |
||||
mkdir obj |
||||
cd obj |
||||
options="" |
||||
case "%{l_target}" in |
||||
*-linux* | *-freebsd* ) options="--with-gnu-as --with-gnu-ld" ;; |
||||
esac |
||||
CC="%{l_cc}" \ |
||||
CFLAGS="%{l_cflags}" \ |
||||
../configure \ |
||||
--prefix=%{l_prefix} \ |
||||
--exec-prefix=%{l_prefix} \ |
||||
--with-gxx-include-dir=%{l_prefix}/include/g++2 \ |
||||
--with-local-prefix=%{l_prefix}/lib/gcc2-lib \ |
||||
--enable-languages="c,c++" \ |
||||
--disable-shared \ |
||||
--disable-threads \ |
||||
$options |
||||
|
||||
# build the package |
||||
%{l_make} %{l_mflags} \ |
||||
MAKE="%{l_make} %{l_mflags}" \ |
||||
CFLAGS='-O' \ |
||||
LIBCFLAGS='-g -O2' \ |
||||
LIBCXXFLAGS='-g -O2 -fno-implicit-templates' \ |
||||
bootstrap-lean |
||||
|
||||
%install |
||||
rm -rf $RPM_BUILD_ROOT |
||||
triple=`./config.guess` |
||||
triple=`./config.sub $triple` |
||||
cd obj |
||||
|
||||
# redirect to temporary build root |
||||
%{l_rpmtool} subst -v -s \ |
||||
"s;^\\(prefix[ ]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};" \ |
||||
"s;^\\(exec_prefix[ ]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};" \ |
||||
"s;^\\(gcc_gxx_include_dir[ ]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/include/g++2;" \ |
||||
"s;^\\(gxx_include_dir[ ]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/include/g++2;" \ |
||||
"s;^\\(local_prefix[ ]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/lib/gcc2-lib;" \ |
||||
-- `find . -name Makefile -type f -print` |
||||
|
||||
# make sure the install procedure doesn't compile anything |
||||
# (or else we would have wrong paths hard-coded in the programs) |
||||
%{l_rpmtool} subst -v -s \ |
||||
's;^install-cpp:.*;install-cpp:;' \ |
||||
's;^install-common:.*;install-common: installdirs lang.install-common;' \ |
||||
's;^install-driver:.*;install-driver:;' \ |
||||
's;^install-libgcc:.*;install-libgcc: installdirs;' \ |
||||
's;^install-build:.*;install-build:;' \ |
||||
's;^install-collect2:.*;install-collect2: installdirs;' \ |
||||
's;^install-assert-h:.*;install-assert-h: installdirs;' \ |
||||
's;^\(install-.*:.*\) all *\(.*\)$;\1\2;' \ |
||||
-- gcc/Makefile gcc/*/Makefile |
||||
|
||||
# make sure the Makefiles are not re-generated |
||||
for file in `find . -name config.status -print`; do |
||||
( echo "#!/bin/sh" |
||||
echo ":" |
||||
) >$file |
||||
done |
||||
|
||||
# run the standard installation procedure |
||||
%{l_make} %{l_mflags} install |
||||
|
||||
# strip the installation |
||||
mv $RPM_BUILD_ROOT%{l_prefix}/$triple/include/* \ |
||||
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc2-lib/$triple/%{version}/include/ >/dev/null 2>&1 || true |
||||
rm -rf $RPM_BUILD_ROOT%{l_prefix}/$triple |
||||
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc |
||||
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
||||
for prog in cc1 cc1plus collect2 cpp; do |
||||
strip $RPM_BUILD_ROOT%{l_prefix}/lib/gcc2-lib/$triple/%{version}/$prog >/dev/null 2>&1 || true |
||||
done |
||||
|
||||
# rename files |
||||
( cd $RPM_BUILD_ROOT%{l_prefix}/bin |
||||
for file in *; do |
||||
mv ${file} ${file}2 |
||||
done |
||||
) |
||||
( cd $RPM_BUILD_ROOT%{l_prefix}/info |
||||
for file in *; do |
||||
mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\12\2;'` |
||||
done |
||||
) |
||||
( cd $RPM_BUILD_ROOT%{l_prefix}/man/man1 |
||||
for file in *; do |
||||
mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\12\2;'` |
||||
done |
||||
) |
||||
|
||||
# cleanup tree |
||||
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libiberty.a |
||||
rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/gcc2-lib/$triple/%{version}/libstdc++.a |
||||
mv $RPM_BUILD_ROOT%{l_prefix}/lib/libstdc++.a* \ |
||||
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc2-lib/$triple/%{version}/libstdc++.a |
||||
|
||||
# create file list |
||||
%{l_rpmtool} files -v -o$RPM_BUILD_DIR/gcc-%{version}/files -r$RPM_BUILD_ROOT %{l_files_std} |
||||
exit 0 |
||||
|
||||
%files -f files |
||||
|
||||
%clean |
||||
# rm -rf $RPM_BUILD_ROOT |
||||
|
Loading…
Reference in new issue