From: Ralf Wildenhues Date: Tue, 14 Sep 2004 22:10:37 +0000 (+0000) Subject: * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Simplification: X-Git-Tag: release-1-9d~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18aa63dac0de1504f8981f8e6e1a3647947759a7;p=thirdparty%2Flibtool.git * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Simplification: distinguish between data and code symbols on every system. --- diff --git a/ChangeLog b/ChangeLog index eb7a26312..4b5157979 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-09-14 Ralf Wildenhues + + * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Simplification: + distinguish between data and code symbols on every system. + 2004-09-14 Albert Chin-A-Young Unfortunately, libtool has no way of telling if unrecognized diff --git a/m4/libtool.m4 b/m4/libtool.m4 index cf0b2e928..217ad9f6b 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -2693,12 +2693,6 @@ sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. 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 int \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\\\", (void *) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" - # Define system-specific variables. case $host_os in aix*) @@ -2707,23 +2701,14 @@ aix*) cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; -hpux*) # Its linker distinguishes data from code symbols +hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" - fi - ;; osf*) symcode='[[BCDEGQRST]]' ;; @@ -2735,6 +2720,14 @@ sysv4) ;; esac +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/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\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" + # Handle CRLF in mingw tool chain opt_cr= case $build_os in