[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] gettext: -lintl if necessary

From: Paul Eggert
Subject: Re: [bug-gnulib] gettext: -lintl if necessary
Date: Mon, 19 Jun 2006 00:26:21 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Albert Chin <address@hidden> writes:

> --as-needed.

Thanks for mentioning that.  I assumed that since binutils "ld -z
ignore" worked, that it paid attention to the "-z ignore" option.  It
doesn't; it ignores it (:-).  I just now verified this by inspecting
the source code; there is undocumented support for emulating
Solaris-style ld -z directives, but -z ignore is merely ignored.

The original lib-ignore.m4 didn't have this problem because it used
'ldd' to verify that -z ignore actually ignored.  However, 'ldd' was
not portable enough, so I removed 'ldd' (see
and that is what introduced the problem.

I installed this patch into coreutils.

2006-06-19  Paul Eggert  <address@hidden>

        * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
        --as-needed option if available.  Problem reported by Albert Chin in

--- m4/lib-ignore.m4    21 Jan 2006 07:59:22 -0000      1.3
+++ m4/lib-ignore.m4    19 Jun 2006 07:19:00 -0000      1.4
@@ -15,7 +15,12 @@ AC_DEFUN([gl_IGNORE_UNUSED_LIBRARIES],
      # Use long option sequences like '-z ignore' to test for the feature,
      # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
-     for gl_flags in '-Wl,-z,ignore' '-z ignore'; do
+     for gl_flags in \
+       '-Wl,--as-needed' \
+       '-Wl,-z,ignore' \
+       '--as-needed' \
+       '-z ignore'
+     do
        LDFLAGS="$gl_flags $LDFLAGS"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]