/[gentoo-x86]/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r1.ebuild
Gentoo

Contents of /sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Mon Jul 23 16:01:24 2012 UTC (2 years, 4 months ago) by vapier
Branch: MAIN
Changes since 1.2: +6 -7 lines
Fix building with newer glibc and siginfo changes #427220 by Martin Jansa.

(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)

1 vapier 1.3 # Copyright 1999-2012 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6-r1.ebuild,v 1.2 2011/11/05 16:57:59 vapier Exp $
4 vapier 1.1
5     inherit eutils flag-o-matic libtool multilib
6    
7     transform_known_flags() {
8     declare setting
9    
10     # and on x86, we just need to filter the 3.4 specific amd64 -marchs
11     replace-cpu-flags k8 athlon64 opteron x86-64
12    
13     # gcc 3.3 doesn't support -march=pentium-m
14     replace-cpu-flags pentium-m pentium3m pentium3
15    
16     #GCC 3.3 does not understand G3, G4, G5 on ppc
17     replace-cpu-flags G3 750
18     replace-cpu-flags G4 7400
19     replace-cpu-flags G5 7400
20     }
21    
22     is_arch_allowed() {
23     i386_processor_table="i386 i486 i586 pentium pentium-mmx winchip-c6 \
24     winchip2 c3 i686 pentiumpro pentium2 pentium3 pentium4 prescott \
25     nocona k6 k6-2 k6-3 athlon athlon-tbird x86-64 athlon-4 athlon-xp \
26     athlon-mp"
27    
28     for proc in ${i386_processor_table} ; do
29     [ "${proc}" == "${1}" ] && return 0
30     done
31    
32     mips_processor_table="mips1 mips2 mips3 mips4 mips32 mips64 r3000 r2000 \
33     r3900 r6000 r4000 vr4100 vr4111 vr4120 vr4300 r4400 r4600 orion \
34     r4650 r8000 vr5000 vr5400 vr5500 4kc 4kp 5kc 20kc sr71000 sb1"
35    
36     for proc in ${mips_processor_table} ; do
37     [ "${proc}" == "${1}" ] && return 0
38     done
39    
40     rs6000_processor_table="common power power2 power3 power4 powerpc \
41     powerpc64 rios rios1 rsc rsc1 rios2 rs64a 401 403 405 505 601 602 \
42     603 603e ec603e 604 604e 620 630 740 750 7400 7450 8540 801 821 823 \
43     860"
44    
45     for proc in ${rs6000_processor_table} ; do
46     [ "${proc}" == "${1}" ] && return 0
47     done
48    
49     return 1
50     }
51    
52     do_filter_flags() {
53     declare setting
54    
55     # In general gcc does not like optimization, and add -O2 where
56     # it is safe. This is especially true for gcc 3.3 + 3.4
57     replace-flags -O? -O2
58    
59     # gcc 3.3 doesn't support -mtune on numerous archs, so xgcc will fail
60     setting="`get-flag mtune`"
61     [ ! -z "${setting}" ] && filter-flags -mtune="${setting}"
62    
63     # in gcc 3.3 there is a bug on ppc64 where if -mcpu is used
64     # the compiler incorrectly assumes the code you are about to build
65     # is 32 bit
66     use ppc64 && setting="`get-flag mcpu`"
67     [ ! -z "${setting}" ] && filter-flags -mcpu="${setting}"
68    
69     # only allow the flags that we -know- are supported
70     transform_known_flags
71     setting="`get-flag march`"
72     if [ ! -z "${setting}" ] ; then
73     is_arch_allowed "${setting}" || filter-flags -march="${setting}"
74     fi
75     setting="`get-flag mcpu`"
76     if [ ! -z "${setting}" ] ; then
77     is_arch_allowed "${setting}" || filter-flags -mcpu="${setting}"
78     fi
79    
80     # xgcc wont understand gcc 3.4 flags...
81     filter-flags -fno-unit-at-a-time
82     filter-flags -funit-at-a-time
83     filter-flags -fweb
84     filter-flags -fno-web
85     filter-flags -mno-tls-direct-seg-refs
86    
87     # xgcc isnt patched with propolice
88     filter-flags -fstack-protector-all
89     filter-flags -fno-stack-protector-all
90     filter-flags -fstack-protector
91     filter-flags -fno-stack-protector
92    
93     # xgcc isnt patched with the gcc symbol visibility patch
94     filter-flags -fvisibility-inlines-hidden
95     filter-flags -fvisibility=hidden
96    
97     # Bug #269433 & #290202
98     filter-flags -fno-strict-overflow
99     filter-flags -fstrict-overflow
100    
101     # ...sure, why not?
102     strip-unsupported-flags
103    
104     strip-flags
105     }
106    
107 vapier 1.3 PATCH_VER="1.8"
108 vapier 1.1
109     DESCRIPTION="Compatibility package for running binaries linked against a pre gcc 3.4 libstdc++"
110     HOMEPAGE="http://gcc.gnu.org/libstdc++/"
111     SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2
112     mirror://gentoo/gcc-${PV}-patches-${PATCH_VER}.tar.bz2"
113    
114     LICENSE="GPL-2 LGPL-2.1"
115     SLOT="5"
116 vapier 1.2 KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc -ppc64 ~sparc ~x86 ~x86-fbsd"
117 vapier 1.1 IUSE="multilib nls"
118    
119     S=${WORKDIR}/gcc-${PV}
120    
121     src_unpack() {
122     unpack ${A}
123     cd "${S}"
124     EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
125     elibtoolize --portage --shallow
126     ./contrib/gcc_update --touch
127     mkdir -p "${WORKDIR}"/build
128    
129 vapier 1.3 if use multilib && [[ ${SYMLINK_LIB} == "yes" ]] ; then
130 vapier 1.1 # ugh, this shit has to match the way we've hacked gcc else
131     # the build falls apart #259215
132     sed -i \
133     -e 's:\(MULTILIB_OSDIRNAMES = \).*:\1../lib64 ../lib32:' \
134     "${S}"/gcc/config/i386/t-linux64 \
135     || die "sed failed!"
136     fi
137     }
138    
139     src_compile() {
140     cd "${WORKDIR}"/build
141     do_filter_flags
142 vapier 1.3 ECONF_SOURCE=${S} \
143 vapier 1.1 econf \
144     --enable-shared \
145     --with-system-zlib \
146     --enable-languages=c++ \
147     --enable-threads=posix \
148     --enable-long-long \
149     --disable-checking \
150     --enable-cstdio=stdio \
151     --enable-__cxa_atexit \
152     $(use_enable multilib) \
153     $(use_enable nls) \
154 vapier 1.3 $(use_with !nls included-gettext)
155 vapier 1.1
156     touch "${S}"/gcc/c-gperf.h
157    
158     emake all-target-libstdc++-v3 || die
159     }
160    
161     src_install() {
162     emake -j1 \
163     -C "${WORKDIR}"/build \
164     DESTDIR="${D}" \
165     install-target-libstdc++-v3 || die
166    
167     # scrub everything but the library we care about
168     pushd "${D}" >/dev/null
169     mv usr/lib* . || die
170     rm -rf usr
171     rm -f lib*/*.{a,la,so} || die
172     dodir /usr
173     mv lib* usr/ || die
174     }

  ViewVC Help
Powered by ViewVC 1.1.20