Fail if format.lds comes out empty.
authorRoland McGrath <roland@hack.frob.com>
Sat, 2 Jul 2011 23:59:14 +0000 (16:59 -0700)
committerRoland McGrath <roland@hack.frob.com>
Sat, 2 Jul 2011 23:59:14 +0000 (16:59 -0700)
ChangeLog
Makerules

index a516723..63887b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-07-02  Roland McGrath  <roland@hack.frob.com>
 
+       * Makerules ($(common-objpfx)format.lds): Fail if result is empty.
+
        * Makefile ($(common-objpfx)testrun.sh): Generate to work relative to
        containing directory rather than embedding absolute directory names.
 
index 3234fc2..d70a196 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -993,6 +993,7 @@ $(common-objpfx)format.lds: $(..)scripts/output-format.sed \
        $(LINK.o) -shared $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS.so) \
                  -x c /dev/null -o $@.so -Wl,--verbose -v 2>&1 \
        | sed -n -f $< > $@.new
+       test -s $@.new
        rm -f $@.so
        mv -f $@.new $@
 common-generated += format.lds