summaryrefslogtreecommitdiff
path: root/m4/lib-ignore.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-01-21 07:59:22 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-01-21 07:59:22 +0000
commit5a85d9f93fee90dc0d1110579ccd64a4f64e2e42 (patch)
tree68adc2ed7e4cc30b33ab985b9f8c5c92f87f6973 /m4/lib-ignore.m4
parent911776e965ace0923c92bb85c89387db89c1fea9 (diff)
downloadcoreutils-5a85d9f93fee90dc0d1110579ccd64a4f64e2e42.tar.xz
(gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
rather than -Xlinker -z -Xlinker ignore, as it's more portable.
Diffstat (limited to 'm4/lib-ignore.m4')
-rw-r--r--m4/lib-ignore.m410
1 files changed, 2 insertions, 8 deletions
diff --git a/m4/lib-ignore.m4 b/m4/lib-ignore.m4
index a84ca167e..348f6f44a 100644
--- a/m4/lib-ignore.m4
+++ b/m4/lib-ignore.m4
@@ -15,16 +15,10 @@ AC_DEFUN([gl_IGNORE_UNUSED_LIBRARIES],
gl_saved_ldflags=$LDFLAGS
# 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 '-Xlinker -z -Xlinker ignore' '-z ignore'; do
+ for gl_flags in '-Wl,-z,ignore' '-z ignore'; do
LDFLAGS="$gl_flags $LDFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
- [case $gl_flags in
- '-Xlinker -z -Xlinker ignore')
- # Shorten this ugly thing, for prettier 'make' output.
- gl_cv_ignore_unused_libraries='-Xlinker -zignore';;
- *)
- gl_cv_ignore_unused_libraries=$gl_flags;;
- esac])
+ [gl_cv_ignore_unused_libraries=$gl_flags])
LDFLAGS=$gl_saved_ldflags
test "$gl_cv_ignore_unused_libraries" != none && break
done])