diff --git a/tcl.spec b/tcl.spec index d4c4b8b..2e33571 100644 --- a/tcl.spec +++ b/tcl.spec @@ -91,6 +91,20 @@ eval $MAKE # Some of the regressioin tests write to $HOME, so better redirect them mkdir home export HOME=$PWD/home +# Run the testsuite to gather some data for the profile-based +# optimisation and let rpmbuild fail on unexpected test failures. +cat > known-failures <&1 | tee testresults +grep FAILED testresults | grep -Fqvf known-failures && exit 1 +# If we don't do profile based optimisation, we are done at this point. +test -z "$PFLAGS" && exit 0 +# Rebuild and use the profiling results +make clean +PFLAGS="%cflags_profile_feedback" +eval $MAKE %install make -C unix install install-private-headers \