public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-user] emerging older compilers
  @ 2018-12-03  1:50 99%     ` Walter Dnes
  0 siblings, 0 replies; 1+ results
From: Walter Dnes @ 2018-12-03  1:50 UTC (permalink / raw
  To: gentoo-user

On Sun, Dec 02, 2018 at 11:21:55AM +0100, karl@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 <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-11-30 18:25     [gentoo-user] emerging older compilers karl
2018-11-30 23:23     ` Andreas K. Huettel
2018-12-02 10:21       ` karl
2018-12-03  1:50 99%     ` Walter Dnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox