$CC -O -g -c $TMPFILE1 -o $TMPFILE1o > /dev/null 2>&1
$LD -T $TMPFILE1_ld $TMPFILE1o -o $TMPFILE2o > /dev/null 2>&1
if [ $? -ne 0 ]; then
- echo "The version of LD on this system does not properly handle" > /dev/fd/2
- echo "alignments. As a result, this project can not be built." > /dev/fd/2
- echo "" > /dev/fd/2
- echo "The problem may be the result of this LD bug report:" > /dev/fd/2
- echo " http://sourceware.org/bugzilla/show_bug.cgi?id=12726" > /dev/fd/2
- echo "" > /dev/fd/2
- echo "Please update to a working version of binutils and retry." > /dev/fd/2
+ echo "The version of LD on this system does not properly handle" >&2
+ echo "alignments. As a result, this project can not be built." >&2
+ echo "" >&2
+ echo "The problem may be the result of this LD bug report:" >&2
+ echo " http://sourceware.org/bugzilla/show_bug.cgi?id=12726" >&2
+ echo "" >&2
+ echo "Please update to a working version of binutils and retry." >&2
echo -1
exit 0
fi
# support the whole-program optimization - detect that.
$CC -fwhole-program -S -o /dev/null -xc /dev/null > /dev/null 2>&1
if [ $? -ne 0 ]; then
- echo " Working around no -fwhole-program" > /dev/fd/2
+ echo " Working around no -fwhole-program" >&2
echo 2
exit 0
fi
$CC -Os -c -fwhole-program $TMPFILE2 -o $TMPFILE2o > /dev/null 2>&1
$CC -nostdlib -Os $TMPFILE1o $TMPFILE2o -o $TMPFILE3o > /dev/null 2>&1
if [ $? -ne 0 ]; then
- echo " Working around non-functional -fwhole-program" > /dev/fd/2
+ echo " Working around non-functional -fwhole-program" >&2
echo 2
exit 0
fi
if [ $? -eq 0 ]; then
echo 0
else
- echo " Working around non-functional -combine" > /dev/fd/2
+ echo " Working around non-functional -combine" >&2
echo 1
fi