#DP: Link libraries with -01. --- gcc/config/t-slibgcc-elf-ver | 1 + libffi/Makefile.am | 2 +- libffi/Makefile.in | 2 +- libgfortran/Makefile.am | 2 +- libgfortran/Makefile.in | 2 +- libjava/Makefile.am | 2 +- libjava/Makefile.in | 2 +- libmudflap/Makefile.am | 4 ++-- libmudflap/Makefile.in | 4 ++-- libobjc/Makefile.in | 2 ++ libstdc++-v3/src/Makefile.am | 1 + libstdc++-v3/src/Makefile.in | 1 + 12 files changed, 15 insertions(+), 10 deletions(-) --- a/src/gcc/config/t-slibgcc-elf-ver.orig 2009-09-10 +++ b/src/gcc/config/t-slibgcc-elf-ver 2009-12-22 @@ -35,6 +35,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ -Wl,--soname=$(SHLIB_SONAME) \ -Wl,--version-script=$(SHLIB_MAP) \ + -Wl,-O1 \ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ $(SHLIB_OBJS) $(SHLIB_LC) && \ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ --- a/src/libffi/Makefile.am.orig 2009-08-23 +++ b/src/libffi/Makefile.am 2009-12-22 @@ -164,7 +164,7 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) -libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) +libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) -Wl,-O1 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src AM_CCASFLAGS = $(AM_CPPFLAGS) --- a/src/libffi/Makefile.in.orig 2009-12-07 +++ b/src/libffi/Makefile.in 2009-12-22 @@ -468,7 +468,7 @@ nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES) AM_CFLAGS = -Wall -g -fexceptions LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) -libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) +libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) -Wl,-O1 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src AM_CCASFLAGS = $(AM_CPPFLAGS) all: fficonfig.h --- a/src/libgfortran/Makefile.am.orig 2009-12-01 +++ b/src/libgfortran/Makefile.am 2009-12-22 @@ -18,7 +18,7 @@ toolexeclib_LTLIBRARIES = libgfortran.la libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS) -libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran) $(version_arg) +libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran) $(version_arg) -Wl,-O1 myexeclib_LTLIBRARIES = libgfortranbegin.la myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) --- a/src/libgfortran/Makefile.in.orig 2009-12-07 +++ b/src/libgfortran/Makefile.in 2009-12-22 @@ -976,7 +976,7 @@ toolexeclib_LTLIBRARIES = libgfortran.la libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS) -libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran) $(version_arg) +libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran) $(version_arg) -Wl,-O1 myexeclib_LTLIBRARIES = libgfortranbegin.la myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) libgfortranbegin_la_SOURCES = fmain.c --- a/src/libjava/Makefile.am.orig 2009-12-21 +++ b/src/libjava/Makefile.am 2009-12-22 @@ -299,7 +299,7 @@ GCJ_FOR_ECJX = @GCJ_FOR_ECJX@ GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@ LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \ - $(JC1FLAGS) $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@ + $(JC1FLAGS) $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -Wl,-O1 -o $@ CXXLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@ --- a/src/libjava/Makefile.in.orig 2009-12-21 +++ b/src/libjava/Makefile.in 2009-12-22 @@ -1073,7 +1073,7 @@ GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@ LIBLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXX) -L$(here) \ - $(JC1FLAGS) $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@ + $(JC1FLAGS) $(LTLDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -Wl,-O1 -o $@ CXXLINK = $(LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LTLDFLAGS) -o $@ --- a/src/libmudflap/Makefile.am.orig 2009-08-23 +++ b/src/libmudflap/Makefile.am 2009-12-22 @@ -34,7 +34,7 @@ mf-hooks2.c libmudflap_la_LIBADD = libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD) -libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` +libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1 libmudflapth_la_SOURCES = \ @@ -46,7 +46,7 @@ libmudflapth_la_CFLAGS = -DLIBMUDFLAPTH libmudflapth_la_LIBADD = libmudflapth_la_DEPENDENCIES = $(libmudflapth_la_LIBADD) -libmudflapth_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` +libmudflapth_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1 # XXX hack alert --- a/src/libmudflap/Makefile.in.orig 2009-12-07 +++ b/src/libmudflap/Makefile.in 2009-12-22 @@ -320,7 +320,7 @@ libmudflap_la_LIBADD = libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD) -libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` +libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1 libmudflapth_la_SOURCES = \ mf-runtime.c \ mf-heuristics.c \ @@ -331,7 +331,7 @@ libmudflapth_la_CFLAGS = -DLIBMUDFLAPTH libmudflapth_la_LIBADD = libmudflapth_la_DEPENDENCIES = $(libmudflapth_la_LIBADD) -libmudflapth_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` +libmudflapth_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1 # XXX hack alert # From libffi/Makefile.am --- a/src/libobjc/Makefile.in.orig 2009-08-23 +++ b/src/libobjc/Makefile.in 2009-12-22 @@ -282,12 +282,14 @@ libobjc$(libsuffix).la: $(OBJS) $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \ -rpath $(toolexeclibdir) \ + -Wl,-O1 \ -version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc) \ $(LTLDFLAGS) libobjc_gc$(libsuffix).la: $(OBJS_GC) $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) $(OBJC_BOEHM_GC_LIBS) \ -rpath $(toolexeclibdir) \ + -Wl,-O1 \ -version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc) \ $(LTLDFLAGS) --- a/src/libstdc++-v3/src/Makefile.am.orig 2009-12-21 +++ b/src/libstdc++-v3/src/Makefile.am 2009-12-22 @@ -207,6 +207,7 @@ $(top_builddir)/libsupc++/libsupc++convenience.la libstdc___la_LDFLAGS = \ + -Wl,-O1 \ -version-info $(libtool_VERSION) ${version_arg} -lm libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) --- a/src/libstdc++-v3/src/Makefile.in.orig 2009-12-21 +++ b/src/libstdc++-v3/src/Makefile.in 2009-12-22 @@ -444,6 +444,7 @@ $(top_builddir)/libsupc++/libsupc++convenience.la libstdc___la_LDFLAGS = \ + -Wl,-O1 \ -version-info $(libtool_VERSION) ${version_arg} -lm libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)