# HG changeset patch # User Antoine Bodin # Date 1323466984 -3600 # Node ID 713a5580cf9ad548c1e95d08e61f5ad7841f1547 # Parent f2d78e18fc1033140147650ab7c6f0c85d2a0391 Fix: -pipe compile flag shouldn't make compilation fails because of low ram anymore (+ cosmetic change) diff -r f2d78e18fc10 -r 713a5580cf9a chroot-scripts/cook-toolchain --- a/chroot-scripts/cook-toolchain Fri Dec 09 20:49:42 2011 +0100 +++ b/chroot-scripts/cook-toolchain Fri Dec 09 22:43:04 2011 +0100 @@ -88,7 +88,7 @@ report open-bloc prepare_package report step "Running compilation rules" - cook_cross_toolchain + precook_tmp_toolchain report end-step || exit 1 report close-bloc report end-sublog diff -r f2d78e18fc10 -r 713a5580cf9a tazwok --- a/tazwok Fri Dec 09 20:49:42 2011 +0100 +++ b/tazwok Fri Dec 09 22:43:04 2011 +0100 @@ -635,14 +635,13 @@ ulimit -d unlimited ulimit -m unlimited - # Free some RAM by cleaning cache if option is enabled. - freeram=$(free | fgrep '/+ buffers' | tr -s ' ' | cut -f 4 -d ' ') + freeram=$(free -m | fgrep 'Mem:' | tr -s ' ' | cut -f 4 -d ' ') - # Disable -pipe in CFLAGS/CXXFLAGS if less than 512Mb of free + # Disable -pipe in CFLAGS/CXXFLAGS if less than 512MB of free # RAM are available. - if [ "$freeram" -lt 524288 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" -o \ + if [ "$freeram" -lt 512 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" -o \ "$CXXFLAGS" != "${CXXFLAGS/-pipe}" ]; then - tazwok_warning "Disabling -pipe compile flag because only ${freeram}b of RAM is available." + tazwok_warning "Disabling -pipe compile flag because of low memory: $freeram MB available." CFLAGS="${CFLAGS/-pipe}" CXXFLAGS="${CXXFLAGS/-pipe}" fi