libtool-patches
[Top][All Lists]
Advanced

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

Re: more macro cleanup: AC_LIBTOOL_DLOPEN_SELF


From: Ralf Wildenhues
Subject: Re: more macro cleanup: AC_LIBTOOL_DLOPEN_SELF
Date: Sun, 6 Nov 2005 13:36:19 +0100
User-agent: Mutt/1.5.9i

Hi Gary,

* Gary V. Vaughan wrote on Tue, Nov 01, 2005 at 11:40:39AM CET:
> Ralf Wildenhues wrote:
> >OK to apply to branch-1-5 and forward-port (HEAD has only the STRIP_LIB
> >part missing, I believe)?
> 
> Yes, please commit.

Thanks for reviewing!

> Thanks for this... there is still much bogosity along
> these lines where I never did quite seem to get around to addressing this
> comment after refactoring the macros for multilang:
> 
> ## CAVEAT EMPTOR:
> ## There is no encapsulation within the following macros, do not change
> ## the running order or otherwise move them around unless you know exactly
> ## what you are doing...
> 
> Sadly, we need a full and careful audit of the macro dependency graph to
> tidy this all up properly.  All patches *most* welcome!

Erm.  The forward-port of this to CVS HEAD turned out to be *not quite*
so harmless.  The setting of `wl' is actually done at the end of
_LT_LINKER_SHLIBS, so AC_REQUIREing LT_SYS_DLOPEN_SELF is just plain
stupid (also given that export_symbols_flag_spec isn't set appropriately
then..

And there is more in store.  To follow in a separate thread.

Applied the shown patch to branch-1-5, and the one below to HEAD.

Cheers,
Ralf

        * libltdl/m4/libtool.m4 (LT_SYS_DLOPEN_SELF): Revert
        expansion of `$wl'.
        (_LT_LANG_C_CONFIG, _LT_LANG_CXX_CONFIG, _LT_LANG_GCJ_CONFIG):
        Do not require LT_SYS_DLOPEN_SELF.
        (_LT_LANG_C_CONFIG): Instead call it at the right time.
        (_LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG, _LT_LANG_FC_CONFIG)
        (_LT_LANG_GCJ_CONFIG): Do not call _LT_CMD_STRIPLIB.

Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.32
diff -u -r1.32 libtool.m4
--- libltdl/m4/libtool.m4       1 Nov 2005 16:24:10 -0000       1.32
+++ libltdl/m4/libtool.m4       2 Nov 2005 05:25:11 -0000
@@ -1630,7 +1645,7 @@
     ])
 
     if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS 
$lt_prog_compiler_static\"
+      eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
          lt_cv_dlopen_self_static, [dnl
          _LT_TRY_DLOPEN_SELF(
@@ -4821,8 +4837,7 @@
 # defined.  These variables are subsequently used by _LT_CONFIG to write
 # the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_C_CONFIG],
-[AC_REQUIRE([LT_SYS_DLOPEN_SELF])dnl
-m4_require([_LT_DECL_EGREP])dnl
+[m4_require([_LT_DECL_EGREP])dnl
 lt_save_CC="$CC"
 AC_LANG_PUSH(C)
 
@@ -4881,6 +4896,7 @@
   _LT_LINKER_SHLIBS($1)
   _LT_SYS_DYNAMIC_LINKER($1)
   _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
   _LT_CMD_STRIPLIB
 
   # Report which library types will actually be built
@@ -4948,7 +4966,6 @@
 # the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
 [AC_REQUIRE([_LT_PROG_CXX])dnl
-AC_REQUIRE([LT_SYS_DLOPEN_SELF])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 
@@ -5908,7 +5925,6 @@
     _LT_LINKER_SHLIBS($1)
     _LT_SYS_DYNAMIC_LINKER($1)
     _LT_LINKER_HARDCODE_LIBPATH($1)
-    _LT_CMD_STRIPLIB
 
     _LT_CONFIG($1)
   fi # test -n "$compiler"
@@ -6228,7 +6246,6 @@
     _LT_LINKER_SHLIBS($1)
     _LT_SYS_DYNAMIC_LINKER($1)
     _LT_LINKER_HARDCODE_LIBPATH($1)
-    _LT_CMD_STRIPLIB
 
     _LT_CONFIG($1)
   fi # test -n "$compiler"
@@ -6364,7 +6382,6 @@
     _LT_LINKER_SHLIBS($1)
     _LT_SYS_DYNAMIC_LINKER($1)
     _LT_LINKER_HARDCODE_LIBPATH($1)
-    _LT_CMD_STRIPLIB
 
     _LT_CONFIG($1)
   fi # test -n "$compiler"
@@ -6383,7 +6400,6 @@
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_GCJ_CONFIG],
 [AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_REQUIRE([LT_SYS_DLOPEN_SELF])dnl
 AC_LANG_SAVE
 
 # Source file extension for Java test sources.
@@ -6430,7 +6446,6 @@
   _LT_LINKER_SHLIBS($1)
   _LT_SYS_DYNAMIC_LINKER($1)
   _LT_LINKER_HARDCODE_LIBPATH($1)
-  _LT_CMD_STRIPLIB
 
   _LT_CONFIG($1)
 fi




reply via email to

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