From 897b504d6bfb72f99ad5baa5b50ed74559323257 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 24 Dec 2014 09:53:35 +0100 Subject: [PATCH] xbps-src: use bootstrap build-profile for the bootstrap target. ... otherwise the proper compiler flags are being used in the chroot case. --- common/build-profiles/bootstrap.sh | 2 ++ common/xbps-src/shutils/common.sh | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 common/build-profiles/bootstrap.sh diff --git a/common/build-profiles/bootstrap.sh b/common/build-profiles/bootstrap.sh new file mode 100644 index 0000000000..604347f79a --- /dev/null +++ b/common/build-profiles/bootstrap.sh @@ -0,0 +1,2 @@ +XBPS_CFLAGS="-O2 -pipe" +XBPS_CXXFLAGS="$XBPS_CFLAGS" diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 4ad9d0dcc5..a7e53216c4 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -328,13 +328,12 @@ setup_pkg() { dbgflags="-g" fi - if [ -z "$XBPS_CFLAGS" -a -z "$XBPS_CXXFLAGS" -a -n "$CHROOT_READY" ]; then - if [ -s ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh ]; then - . ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh + if [ -z "$XBPS_CFLAGS" -a -z "$XBPS_CXXFLAGS" ]; then + if [ -z "$CHROOT_READY" ]; then + source_file ${XBPS_COMMONDIR}/build-profiles/bootstrap.sh + else + source_file ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh fi - else - XBPS_CFLAGS="-O2 -pipe" - XBPS_CXXFLAGS="$XBPS_CFLAGS" fi export CFLAGS="$XBPS_CFLAGS $XBPS_CROSS_CFLAGS $CFLAGS $dbgflags" export CXXFLAGS="$XBPS_CXXFLAGS $XBPS_CROSS_CXXFLAGS $CXXFLAGS $dbgflags"