#!/bin/bash
# ====================[ bashrc                             ]====================
#                     [ Time-stamp: "2008-10-27 01:49:06 leycec" ]
#
# For details, see "http://paludis.pioto.org/configuration/bashrc.html".
#
# --------------------( EBUILDS                            )--------------------
# To determine which ebuilds depend on some other ebuild, run qdepends with:
#    qdepends -a ${EBUILD_NAME}
# 
# To emerge a specific version of an ebuild, specify that "atom" with:
#    emerge '=ctags-5.5.4-r2'
#
# To emerge an ebuild you've manually edited, manually recompute the MD5
# digest for the ebuild with:
#     ebuild ${FILE}.ebuild digest
#
# To add a new ebuild for software not currently registered in the main branch
# or existing overlays, move that ebuild to an appropriate directory of:
#     /usr/local/portage/
#
# New ebuilds added to the "/usr/portage/" are deleted upon the next rsync.

# ....................{ COMPILATIONS                       }....................
# Host Setting
# ============
#
# All PowerPC systems should use this host setting:
CHOST="powerpc-unknown-linux-gnu"

# Host and optimization settings 
# ==============================
#
# For optimal performance, enable a CFLAGS setting appropriate for your CPU.
#
# Please note that if you experience strange issues with a package, it may be
# due to gcc's optimizations interacting in a strange way. Please test the
# package (and in some cases the libraries it uses) at default optimizations
# before reporting errors to developers.
#
# -mcpu=<cpu-type> for PowerPC systems selects the type of processor you want
# to optimize your code for.   Code generated under those options will run best
# on that processor, and may not run at all on others.
#
# GCC 3.4 supports many powerpc processor types including: 401, 403, 405,
# 405fp, 440, 440fp, 505, 601, 602, 603, 603e, 604, 604e, 620, 630, 740, 7400,
# 7450, 750, 801, 821, 823, 860, 970, 8540, common, ec603e, G3, G4, G5, power,
# power2, power3, power4, power5, powerpc, powerpc64, rios, rios1, rios2, rsc,
# and rs64a
#
# Recommended settings for GCC 3.4 only :
#
# -maltivec enables optional altivec support and should be used
# only for G4 processors,  on GCC 3.2 or newer.  It also requires that you have
# the alitvec option compiled into your kernel to take full advantage of this
# feature.  Note: you should also include -mabi=altivec flag if using this 
# option.
#
# The newer gcc has a stricter aliasing ruleset that makes type punned 
# expression faulty compiled if -fstrict-aliasing is enabled.
# That option is implied by -O2 -Os and -O3. Make SURE you don't have that
# option enabled by adding -fno-strict-aliasing to your CFLAGS and CXXFLAGS
#
# Long term testing has shown that -O3 opts can be unreliable on G4's but work
# on G3 series processors or earlier.
#
# The following is the suggested CFLAGS for a generic G4 cpu
#
#CFLAGS="-O2 -pipe -mcpu=G4 -maltivec -mabi=altivec -fno-strict-aliasing"
#
#
# All non G4 PPC boxen should choose this next option.  It will work fine for
# all G3 and pre machines.  (note it will not hurt pre G3 machines either to 
# use this mcpu option as it is the default for gcc 3.2.x anyway)
#
#CFLAGS="-O2 -pipe -mcpu=G3 -fno-strict-aliasing"
CFLAGS="-O2 -pipe -mcpu=G3 -mtune=G3 -fno-strict-aliasing"

# If you set a CFLAGS above, then this line will set your default C++ flags to
# the same settings.
CXXFLAGS="${CFLAGS}"

# Advanced Features
# =================
#
# MAKEOPTS provides extra options that may be passed to 'make' when a
#     program is compiled. Presently the only use is for specifying
#     the number of parallel makes (-j) to perform. The suggested number
#     for parallel makes is CPUs+1, where each core of one CPU is counted as one
#     CPU (e.g., a double core CPU is counted as two CPUs) and where hyper-
#     threading is counted as one additional CPU for CPUs supporting hyper-
#     threading (e.g., a hyper-threading CPU is counted as two CPUs). This
#     number should be bounded by [1, CPUs+1], and no less nor higher. Use of
#     "-j1" is appropriate for non-core, non-hyperthreading single CPUs in low
#     memory machines, but probably inappropriate for other modern CPUs; use of
#     "-j2" is appropriate for most modern CPUs.
MAKEOPTS="-j1"

# ....................{ CONDITIONALS                       }....................
# case "${PN}" in
#   # Prevent ebuilds causing sandbox violations from being sandboxed.
#   python|portage)
#     export SANDBOX_PREDICT=/
#     ;;
#
#   # Prevent ebuilds failing unit tests from being unit tested.
#   foo|bar)
#     export SKIP_FUNCTIONS=test
#     ;;
#   
# esac

