blob: 6b4d00a7e82c1df2aa8423c0ebc9fe41885054c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
There is no gurantee that this is correct... It should be (and it worked for me)
If it doesn't work for you, please come talk to me, so we can correct the bug.
--eradicator
Set FEATURES=-sandbox in /etc/make.conf because of a sandbox bug that is seen
when using gcc-config 1.4.0
Make sure you have the latest gcc-config baselayout and portage:
# emerge -uv '>=sys-devel/gcc-config-1.3.11' '>=sys-apps/portage-2.1.51-r9'
Delete the /usr/sparc64-unknown-linux-gnu symlink hackery:
# rm /usr/sparc64-unknown-linux-gnu
Unmerge the kernel compiler as you don't need it any more
# emerge unmerge gcc-sparc64
Switch to profile:
# rm /etc/make.profile
# ln -s /usr/portage/profiles/default-linux/sparc/sparc64/dev/multilib /etc/make.profile
Change CHOST in /etc/make.conf to sparc64-unknown-linux-gnu (or delete it since
the profile sets it for us):
# nano -w /etc/make.conf
Get an updated baselayout
# emerge -v baselayout
Get a sparc64 binutils:
# CC="sparc-unknown-linux-gnu-gcc" emerge -v binutils
Use binutils-config to choose sparc64-* binutils:
# binutils-config -l
# binutils-config <value>
# . /etc/profile
Get a stage1 sparc64 gcc:
# CC="sparc-unknown-linux-gnu-gcc" USE="build static" GCC_MAKE_TARGET="all" emerge -v gcc
Remove sparc32 gcc compiler and binutils from your system
# emerge unmerge \=sys-devel/gcc-<version> \=sys-devel/binutils-<version>
# rm /etc/env.d/gcc/config-sparc-unknown-linux-gnu /etc/env.d/05gcc-sparc-unknown-linux-gnu /etc/env.d/binutils/binutils/config-sparc-unknown-linux-gnu
# rm /etc/env.d/binutils/config-sparc-unknown-linux-gnu
Use gcc-config to set your gcc
Choose the sparc64-unknown-linux-gnu one you just emerged
# gcc-config -l
# gcc-config <value>
# . /etc/profile
Use the stage1 gcc to build bootstrap multilib glibc
# USE="-nptl" CBUILD="sparc-unknown-linux-gnu" emerge -v glibc
Now, finally emerge your multilib sandbox, full glibc and gcc
# emerge -v portage gcc glibc
Now unfortunately a bunch of .las are now lying around pointing to incorrect places... Here's a kludge:
find /usr/lib /usr/kde/*/lib /usr/qt/*/lib -name '*.la' -exec \
sed -i -e 's:usr/lib/gcc\(-lib\)?/sparc-unknown-linux-gnu:usr/lib/gcc/sparc64-unknown-linux-gnu:g' \
-e 's:/lib\(ffi\|g2c\|objc\|stdc++\|supc++\):/32/lib\1:g' \
-e 's:/32/32/:/32/:g' \
{} \;
Next, get rid of the /usr/lib/gcc/sparc64-unknown-linux-gnu/<gcc version>/*.la files. They will confuse libtool. See bug #75420 for more info on this.
|