aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2011-06-11 00:45:12 -0700
committerRoland McGrath <roland@hack.frob.com>2011-07-14 20:50:17 -0700
commit5c55070081c27168d27145afdf6a92cd56c9abb3 (patch)
tree07be43c6115f3d97746612a57c8fda82031d45a5 /Makerules
parenta6928d5102a89f152fe9d17abb26346dc8cefc9c (diff)
downloadglibc-5c55070081c27168d27145afdf6a92cd56c9abb3.tar
glibc-5c55070081c27168d27145afdf6a92cd56c9abb3.tar.gz
glibc-5c55070081c27168d27145afdf6a92cd56c9abb3.tar.bz2
glibc-5c55070081c27168d27145afdf6a92cd56c9abb3.zip
Use linker --print-output-format option if available.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index d70a196ded..a8b575c019 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