[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH fixups for proper setting of archive_cmds_need_lc
From: |
Robert Boehne |
Subject: |
PATCH fixups for proper setting of archive_cmds_need_lc |
Date: |
Sun, 12 Jan 2003 14:46:02 -0600 |
Hello,
As per the discussion on the libtool mailing list:
http://mail.gnu.org/archive/html/libtool/2003-01/msg00023.html
This patch fixes the resetting of "archive_cmds_need_lc" for
CVS Libtool. How it works: It eliminates the unconditional
setting of "archive_cmds_need_lc" to "yes" in AC_LIBTOOL_PROG_LD_SHLIBS.
Also, this patch assumes that this test should only be run for the
default
"C" language tag (or is it a non-tag?).
In AC_LIBTOOL_POSTDEP_PREDEP this is set to "yes" if " -lc "
doesn't appear in 'postdeps'. This clearly isn't correct as it
will set it to "yes" for any other circumstance.
I would like to have this patch tested thoroughly, and looked over
by trained eyes because I'm not currently 100% sure of it. It causes
no regressions in the test suite under Linux x86.
Thanks,
Robert
ChangeLog entry:
2003-01-12 Robert Boehne <address@hidden>
* libtool.m4: Modify the way "archive_cmds_need_lc" is
found. Only test to see if it is needed when using C,
and do not overwrite the setting of it.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.289
diff -u -r1.289 libtool.m4
--- libtool.m4 12 Jan 2003 07:04:27 -0000 1.289
+++ libtool.m4 12 Jan 2003 20:28:32 -0000
@@ -3391,7 +3391,6 @@
case " $_LT_AC_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
esac
])# AC_LIBTOOL_POSTDEP_PREDEP
@@ -4711,7 +4710,7 @@
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
_LT_AC_TAGVAR(archive_cmds, $1)=
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
@@ -5376,11 +5375,11 @@
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX
COMPILER_PATH LIBRARY_PATH"
fi
-
+# Skip the -lc test if a tag was specified.
+ifelse([$1],[],[
#
# Do we need to explicitly link libc?
#
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
if test "$enable_shared" = yes && test "$GCC" = yes; then
case $_LT_AC_TAGVAR(archive_cmds, $1) in
*'~'*)
@@ -5421,7 +5420,7 @@
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
;;
esac
-fi
+fi], [])
])# AC_LIBTOOL_PROG_LD_SHLIBS
- PATCH fixups for proper setting of archive_cmds_need_lc,
Robert Boehne <=