1 |
On Sun, Dec 02, 2018 at 11:21:55AM +0100, karl@××××××××.se wrote |
2 |
|
3 |
> so that means I'm on my own. |
4 |
|
5 |
You can install a *NON*-default gcc in ${HOME} This is a two-step |
6 |
process. I used to do this a couple of years ago when Pale Moon was |
7 |
limited in what versions of gcc it would build on. Note that tarballs |
8 |
going back to 2.95.1 are available at http://ftpmirror.gnu.org/gcc |
9 |
Also, be carefull about the tarball extensions, as of approx June 2017 |
10 |
|
11 |
* gcc-6.1.0.tar.bz2 was released 2016/04/27 with bz2 extension |
12 |
* gcc-5.4.0.tar.bz2 was released 2016/06/03 with bz2 extension |
13 |
* gcc-6.2.0.tar.bz2 was released 2016/08/22 with bz2 extension |
14 |
* gcc-6.3.0.tar.bz2 was released 2016/12/21 with bz2 extension |
15 |
* gcc-6.4.0.tar.xz was released 2017/07/04 with xz extension |
16 |
* gcc-5.5.0.tar.xz was released 2017/10/10 with xz extension |
17 |
|
18 |
The download, building, etc, is done in $HOME/gccstuff. I set up an |
19 |
automated build script in there. E.g. to build gcc-5.4.0 and have it go |
20 |
to $HOME/gcc540 execute the script |
21 |
|
22 |
------------------------------ |
23 |
|
24 |
#!/bin/bash |
25 |
# |
26 |
# Instructions from https://gcc.gnu.org/wiki/InstallingGCC |
27 |
|
28 |
wget http://ftpmirror.gnu.org/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 |
29 |
tar xf 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 |
# |
38 |
# You *MUST NOT* run ./configure from the GCC source dir |
39 |
mkdir gcc-5.4.0/gcc-build && cd gcc-5.4.0/gcc-build |
40 |
|
41 |
../configure --prefix=$HOME/gcc540 \ |
42 |
--disable-multilib \ |
43 |
--enable-libstdcxx-threads \ |
44 |
--enable-libstdcxx-time \ |
45 |
--enable-shared \ |
46 |
--enable-__cxa_atexit \ |
47 |
--disable-libunwind-exceptions \ |
48 |
--disable-libada \ |
49 |
--with-default-libstdcxx-abi=gcc4-compatible |
50 |
|
51 |
make -j4 |
52 |
|
53 |
make install |
54 |
|
55 |
------------------------------ |
56 |
Notes: in the ../configure invocation include the languages and other |
57 |
options that you need for your situation. "make -j4" is for a machine |
58 |
with 4 cores. Adjust to fit your machine. |
59 |
|
60 |
To invoke gcc from $HOME/gcc540 you have to "source" the following |
61 |
export statements from a plaintext file, early in your build, e.g. |
62 |
|
63 |
. path/filename |
64 |
|
65 |
You must *NOT* invoke a separate shell with #!/bin/bash |
66 |
For a 64 bit build... |
67 |
------------------------------ |
68 |
export GCCX_ROOT=$HOME/gcc540 |
69 |
export PATH=$GCCX_ROOT/bin:$PATH |
70 |
export MANPATH=$GCCX_ROOT/share/man:MANPATH |
71 |
export INFOPATH=$GCCX_ROOT/share/info:$INFOPATH |
72 |
export LD_LIBRARY_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LD_LIBRARY_PATH |
73 |
export LD_RUN_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LD_RUN_PATH |
74 |
export LIBRARY_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LIBRARY_PATH |
75 |
export INCLUDE_PATH=$GCCX_ROOT/include:$INCLUDE_PATH |
76 |
export CPLUS_INCLUDE_PATH=$GCCX_ROOT/include:$CPLUS_INCLUDE_PATH |
77 |
export C_INCLUDE_PATH=$GCCX_ROOT/include:$C_INCLUDE_PATH |
78 |
------------------------------ |
79 |
|
80 |
For a 32 bit build do as above, but first search+replace, changing all |
81 |
instances of "lib64" to "lib". |
82 |
|
83 |
|
84 |
-- |
85 |
Walter Dnes <waltdnes@××××××××.org> |
86 |
I don't run "desktop environments"; I run useful applications |