[SeaBIOS] patches from Google

Kevin O'Connor kevin at koconnor.net
Sat May 12 02:51:31 CEST 2012


On Fri, May 11, 2012 at 09:09:22AM -0700, ron minnich wrote:
> Let me know if this format is ok, this is the first in a series :-)

The format is okay.  It's preferable if you can mail the output of
'git format-patch' directly, but it's also okay as an attachment.  I
use the following to send the mails via mutt:

mutt -e 'set abort_unmodified=no' -H 0001-my-patch.patch

The patch itself, though, has some errors in it.

[...]
--- a/tools/test-gcc.sh
+++ b/tools/test-gcc.sh
[...]
@@ -69,9 +74,7 @@ EOF
 $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" >&2
-    echo 2
-    exit 0
+    report_error "  Working around non-functional -fwhole-program"

That removes the exit and changes the behavior of the script.

[...]
@@ -104,9 +107,7 @@ $CC -O -g -fwhole-program -combine -c $TMPFILE1 $TMPFILE2 -o $TMPFILE1o > /dev/n
 if [ $? -eq 0 ]; then
     echo 0
 else
-    echo "  Working around non-functional -combine" >&2
-    echo 1
-fi
+    report_error "  Working around non-functional -combine"

This removes the trailing "fi" and will break the script.

Also, are you sure the "report_error" stuff will work in a non-bash
environment?  A number of reports have been made about bash-isms in
the build - I don't want to add any back in.

-Kevin



More information about the SeaBIOS mailing list