On Tue, Apr 18, 2017 at 09:17:24AM +0000, J. Roeleveld wrote
> 
> If you are certain you don't have gcc in slot 5.x installed. You
> can add palemoon to /etc/portage/package.unmask
> 
> That will override the package.mask from the overlay.

  For the official contributed SSE version, I build with 4.9.4, as per
the developers' specs.  At home I build with 5.4.0 for personal use.  It
runs fine on Puppy Linux on a refurbished Lenovo T400 laptop, which uses
older glib, etc (with security fixes like "ghost" backported).  I do not
have Gentoo's 5.4.0 installed.  Instead, I've installed gcc-5.4.0 to
$HOME/gcc540 using the following script.  Note the option
"--with-default-libstdcxx-abi=gcc4-compatible", which allows backward
compatability.

  I've disabled multilib, set my own CFLAGS, and your list of required
languages may differ from mine.  Set MAKEOPTS as appropriate for your
machine.  The following script downloads gcc-5.4.0 and additional lib
sources, and then builds gcc, which is installed in $HOME/gcc540 (no
root/sudo required).  It can take a couple of hours or longer, depending
on how old your machine is.

=====================================================================
#!/bin/bash
#
# Instructions adapted from https://gcc.gnu.org/wiki/InstallingGCC
wget http://ftpmirror.gnu.org/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2
tar xjf 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

export CFLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe 
-fno-unwind-tables -fno-asynchronous-unwind-tables"
export CXXFLAGS="${CFLAGS}"
export MAKEOPTS="-j4"

#
# You *MUST NOT* run ./configure from the toplevel GCC source dir
mkdir gcc-build && cd 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
=====================================================================

  The gcc in $HOME/gcc540 is not the default compiler.  To invoke it, I
have to *SOURCE* the following commands to set up some variables to make
$HOME/gcc540 the default for this particular session...

=====================================================================
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/lib:$GCCX_ROOT/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=$GCCX_ROOT/lib:$GCCX_ROOT/lib:$LD_RUN_PATH
export LIBRARY_PATH=$GCCX_ROOT/lib:$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
=====================================================================

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

Reply via email to