aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index d70a196..a8b575c 100644
--- a/Makerules
+++ b/Makerules
@@ -990,11 +990,15 @@ install: $(inst_slibdir)/libc.so$(libc.so-version)
$(common-objpfx)format.lds: $(..)scripts/output-format.sed \
$(common-objpfx)config.make \
$(common-objpfx)config.h $(..)Makerules
+ifneq (unknown,$(output-format))
+ echo > $@.new 'OUTPUT_FORMAT($(output-format))'
+else
$(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
+endif
mv -f $@.new $@
common-generated += format.lds