|
@@ -23,6 +23,11 @@
|
|
|
## SUCH DAMAGE.
|
|
## SUCH DAMAGE.
|
|
|
##
|
|
##
|
|
|
|
|
|
|
|
|
|
+# package version
|
|
|
|
|
+%define V_full 3.3
|
|
|
|
|
+%define V_comp %nil
|
|
|
|
|
+%define V_bounds 1.00
|
|
|
|
|
+
|
|
|
# package information
|
|
# package information
|
|
|
Name: gcc
|
|
Name: gcc
|
|
|
Summary: GNU Compiler Collection
|
|
Summary: GNU Compiler Collection
|
|
@@ -32,8 +37,8 @@ Packager: The OpenPKG Project
|
|
|
Distribution: OpenPKG [CORE]
|
|
Distribution: OpenPKG [CORE]
|
|
|
Group: Language
|
|
Group: Language
|
|
|
License: GPL
|
|
License: GPL
|
|
|
-Version: 3.2.3
|
|
|
|
|
-Release: 20030430
|
|
|
|
|
|
|
+Version: %{V_full}
|
|
|
|
|
+Release: 20030603
|
|
|
|
|
|
|
|
# package options
|
|
# package options
|
|
|
%option with_cxx yes
|
|
%option with_cxx yes
|
|
@@ -41,11 +46,12 @@ Release: 20030430
|
|
|
%option with_binutils yes
|
|
%option with_binutils yes
|
|
|
%option with_threads yes
|
|
%option with_threads yes
|
|
|
%option with_bounds no
|
|
%option with_bounds no
|
|
|
|
|
+%option with_gcc no
|
|
|
|
|
|
|
|
# list of sources
|
|
# list of sources
|
|
|
Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
|
|
Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
|
|
|
Patch0: gcc.patch
|
|
Patch0: gcc.patch
|
|
|
-Patch1: http://web.inter.nl.net/hcc/Haj.Ten.Brugge/bounds-checking-gcc-%{version}-1.01.patch.bz2
|
|
|
|
|
|
|
+Patch1: http://web.inter.nl.net/hcc/Haj.Ten.Brugge/bounds-checking-gcc-%{version}-%{V_bounds}.patch.bz2
|
|
|
|
|
|
|
|
# build information
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
Prefix: %{l_prefix}
|
|
@@ -58,6 +64,9 @@ PreReq: binutils >= 2.13
|
|
|
%endif
|
|
%endif
|
|
|
AutoReq: no
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
AutoReqProv: no
|
|
|
|
|
+%if "%{with_gcc}" == "yes"
|
|
|
|
|
+Provides: gcc = %{version}-%{release}
|
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
%description
|
|
%description
|
|
|
The GNU Compiler Collection (GCC) provides a standard conforming and
|
|
The GNU Compiler Collection (GCC) provides a standard conforming and
|
|
@@ -110,9 +119,9 @@ AutoReqProv: no
|
|
|
../configure \
|
|
../configure \
|
|
|
--prefix=%{l_prefix} \
|
|
--prefix=%{l_prefix} \
|
|
|
--exec-prefix=%{l_prefix} \
|
|
--exec-prefix=%{l_prefix} \
|
|
|
- --includedir=%{l_prefix}/include/gcc \
|
|
|
|
|
- --with-gxx-include-dir=%{l_prefix}/include/g++ \
|
|
|
|
|
- --with-local-prefix=%{l_prefix}/lib/gcc-lib \
|
|
|
|
|
|
|
+ --includedir=%{l_prefix}/include/gcc%{V_comp} \
|
|
|
|
|
+ --with-gxx-include-dir=%{l_prefix}/include/g++%{V_comp} \
|
|
|
|
|
+ --with-local-prefix=%{l_prefix}/lib/gcc%{V_comp}-lib \
|
|
|
--enable-languages="${l_enable_languages}" \
|
|
--enable-languages="${l_enable_languages}" \
|
|
|
--enable-threads="${l_enable_threads}" \
|
|
--enable-threads="${l_enable_threads}" \
|
|
|
--disable-maintainer-mode \
|
|
--disable-maintainer-mode \
|
|
@@ -120,6 +129,11 @@ AutoReqProv: no
|
|
|
--disable-nls \
|
|
--disable-nls \
|
|
|
${l_with_gnu_ld_as}
|
|
${l_with_gnu_ld_as}
|
|
|
|
|
|
|
|
|
|
+ # explicitly redirect remaining gcc-lib directories
|
|
|
|
|
+ %{l_shtool} subst -v -s \
|
|
|
|
|
+ -e "s;/gcc-lib/;/gcc%{V_comp}-lib/;" \
|
|
|
|
|
+ `find . -name Makefile -type f -print`
|
|
|
|
|
+
|
|
|
# determine build flags
|
|
# determine build flags
|
|
|
l_cflags=""
|
|
l_cflags=""
|
|
|
l_boot_cflags=""
|
|
l_boot_cflags=""
|
|
@@ -171,23 +185,23 @@ AutoReqProv: no
|
|
|
|
|
|
|
|
# cleanup installation tree
|
|
# cleanup installation tree
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.a \
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.a \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/lib/gcc-lib/${triple}/%{version}/
|
|
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/${triple}/include/* \
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/${triple}/include/* \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/lib/gcc-lib/${triple}/%{version}/include/ \
|
|
|
|
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/include/ \
|
|
|
>/dev/null 2>&1 || true
|
|
>/dev/null 2>&1 || true
|
|
|
|
|
|
|
|
# strip installation tree
|
|
# strip installation tree
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/${triple}
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/${triple}
|
|
|
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man7 >/dev/null 2>&1 || true
|
|
|
|
|
- rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la >/dev/null 2>&1 || true
|
|
|
|
|
- rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc >/dev/null 2>&1 || true
|
|
|
|
|
|
|
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man7 >/dev/null 2>&1 || true
|
|
|
|
|
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la >/dev/null 2>&1 || true
|
|
|
|
|
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc* >/dev/null 2>&1 || true
|
|
|
%if "%{with_cxx}" == "yes"
|
|
%if "%{with_cxx}" == "yes"
|
|
|
- rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-c++ >/dev/null 2>&1 || true
|
|
|
|
|
- rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-g++ >/dev/null 2>&1 || true
|
|
|
|
|
|
|
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-c++ >/dev/null 2>&1 || true
|
|
|
|
|
+ rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-g++ >/dev/null 2>&1 || true
|
|
|
%endif
|
|
%endif
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
|
for prog in cc1 cc1plus collect2 cpp; do
|
|
for prog in cc1 cc1plus collect2 cpp; do
|
|
|
- strip $RPM_BUILD_ROOT%{l_prefix}/lib/gcc-lib/${triple}/%{version}/${prog} \
|
|
|
|
|
|
|
+ strip $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/${prog} \
|
|
|
>/dev/null 2>&1 || true
|
|
>/dev/null 2>&1 || true
|
|
|
done
|
|
done
|
|
|
|
|
|
|
@@ -201,6 +215,22 @@ AutoReqProv: no
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1/c++.1
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1/c++.1
|
|
|
%endif
|
|
%endif
|
|
|
|
|
|
|
|
|
|
+ # resolve filename conflicts
|
|
|
|
|
+%if "%{with_gcc}" != "yes" && "%{V_comp}" != ""
|
|
|
|
|
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
|
|
+ for file in *; do
|
|
|
|
|
+ mv ${file} ${file}%{V_comp}
|
|
|
|
|
+ done )
|
|
|
|
|
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/info
|
|
|
|
|
+ for file in *; do
|
|
|
|
|
+ mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\1%{V_comp}\2;'`
|
|
|
|
|
+ done )
|
|
|
|
|
+ ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man1
|
|
|
|
|
+ for file in *; do
|
|
|
|
|
+ mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\1%{V_comp}\2;'`
|
|
|
|
|
+ done )
|
|
|
|
|
+%endif
|
|
|
|
|
+
|
|
|
# determine installation file list
|
|
# determine installation file list
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|
|
|