On Sun, Dec 02, 2018 at 11:21:55AM +0100, k...@aspodata.se wrote

> so that means I'm on my own.

  You can install a *NON*-default gcc in ${HOME}  This is a two-step
process.  I used to do this a couple of years ago when Pale Moon was
limited in what versions of gcc it would build on.  Note that tarballs
going back to 2.95.1 are available at  http://ftpmirror.gnu.org/gcc
Also, be carefull about the tarball extensions, as of approx June 2017

* gcc-6.1.0.tar.bz2 was released 2016/04/27 with bz2 extension
* gcc-5.4.0.tar.bz2 was released 2016/06/03 with bz2 extension
* gcc-6.2.0.tar.bz2 was released 2016/08/22 with bz2 extension
* gcc-6.3.0.tar.bz2 was released 2016/12/21 with bz2 extension
* gcc-6.4.0.tar.xz  was released 2017/07/04 with xz  extension
* gcc-5.5.0.tar.xz  was released 2017/10/10 with xz  extension

  The download, building, etc, is done in $HOME/gccstuff.  I set up an
automated build script in there.  E.g. to build gcc-5.4.0 and have it go
to $HOME/gcc540 execute the script

------------------------------

#!/bin/bash
#
# Instructions from https://gcc.gnu.org/wiki/InstallingGCC

wget http://ftpmirror.gnu.org/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2
tar xf gcc-5.4.0.tar.bz2

#
# To get gmp, mpc, mpfr, and isl libs
# You *MUST* run this script from the top-level GCC source dir
cd gcc-5.4.0
contrib/download_prerequisites

#
# You *MUST NOT* run ./configure from the GCC source dir
mkdir gcc-5.4.0/gcc-build && cd gcc-5.4.0/gcc-build

../configure --prefix=$HOME/gcc540 \
             --disable-multilib \
             --enable-libstdcxx-threads \
             --enable-libstdcxx-time \
             --enable-shared \
             --enable-__cxa_atexit \
             --disable-libunwind-exceptions \
             --disable-libada \
             --with-default-libstdcxx-abi=gcc4-compatible

make -j4

make install

------------------------------
  Notes: in the ../configure invocation include the languages and other
options that you need for your situation.  "make -j4" is for a machine
with 4 cores.  Adjust to fit your machine.

  To invoke gcc from $HOME/gcc540 you have to "source" the following
export statements from a plaintext file, early in your build, e.g.

. path/filename

  You must *NOT* invoke a separate shell with #!/bin/bash
For a 64 bit build...
------------------------------
  export GCCX_ROOT=$HOME/gcc540
  export PATH=$GCCX_ROOT/bin:$PATH
  export MANPATH=$GCCX_ROOT/share/man:MANPATH
  export INFOPATH=$GCCX_ROOT/share/info:$INFOPATH
  export LD_LIBRARY_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LD_LIBRARY_PATH
  export LD_RUN_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LD_RUN_PATH
  export LIBRARY_PATH=$GCCX_ROOT/lib64:$GCCX_ROOT/lib:$LIBRARY_PATH
  export INCLUDE_PATH=$GCCX_ROOT/include:$INCLUDE_PATH
  export CPLUS_INCLUDE_PATH=$GCCX_ROOT/include:$CPLUS_INCLUDE_PATH
  export C_INCLUDE_PATH=$GCCX_ROOT/include:$C_INCLUDE_PATH
------------------------------

For a 32 bit build do as above, but first search+replace, changing all
instances of "lib64" to "lib".


-- 
Walter Dnes <waltd...@waltdnes.org>
I don't run "desktop environments"; I run useful applications

Reply via email to