diff options
Diffstat (limited to 'prefix-stack-setup')
-rw-r--r-- | prefix-stack-setup | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/prefix-stack-setup b/prefix-stack-setup index 2b0d56e..428fa53 100644 --- a/prefix-stack-setup +++ b/prefix-stack-setup @@ -98,6 +98,7 @@ eend_exit() { ebegin "creating directory structure" ( set -e + mkdir -p "${CHILD_EPREFIX}"/var/tmp/portage mkdir -p "${CHILD_EPREFIX}"/etc/portage/profile/use.mask mkdir -p "${CHILD_EPREFIX}"/etc/portage/profile/use.force mkdir -p "${CHILD_EPREFIX}"/etc/portage/env @@ -113,11 +114,11 @@ ebegin "creating make.conf" ( set -e echo "#" - echo "# The following values where taken from the parent prefix's" - echo "# environment. Feel free to adopt them as you like." + echo "# These are sane default compiler flags, feel free to adopt them as you like." + echo "# Extending the flags is done to respect flags probably set by some profile." echo "#" - echo "CFLAGS=\"$(portageq envvar CFLAGS)\"" - echo "CXXFLAGS=\"$(portageq envvar CXXFLAGS)\"" + echo "CFLAGS=\"\${CFLAGS} -O2 -pipe\"" + echo "CXXFLAGS=\"${CXXFLAGS} -O2 -pipe\"" echo "MAKEOPTS=\"$(portageq envvar MAKEOPTS)\"" niceness=$(portageq envvar PORTAGE_NICENESS || true) [[ -n ${niceness} ]] && @@ -131,6 +132,7 @@ ebegin "creating make.conf" echo "EPREFIX=\"${CHILD_EPREFIX}\"" echo "PORTAGE_OVERRIDE_EPREFIX=\"${PARENT_EPREFIX}\"" echo "BROOT=\"${PARENT_EPREFIX}\"" + echo "PORTAGE_TMPDIR=\"\${EPREFIX}/var/tmp/portage\"" # Since EAPI 7 there is BDEPEND, which is DEPEND in EAPI up to 6. # We do not want to pull DEPEND from EAPI <= 6, but RDEPEND only. echo "EMERGE_DEFAULT_OPTS=\"--root-deps=rdeps\"" @@ -152,6 +154,10 @@ ebegin "creating env/host-cc.conf" cat > "${CHILD_EPREFIX}"/etc/portage/env/host-cc.conf <<-EOM CC=${PARENT_CHOST}-gcc CXX=${PARENT_CHOST}-g++ + # Inherited compiler flags from parent prefix, + # as the child prefix may have a different compiler. + CFLAGS="$(portageq envvar CFLAGS)" + CXXFLAGS="$(portageq envvar CXXFLAGS)" EOM eend_exit $? |