From: Gary V. Vaughan Date: Thu, 28 Jun 2001 23:06:25 +0000 (+0000) Subject: * libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE) [HPUX]: Define X-Git-Tag: release-1-4b~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3423d6e7f9345eafca7d3f63d87d1d240f8122a8;p=thirdparty%2Flibtool.git * 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 --- diff --git a/ChangeLog b/ChangeLog index 3acb6d4ab..9f0488c00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-06-28 Gary V. Vaughan + + * 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 + 2001-06-28 Tim Van Holder , Gary V. Vaughan * bootstrap: Use cp instead of ln -s, for systems without diff --git a/libtool.m4 b/libtool.m4 index 2b60a33c6..b552d3915 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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]'] diff --git a/ltmain.in b/ltmain.in index 5b11a6b5a..942830317 100644 --- 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 */