Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Palemoon again - again
Date: Wed, 19 Apr 2017 17:52:34
Message-Id: 20170419175218.GA19805@waltdnes.org
In Reply to: Re: [gentoo-user] Palemoon again - again by "J. Roeleveld"
1 On Tue, Apr 18, 2017 at 09:17:24AM +0000, J. Roeleveld wrote
2 >
3 > If you are certain you don't have gcc in slot 5.x installed. You
4 > can add palemoon to /etc/portage/package.unmask
5 >
6 > That will override the package.mask from the overlay.
7
8 For the official contributed SSE version, I build with 4.9.4, as per
9 the developers' specs. At home I build with 5.4.0 for personal use. It
10 runs fine on Puppy Linux on a refurbished Lenovo T400 laptop, which uses
11 older glib, etc (with security fixes like "ghost" backported). I do not
12 have Gentoo's 5.4.0 installed. Instead, I've installed gcc-5.4.0 to
13 $HOME/gcc540 using the following script. Note the option
14 "--with-default-libstdcxx-abi=gcc4-compatible", which allows backward
15 compatability.
16
17 I've disabled multilib, set my own CFLAGS, and your list of required
18 languages may differ from mine. Set MAKEOPTS as appropriate for your
19 machine. The following script downloads gcc-5.4.0 and additional lib
20 sources, and then builds gcc, which is installed in $HOME/gcc540 (no
21 root/sudo required). It can take a couple of hours or longer, depending
22 on how old your machine is.
23
24 =====================================================================
25 #!/bin/bash
26 #
27 # Instructions adapted from https://gcc.gnu.org/wiki/InstallingGCC
28 wget http://ftpmirror.gnu.org/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2
29 tar xjf gcc-5.4.0.tar.bz2
30
31 #
32 # To get gmp, mpc, mpfr, and isl libs
33 # You *MUST* run this script from the top-level GCC source dir
34 cd gcc-5.4.0
35 contrib/download_prerequisites
36
37 export CFLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"
38 export CXXFLAGS="${CFLAGS}"
39 export MAKEOPTS="-j4"
40
41 #
42 # You *MUST NOT* run ./configure from the toplevel GCC source dir
43 mkdir gcc-build && cd gcc-build
44
45 ../configure --prefix=$HOME/gcc540 \
46 --disable-multilib \
47 --enable-libstdcxx-threads \
48 --enable-libstdcxx-time \
49 --enable-shared \
50 --enable-__cxa_atexit \
51 --disable-libunwind-exceptions \
52 --disable-libada \
53 --with-default-libstdcxx-abi=gcc4-compatible
54
55 make -j4
56
57 make install
58 =====================================================================
59
60 The gcc in $HOME/gcc540 is not the default compiler. To invoke it, I
61 have to *SOURCE* the following commands to set up some variables to make
62 $HOME/gcc540 the default for this particular session...
63
64 =====================================================================
65 export GCCX_ROOT=$HOME/gcc540
66 export PATH=$GCCX_ROOT/bin:$PATH
67 export MANPATH=$GCCX_ROOT/share/man:MANPATH
68 export INFOPATH=$GCCX_ROOT/share/info:$INFOPATH
69 export LD_LIBRARY_PATH=$GCCX_ROOT/lib:$GCCX_ROOT/lib:$LD_LIBRARY_PATH
70 export LD_RUN_PATH=$GCCX_ROOT/lib:$GCCX_ROOT/lib:$LD_RUN_PATH
71 export LIBRARY_PATH=$GCCX_ROOT/lib:$GCCX_ROOT/lib:$LIBRARY_PATH
72 export INCLUDE_PATH=$GCCX_ROOT/include:$INCLUDE_PATH
73 export CPLUS_INCLUDE_PATH=$GCCX_ROOT/include:$CPLUS_INCLUDE_PATH
74 export C_INCLUDE_PATH=$GCCX_ROOT/include:$C_INCLUDE_PATH
75 =====================================================================
76
77 --
78 Walter Dnes <waltdnes@××××××××.org>
79 I don't run "desktop environments"; I run useful applications