]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE) [HPUX]: Define
authorGary V. Vaughan <gary@gnu.org>
Thu, 28 Jun 2001 23:06:25 +0000 (23:06 +0000)
committerGary V. Vaughan <gary@gnu.org>
Thu, 28 Jun 2001 23:06:25 +0000 (23:06 +0000)
lt_cv_sys_global_symbol_to_c_name_address to be a sed expression
for mangling the output of the symbol pipe into a brace delimited
C declaration of symbol name and address.
* ltmain.in: Use it to generate the fooS.c symbol name
Reported by Albert Chin-A-Young  <china@thewrittenword.com>

ChangeLog
libtool.m4
ltmain.in

index 3acb6d4ab5f9d015d9c59932dad0d3f51e05e94e..9f0488c00b1ed693ac9f8492037651732557200a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-06-28  Gary V. Vaughan  <gary@gnu.org>
+
+       * libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE) [HPUX]: Define
+       lt_cv_sys_global_symbol_to_c_name_address to be a sed expression
+       for mangling the output of the symbol pipe into a brace delimited
+       C declaration of symbol name and address.
+       * ltmain.in: Use it to generate the fooS.c symbol name
+       Reported by Albert Chin-A-Young  <china@thewrittenword.com>
+       
 2001-06-28  Tim Van Holder  <tim.van.holder@pandora.be>, Gary V. Vaughan  <gary@gnu.org>
 
        * bootstrap: Use cp instead of ln -s, for systems without
index 2b60a33c69160fd3e136143fbca95037f5296a58..b552d391527fdb0554c765669712f36862de551d 100644 (file)
@@ -3022,6 +3022,7 @@ if test -f "$ltmain"; then
     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
     deplibs_check_method reload_flag reload_cmds need_locks \
     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
     old_postinstall_cmds old_postuninstall_cmds \
     _LT_AC_TAGVAR(compiler, $1) \
@@ -3336,6 +3337,9 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 # Transform the output of nm in a proper C declaration
 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
 # This is the shared library runtime path variable.
 runpath_var=$runpath_var
 
@@ -3497,6 +3501,9 @@ symxfrm='\1 \2\3 \3'
 # Transform an extracted symbol line into a proper C declaration
 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
 
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
 # Define system-specific variables.
 case $host_os in
 aix*)
@@ -3507,6 +3514,7 @@ cygwin* | mingw* | pw32*)
   ;;
 hpux*) # Its linker distinguishes data from code symbols
   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
 irix*)
   [symcode='[BCDEGRST]']
index 5b11a6b5a4aabe6006fa7af4c0a52dd748d9d7ce..942830317509b48a8d58312bcffc08e7fceda43c 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -3766,27 +3766,25 @@ extern \"C\" {
 #undef lt_preloaded_symbols
 
 #if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
+# define lt_ptr void *
 #else
-# define lt_ptr_t char *
+# define lt_ptr char *
 # define const
 #endif
 
 /* The mapping between symbol names and symbols. */
 const struct {
   const char *name;
-  lt_ptr_t address;
+  lt_ptr address;
 }
 lt_preloaded_symbols[] =
 {\
 "
 
-           sed -n -e 's/^: \([^ ]*\) $/  {\"\1\", (lt_ptr_t) 0},/p' \
-               -e 's/^. \([^ ]*\) \([^ ]*\)$/  {"\2", (lt_ptr_t) \&\2},/p' \
-                 < "$nlist" >> "$output_objdir/$dlsyms"
+           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
 
            $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr_t) 0}
+  {0, (lt_ptr) 0}
 };
 
 /* This works around a problem in FreeBSD linker */