On Wed, 2004-09-22 at 04:01 +0200, Maciej Katafiasz wrote:
> Let's do it, and kick some low-end asses out there!
>
Tagging on the bottom; it'd also be nice to get GNOME optimising the
linker hash tables by default. For the majority going "huh?" out there,
it's basically a way of making load times shorter without resorting to
the evil of prelinking.
The way you enable it is with -Wl,-O1 in your LDFLAGS so that -O1 is
passed to the linker (ld).
It's completely harmless with no runtime side-effects other than a speed
gain in application startup. It may increase the build-time slightly as
it sits and thinks about it a bit more.
Here's an autoconf m4 macro that can be used to turn it on by default,
and allow it to be disabled at configure-time.
# SJR_LINKER_OPTIMISATIONS
# --------------------------
# Add configure option to disable linker optimisations.
AC_DEFUN([SJR_LINKER_OPTIMISATIONS],
[AC_ARG_ENABLE(linker-optimisations,
AS_HELP_STRING([--disable-linker-optimisations],
[Disable linker optimisations]),
[if test "x$enable_linker_optimisations" = "xno"; then
:
else
[LDFLAGS="$LDFLAGS -Wl,-O1"]
fi], [LDFLAGS="$LDFLAGS -Wl,-O1"])dnl
])
Scott
--
Scott James Remnant
scott canonical com
Attachment:
signature.asc
Description: This is a digitally signed message part