From 845833bbd940f60434c682562d516c5ace24c3e0 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Thu, 10 Jan 2019 08:27:05 +0100 Subject: scripts/bootstrap-prefix: propagate *FLAGS to target too Signed-off-by: Fabian Groffen --- scripts/bootstrap-prefix.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 9ce12729e3..cced408b42 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1454,10 +1454,11 @@ do_emerge_pkgs() { done myuse=( ${myuse} ) - # Portage seems to ignore USE= for build dependencies. Since - # that's what we're more or less doing all the time, encode the - # USE-flags in profiles/use.mask and profiles/use.force which - # normally do not exist. + # Portage seems to ignore USE=, *FLAGS for target dependencies. + # Since that's what we're more or less doing all the time, + # encode the USE-flags in profiles/use.mask and + # profiles/use.force which normally do not exist. Get LDFLAGS + # set through make.conf. rm -f "${EPREFIX}"/usr/portage/profiles/use.{mask,force} for use in "${myuse[@]}" ; do case "${use}" in @@ -1469,6 +1470,12 @@ do_emerge_pkgs() { ;; esac done + sed -i -e '/#stage3_temp#/d' "${EPREFIX}"/tmp/etc/portage/make.conf + { + echo "CFLAGS=\"\${CFLAGS} ${OVERRIDE_CFLAGS}\" #stage3_temp#" + echo "CXXFLAGS=\"\${CXXFLAGS} ${OVERRIDE_CXXFLAGS}\" #stage3_temp#" + echo "LDFLAGS=\"\${LDFLAGS} ${LDFLAGS}\" #stage3_temp#" + } >> "${EPREFIX}"/tmp/etc/portage/make.conf # Disable the STALE warning because the snapshot frequently gets stale. # @@ -1491,6 +1498,7 @@ do_emerge_pkgs() { ) [[ $? -eq 0 ]] || return 1 rm -f "${EPREFIX}"/usr/portage/profiles/use.{mask,force} + sed -i -e '/#stage3_temp#/d' "${EPREFIX}"/tmp/etc/portage/make.conf case ${pkg},${CHOST} in app-shells/bash,*-cygwin*) -- cgit v1.2.3-18-g5258