2 changed files with 454 additions and 0 deletions
@ -0,0 +1,87 @@ |
|||||||
|
Index: config.guess
|
||||||
|
--- config.guess.orig 2011-06-06 12:34:35.000000000 +0200
|
||||||
|
+++ config.guess 2012-07-20 23:05:38.000000000 +0200
|
||||||
|
@@ -194,7 +194,7 @@
|
||||||
|
release='-gnu'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||||
|
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||||
|
Index: gcc/config/i386/sol2.h
|
||||||
|
--- gcc/config/i386/sol2.h.orig 2012-03-14 18:08:03.000000000 +0100
|
||||||
|
+++ gcc/config/i386/sol2.h 2012-07-20 23:05:38.000000000 +0200
|
||||||
|
@@ -100,6 +100,9 @@
|
||||||
|
#undef ASM_QUAD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#undef DEFAULT_PCC_STRUCT_RETURN
|
||||||
|
+#define DEFAULT_PCC_STRUCT_RETURN 1
|
||||||
|
+
|
||||||
|
/* The Solaris assembler wants a .local for non-exported aliases. */
|
||||||
|
#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \
|
||||||
|
do { \
|
||||||
|
Index: gcc/config/sol2-bi.h
|
||||||
|
--- gcc/config/sol2-bi.h.orig 2011-07-07 11:24:16.000000000 +0200
|
||||||
|
+++ gcc/config/sol2-bi.h 2012-07-21 09:31:52.000000000 +0200
|
||||||
|
@@ -75,7 +75,7 @@
|
||||||
|
%{YP,*} \
|
||||||
|
%{R*} \
|
||||||
|
%{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \
|
||||||
|
- %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}"
|
||||||
|
+ %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}} -rpath-link %R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}"
|
||||||
|
|
||||||
|
#undef LINK_ARCH64_SPEC
|
||||||
|
#ifndef USE_GLD
|
||||||
|
Index: gcc/config/sol2.h
|
||||||
|
--- gcc/config/sol2.h.orig 2012-05-07 13:07:31.000000000 +0200
|
||||||
|
+++ gcc/config/sol2.h 2012-07-20 23:17:11.000000000 +0200
|
||||||
|
@@ -177,8 +177,8 @@
|
||||||
|
"%{h*} %{v:-V} \
|
||||||
|
%{!shared:%{!static:%{rdynamic: " RDYNAMIC_SPEC "}}} \
|
||||||
|
%{static:-dn -Bstatic} \
|
||||||
|
- %{shared:-G -dy %{!mimpure-text:-z text}} \
|
||||||
|
- %{symbolic:-Bsymbolic -G -dy -z text} \
|
||||||
|
+ %{shared:-G -dy} \
|
||||||
|
+ %{symbolic:-Bsymbolic -G -dy} \
|
||||||
|
%(link_arch) \
|
||||||
|
%{Qy:} %{!Qn:-Qy}"
|
||||||
|
|
||||||
|
Index: gcc/system.h
|
||||||
|
--- gcc/system.h.orig 2012-07-10 10:26:00.000000000 +0200
|
||||||
|
+++ gcc/system.h 2012-07-20 23:05:38.000000000 +0200
|
||||||
|
@@ -455,10 +455,6 @@
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifdef HAVE_MALLOC_H
|
||||||
|
-#include <malloc.h>
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
Index: libcpp/charset.c
|
||||||
|
--- libcpp/charset.c.orig 2011-01-03 21:52:22.000000000 +0100
|
||||||
|
+++ libcpp/charset.c 2012-07-20 23:05:38.000000000 +0200
|
||||||
|
@@ -75,6 +75,7 @@
|
||||||
|
#define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1)
|
||||||
|
#define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1)
|
||||||
|
#define iconv_close(x) (void)0
|
||||||
|
+#undef ICONV_CONST
|
||||||
|
#define ICONV_CONST
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Index: libcpp/internal.h
|
||||||
|
--- libcpp/internal.h.orig 2012-05-29 11:36:29.000000000 +0200
|
||||||
|
+++ libcpp/internal.h 2012-07-20 23:05:38.000000000 +0200
|
||||||
|
@@ -29,6 +29,7 @@
|
||||||
|
#if HAVE_ICONV
|
||||||
|
#include <iconv.h>
|
||||||
|
#else
|
||||||
|
+#undef HAVE_ICONV
|
||||||
|
#define HAVE_ICONV 0
|
||||||
|
typedef int iconv_t; /* dummy */
|
||||||
|
#endif
|
||||||
@ -0,0 +1,367 @@ |
|||||||
|
## |
||||||
|
## gcc49.spec -- OpenPKG RPM Package Specification |
||||||
|
## Copyright (c) 2000-2013 OpenPKG Foundation e.V. <http://openpkg.net/> |
||||||
|
## |
||||||
|
## 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 version |
||||||
|
%define V_full 4.9 |
||||||
|
%define V_comp 49 |
||||||
|
%define V_snap 20130929 |
||||||
|
|
||||||
|
# package information |
||||||
|
Name: gcc49 |
||||||
|
Summary: GNU Compiler Collection |
||||||
|
URL: http://gcc.gnu.org/ |
||||||
|
Vendor: Free Software Foundation |
||||||
|
Packager: OpenPKG Foundation e.V. |
||||||
|
Distribution: OpenPKG Community |
||||||
|
Class: EVAL |
||||||
|
Group: Compiler |
||||||
|
License: GPL |
||||||
|
Version: %{V_full}s%{V_snap} |
||||||
|
Release: 20131006 |
||||||
|
|
||||||
|
# package options |
||||||
|
%option with_binutils yes |
||||||
|
%option with_cxx yes |
||||||
|
%option with_objc no |
||||||
|
%option with_java no |
||||||
|
%option with_fortran no |
||||||
|
%option with_optimize no |
||||||
|
%option with_profile no |
||||||
|
%option with_threads yes |
||||||
|
%option with_multilib no |
||||||
|
%option with_gcc no |
||||||
|
|
||||||
|
# list of sources |
||||||
|
Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/%{V_full}-%{V_snap}/gcc-%{V_full}-%{V_snap}.tar.bz2 |
||||||
|
Patch0: gcc49.patch |
||||||
|
|
||||||
|
# build information |
||||||
|
BuildPreReq: OpenPKG, openpkg >= 20100101, make, flex, bison, texinfo |
||||||
|
PreReq: OpenPKG, openpkg >= 20100101 |
||||||
|
%if "%{with_binutils}" == "yes" |
||||||
|
BuildPreReq: binutils >= 2.14 |
||||||
|
PreReq: binutils >= 2.14 |
||||||
|
%endif |
||||||
|
BuildPreReq: mpc, mpfr, gmp |
||||||
|
PreReq: mpc, mpfr, gmp |
||||||
|
%if "%{with_cxx}" == "yes" |
||||||
|
BuildPreReq: libiconv |
||||||
|
PreReq: libiconv |
||||||
|
%endif |
||||||
|
%if "%{with_java}" == "yes" |
||||||
|
BuildPreReq: zlib |
||||||
|
PreReq: zlib |
||||||
|
%endif |
||||||
|
%if "%{with_gcc}" == "yes" |
||||||
|
Provides: gcc = %{version}-%{release} |
||||||
|
Provides: gcc = %{version}-%{release} |
||||||
|
Provides: gcc::with_binutils = %{with_binutils} |
||||||
|
Provides: gcc::with_cxx = %{with_cxx} |
||||||
|
Provides: gcc::with_objc = %{with_objc} |
||||||
|
Provides: gcc::with_java = %{with_java} |
||||||
|
Provides: gcc::with_fortran = %{with_fortran} |
||||||
|
Provides: gcc::with_profile = %{with_profile} |
||||||
|
Provides: gcc::with_threads = %{with_threads} |
||||||
|
Provides: gcc::with_multilib = %{with_multilib} |
||||||
|
Provides: gcc::with_gcc = %{with_gcc} |
||||||
|
%endif |
||||||
|
|
||||||
|
%description |
||||||
|
The GNU Compiler Collection (GCC) provides a standard conforming and |
||||||
|
highly portable ISO C and ISO C++ compiler. |
||||||
|
|
||||||
|
%track |
||||||
|
prog gcc49 = { |
||||||
|
version = %{V_full}-%{V_snap} |
||||||
|
url = ftp://gcc.gnu.org/pub/gcc/snapshots/ |
||||||
|
regex = (%{V_full}-\d{8}) |
||||||
|
url = ftp://gcc.gnu.org/pub/gcc/snapshots/__NEWVER__/ |
||||||
|
regex = gcc-(\d+\.\d+-\d{8})\.tar\.bz2 |
||||||
|
} |
||||||
|
|
||||||
|
%prep |
||||||
|
%setup -q -n gcc-%{V_full}-%{V_snap} |
||||||
|
%patch -p0 |
||||||
|
%{l_shtool} subst -v -s \ |
||||||
|
-e 's;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g' \ |
||||||
|
gcc/configure |
||||||
|
if [ ".%{V_comp}" != . ]; then |
||||||
|
%{l_shtool} subst -v -s \ |
||||||
|
-e 's;(libdir)/gcc/;(libdir)/gcc%{V_comp}/;' \ |
||||||
|
`find . -name Makefile.in -type f -print` |
||||||
|
fi |
||||||
|
case "%{l_platform -t}" in |
||||||
|
amd64*-linux* ) |
||||||
|
%{l_shtool} subst \ |
||||||
|
-e 's/GLIBCXX_IS_NATIVE=false/GLIBCXX_IS_NATIVE=true/g' \ |
||||||
|
-e 's/test x.gcc_no_link = xyes/false/g' \ |
||||||
|
libstdc++-v3/configure |
||||||
|
;; |
||||||
|
esac |
||||||
|
%{l_shtool} subst \ |
||||||
|
-e 's;<iconv\.h>;"%{l_prefix}/include/iconv.h";' \ |
||||||
|
libstdc++-v3/include/ext/codecvt_specializations.h |
||||||
|
|
||||||
|
%build |
||||||
|
# create build sub-directory |
||||||
|
%{l_shtool} mkdir -p obj |
||||||
|
cd obj |
||||||
|
|
||||||
|
# determine ld(1) and as(1) usage |
||||||
|
l_with_gnu_ld_as="" |
||||||
|
LD=%{l_tool_locate ld ld} |
||||||
|
AS=%{l_tool_locate as as} |
||||||
|
echo $LD | grep '^/' >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-ld=$LD" |
||||||
|
echo $AS | grep '^/' >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-as=$AS" |
||||||
|
$LD --version </dev/null 2>/dev/null | grep "^GNU ld " >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-ld" |
||||||
|
$AS --version </dev/null 2>/dev/null | grep "^GNU assembler " >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as" |
||||||
|
unset LD |
||||||
|
unset AS |
||||||
|
|
||||||
|
# determine threads usage |
||||||
|
%if "%{with_threads}" == "yes" |
||||||
|
l_enable_threads="posix" |
||||||
|
%else |
||||||
|
l_enable_threads="single" |
||||||
|
%endif |
||||||
|
|
||||||
|
# determine language usage |
||||||
|
l_enable_languages="c" |
||||||
|
%if "%{with_cxx}" == "yes" |
||||||
|
l_enable_languages="${l_enable_languages},c++" |
||||||
|
%endif |
||||||
|
%if "%{with_objc}" == "yes" |
||||||
|
l_enable_languages="${l_enable_languages},objc" |
||||||
|
%endif |
||||||
|
%if "%{with_java}" == "yes" |
||||||
|
l_enable_languages="${l_enable_languages},java" |
||||||
|
%endif |
||||||
|
%if "%{with_fortran}" == "yes" |
||||||
|
l_enable_languages="${l_enable_languages},f95" |
||||||
|
%endif |
||||||
|
|
||||||
|
# disable GNU iconv usage |
||||||
|
( echo "am_cv_func_iconv=no" |
||||||
|
echo "am_cv_lib_iconv=no" |
||||||
|
) >config.cache |
||||||
|
|
||||||
|
# configure the package |
||||||
|
CC="%{l_cc}" \ |
||||||
|
CFLAGS="%{l_cflags}" \ |
||||||
|
%if "%{with_java}" == "yes" || "%{with_fortran}" == "yes" || "%{with_cxx}" == "yes" |
||||||
|
CPPFLAGS="%{l_cppflags}" \ |
||||||
|
LDFLAGS="%{l_ldflags}" \ |
||||||
|
%endif |
||||||
|
CONFIG_SHELL="%{l_bash}" \ |
||||||
|
../configure \ |
||||||
|
--with-bugurl="http://openpkg.org/" \ |
||||||
|
--with-pkgversion="%{l_openpkg_release -F "OpenPKG-%%t"}" \ |
||||||
|
--cache-file=./config.cache \ |
||||||
|
--srcdir=`pwd`/.. \ |
||||||
|
--prefix=%{l_prefix} \ |
||||||
|
--exec-prefix=%{l_prefix} \ |
||||||
|
--mandir=%{l_prefix}/man \ |
||||||
|
--infodir=%{l_prefix}/info \ |
||||||
|
--includedir=%{l_prefix}/include/gcc%{V_comp} \ |
||||||
|
--libexecdir=%{l_prefix}/libexec/gcc%{V_comp} \ |
||||||
|
--with-gxx-include-dir=%{l_prefix}/include/g++%{V_comp} \ |
||||||
|
--with-local-prefix=%{l_prefix}/lib/gcc%{V_comp} \ |
||||||
|
--enable-languages="${l_enable_languages}" \ |
||||||
|
--enable-threads="${l_enable_threads}" \ |
||||||
|
--disable-maintainer-mode \ |
||||||
|
--disable-shared \ |
||||||
|
--disable-nls \ |
||||||
|
%if "%{with_java}" == "yes" |
||||||
|
--with-system-zlib \ |
||||||
|
%endif |
||||||
|
%if "%{with_multilib}" == "yes" |
||||||
|
--enable-multilib \ |
||||||
|
%else |
||||||
|
--disable-multilib \ |
||||||
|
%endif |
||||||
|
%if "%{with_cxx}" == "yes" |
||||||
|
--with-libiconv-prefix=%{l_prefix} \ |
||||||
|
%endif |
||||||
|
--with-gmp=%{l_prefix} \ |
||||||
|
--with-mpfr=%{l_prefix} \ |
||||||
|
--with-mpc=%{l_prefix} \ |
||||||
|
${l_with_gnu_ld_as} |
||||||
|
|
||||||
|
# determine build flags |
||||||
|
l_ccisgcc=no |
||||||
|
if [ ".`(%{l_cc} -v; %{l_cc} --version) </dev/null 2>&1 | grep -i 'gcc'`" != . ]; then |
||||||
|
l_ccisgcc=yes |
||||||
|
fi |
||||||
|
l_cflags="" |
||||||
|
l_cxxflags="" |
||||||
|
l_boot_cflags="" |
||||||
|
l_libcflags="-g" |
||||||
|
l_libcxxflags="-g" |
||||||
|
# at least GNU as from GNU binutils supports -pipe always |
||||||
|
AS="%{l_tool_locate as as}" |
||||||
|
"$AS" --version </dev/null 2>/dev/null | grep "^GNU assembler " >/dev/null && { |
||||||
|
l_boot_cflags="$l_boot_cflags -pipe" |
||||||
|
l_libcxxflags="$l_libcxxflags -pipe" |
||||||
|
} |
||||||
|
%if "%{with_optimize}" == "yes" |
||||||
|
# conservatively optimize the generated program code |
||||||
|
# (also _tune_ for particular CPUs, but _without_ requiring these CPUs!) |
||||||
|
l_cflags="$l_cflags -O" |
||||||
|
l_boot_cflags="$l_boot_cflags -O2 -fomit-frame-pointer" |
||||||
|
case "%{l_platform -t}" in |
||||||
|
*i?86-* ) l_boot_cflags="$l_boot_cflags -mtune=pentium3" ;; |
||||||
|
*sun4[uv]-* ) l_boot_cflags="$l_boot_cflags -mtune=v9" ;; |
||||||
|
esac |
||||||
|
l_libcxxflags="$l_libcxxflags -O2 -fno-implicit-templates" |
||||||
|
%else |
||||||
|
# else do no optimizations at all to reduce problems to minimum in advance |
||||||
|
l_boot_cflags="$l_boot_cflags -O0" |
||||||
|
l_libcxxflags="$l_libcxxflags -O0" |
||||||
|
%endif |
||||||
|
maketarget="bootstrap2-lean" |
||||||
|
%if "%{with_profile}" == "yes" |
||||||
|
# GCC >= 3.4 supports a "profiledbootstrap" target to build an |
||||||
|
# optimized version of itself through profiling. Because this |
||||||
|
# requires a (bootstrapping) C compiler with 64-bit arithmetic, |
||||||
|
# the whole approach is currently supported only if already |
||||||
|
# building with GCC as the bootstrapping C compiler. |
||||||
|
if [ ".$l_ccisgcc" = .yes ]; then |
||||||
|
maketarget="profiledbootstrap" |
||||||
|
fi |
||||||
|
%endif |
||||||
|
case "%{l_platform -t}" in |
||||||
|
amd64-* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;; |
||||||
|
ia64-* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;; |
||||||
|
sparc64-freebsd* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;; |
||||||
|
esac |
||||||
|
%if "%{with_java}" == "yes" || "%{with_fortran}" == "yes" || "%{with_cxx}" == "yes" |
||||||
|
l_cflags="$l_cflags %{l_cppflags}" |
||||||
|
l_cxxflags="$l_cxxflags %{l_cppflags}" |
||||||
|
l_libcflags="$l_libcflags %{l_cppflags}" |
||||||
|
l_libcxxflags="$l_libcxxflags %{l_cppflags}" |
||||||
|
%endif |
||||||
|
|
||||||
|
# build the package |
||||||
|
MAKE="%{l_make} %{l_mflags}" \ |
||||||
|
%{l_make} %{l_mflags} \ |
||||||
|
MAKE="%{l_make} %{l_mflags}" \ |
||||||
|
BOOT_CFLAGS="${l_boot_cflags}" \ |
||||||
|
CFLAGS="${l_cflags}" \ |
||||||
|
CXXFLAGS="${l_cxxflags}" \ |
||||||
|
LIBCFLAGS="${l_libcflags}" \ |
||||||
|
LIBCXXFLAGS="${l_libcxxflags}" \ |
||||||
|
$maketarget |
||||||
|
|
||||||
|
%install |
||||||
|
|
||||||
|
# fetch GNU platform triple |
||||||
|
triple=`./config.guess` |
||||||
|
|
||||||
|
# perform the standard installation procedure |
||||||
|
( cd obj |
||||||
|
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
||||||
|
) || exit $? |
||||||
|
|
||||||
|
# cleanup installation tree |
||||||
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/{lib*.a,*.spec} \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/ \ |
||||||
|
>/dev/null 2>&1 || true |
||||||
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib64/{lib*.a,*.spec} \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/ \ |
||||||
|
>/dev/null 2>&1 || true |
||||||
|
dirs="" |
||||||
|
for multilib in `$RPM_BUILD_ROOT%{l_prefix}/bin/gcc --print-multi-lib`; do |
||||||
|
subdir=`echo "$multilib" | sed -e 's/;.*$//'` |
||||||
|
[ ".$subdir" = .. ] && continue |
||||||
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir/lib*.a \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/$subdir/ \ |
||||||
|
>/dev/null 2>&1 || true |
||||||
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib64/$subdir/lib*.a \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/$subdir/ \ |
||||||
|
>/dev/null 2>&1 || true |
||||||
|
dirs="$dirs $subdir" |
||||||
|
done |
||||||
|
for subdir in $dirs; do |
||||||
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir >/dev/null 2>&1 || true |
||||||
|
done |
||||||
|
mv $RPM_BUILD_ROOT%{l_prefix}/${triple}/include/* \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/include/ \ |
||||||
|
>/dev/null 2>&1 || true |
||||||
|
|
||||||
|
# strip installation tree |
||||||
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/${triple} |
||||||
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
||||||
|
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}/lib/libstdc++.a-gdb.py >/dev/null 2>&1 || true |
||||||
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib64 >/dev/null 2>&1 || true |
||||||
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc* >/dev/null 2>&1 || true |
||||||
|
%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 |
||||||
|
%endif |
||||||
|
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/gcc%{V_comp}/${triple}/[0-9]*/${prog} \ |
||||||
|
>/dev/null 2>&1 || true |
||||||
|
done |
||||||
|
|
||||||
|
# bump up installation tree |
||||||
|
ln $RPM_BUILD_ROOT%{l_prefix}/bin/gcc \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/bin/cc |
||||||
|
ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/gcc.1 \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1/cc.1 |
||||||
|
%if "%{with_cxx}" == "yes" |
||||||
|
ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/g++.1 \ |
||||||
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1/c++.1 |
||||||
|
%endif |
||||||
|
|
||||||
|
# resolve filename conflicts |
||||||
|
%if "%{with_gcc}" != "yes" && "%{V_comp}" != "" |
||||||
|
( cd $RPM_BUILD_ROOT%{l_prefix}/bin |
||||||
|
for file in *; do |
||||||
|
[ ".$file" = ".*" ] && continue |
||||||
|
mv ${file} ${file}%{V_comp} |
||||||
|
done |
||||||
|
) || exit $? |
||||||
|
( cd $RPM_BUILD_ROOT%{l_prefix}/info |
||||||
|
for file in *; do |
||||||
|
[ ".$file" = ".*" ] && continue |
||||||
|
mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\1%{V_comp}\2;'` |
||||||
|
done |
||||||
|
) || exit $? |
||||||
|
( cd $RPM_BUILD_ROOT%{l_prefix}/man/man1 |
||||||
|
for file in *; do |
||||||
|
[ ".$file" = ".*" ] && continue |
||||||
|
mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\1%{V_comp}\2;'` |
||||||
|
done |
||||||
|
) || exit $? |
||||||
|
%endif |
||||||
|
|
||||||
|
# determine installation file list |
||||||
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
||||||
|
|
||||||
|
%files -f files |
||||||
|
|
||||||
|
%clean |
||||||
|
|
||||||
Loading…
Reference in new issue