lib-so-y += $(libc)
objclean-y += libc_clean
+OUTPUT_FORMAT = $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p'
+
ifeq ($(DOMULTI),n)
$(libc:.$(MAJOR_VERSION)=): $(libc_OUT)/libc_so.a $(LIBS-libc.so)
$(call link.so,$(libc_FULL_NAME),$(MAJOR_VERSION))
endif
$(Q)$(RM) $@
$(Q)cp $(top_srcdir)extra/scripts/format.lds $@
+ $(Q)echo "OUTPUT_FORMAT ( $(shell $(OUTPUT_FORMAT)) )" >> $@
ifeq ($(COMPAT_ATEXIT),y)
$(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_MAJORNAME) $(ASNEEDED) )" >> $@
else