Gentoo Archives: gentoo-dev

From: R Hill <dirtyepic.sk@×××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: toolchain.eclass and gcc 4.1 snapshots
Date: Sun, 26 Mar 2006 03:23:43
Message-Id: e051b1$535$1@sea.gmane.org
In Reply to: [gentoo-dev] toolchain.eclass and gcc 4.1 snapshots by Simon Strandman
1 Simon Strandman wrote:
2 > It seems like toolchain.eclass does something wrong when configuring gcc
3 > 4.1 snapshots. I decided to try gcc 4.1 on my server so I created a
4 > gcc-4.1.1.20060324 ebuild and defined the SNAPSHOT variable in it
5 > (current cvs has a lot of bugfixes since the release). This is the way
6 > I've done it with gcc 4.0 and I never had any problems then. The ebuild
7 > emerges without problems but it installs files in both
8 > /usr/lib/gcc/i686-pc-linux-gnu/4.1.1-20060324 and
9 > /usr/lib/gcc/i686-pc-linux-gnu/4.1.1. So when I try to emerge anything
10 > it always fails with errors like this:
11 >
12 > configure:2239: i686-pc-linux-gnu-gcc -O2 -march=pentium3 -pipe
13 > -fomit-frame-pointer -D_FORTIFY_SOURCE=1 conftest.c >&5
14 > /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld:
15 > cannot find -lgcc_s
16 > collect2: ld returned 1 exit status
17 >
18 > Just copying over the files from one dir to the other and then
19 > symlinking it works around the problems. Any ideas?
20
21 This is caused by changes to the build system in 4.1 and GCC's BASE-VER not
22 matching portage's ${PV} in snapshot builds. Most of the system directories are
23 set up by portage during configure using ${PV} as part of the dirname. (eg.
24 includedir=/usr/<lib>/gcc/<chost>/${PV}/include). However, libdir and
25 libexecdir aren't set by portage (because they generate really strange paths w/
26 --enable-version-specific-runtime-libs in GCC 3.3/3.4) and default to
27 /usr/<lib>/gcc/<chost>/BASE-VER/blah. When ${PV} != BASE-VER, wackiness ensues.
28
29 Try this in your ebuild:
30
31 src_unpack() {
32 toolchain_src_unpack
33
34 echo ${PV/_/-} > "${S}"/gcc/BASE-VER
35 echo "" > "${S}"/gcc/DATESTAMP
36 }
37
38 --de.
39
40 --
41 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Re: toolchain.eclass and gcc 4.1 snapshots Simon Strandman <simon.strandman@×××××.com>