libtool-patches
[Top][All Lists]
Advanced

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

Re: better support for AIX 5.1


From: jedwards
Subject: Re: better support for AIX 5.1
Date: Thu, 05 Jun 2003 14:32:52 -0600
User-agent: Mozilla/5.0 (X11; U; AIX 0006844C4C00; en-US; rv:1.4a) Gecko/20000125

Here is the corrected patch.

Albert Chin wrote:

On Thu, Jun 05, 2003 at 07:46:06AM -0600, jedwards wrote:
Sure, here it is.

It seems you have non-AIX patches as well. How about resyncing and
mailing only the AIX-specific diffs.



--
Jim Edwards             address@hidden
IBM Applications Analyst
NCAR SCD
BOULDER CO 303-497-1842
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.323
diff -u -r1.323 libtool.m4
--- libtool.m4  3 Jun 2003 17:31:52 -0000       1.323
+++ libtool.m4  5 Jun 2003 20:33:54 -0000
@@ -1152,17 +1152,8 @@
     # AIX (on Power*) has no versioning support, so currently we can not 
hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix 
${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+    library_names_spec='${libname}${release}${shared_ext}$versuffix 
${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    postinstall_cmds="if test \$build_old_libs = yes ; then \$install_prog 
\$dir/\$old_library \$destdir/\$old_library ; fi"
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -1217,7 +1208,7 @@
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | 
$SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
       ;;
     mingw*)
       # MinGW DLLs use traditional 'lib' prefix
@@ -1256,16 +1247,17 @@
   version_type=darwin
   need_lib_prefix=no
   need_version=no
+  # FIXME: Relying on posixy $() will cause problems for
+  #        cross-compilation, but unfortunately the echo tests do not
+  #        yet detect zsh echo's removal of \ escapes.
   library_names_spec='${libname}${release}${versuffix}$shared_ext 
${libname}${release}${major}$shared_ext ${libname}$shared_ext'
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext='$(test .$module = .yes && echo .so || echo .dylib)'
   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" 
"$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep 
"^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, 
,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
+  sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" 
| sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed 
-e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib 
/usr/lib /usr/local/lib,g"`
   fi
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
@@ -2406,7 +2398,7 @@
 AC_DEFUN([_LT_AC_LANG_CXX],
 [AC_REQUIRE([AC_PROG_CXX])
 AC_REQUIRE([AC_PROG_CXXCPP])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
 ])# _LT_AC_LANG_CXX
 
 
@@ -2422,7 +2414,7 @@
 # ---------------
 AC_DEFUN([_LT_AC_LANG_F77],
 [AC_REQUIRE([AC_PROG_F77])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
 ])# _LT_AC_LANG_F77
 
 
@@ -2443,7 +2435,7 @@
       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
 ])# _LT_AC_LANG_GCJ
 
 
@@ -2452,7 +2444,7 @@
 # enable support for Windows resource files
 AC_DEFUN([AC_LIBTOOL_RC],
 [AC_REQUIRE([LT_AC_PROG_RC])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
 ])# AC_LIBTOOL_RC
 
 
@@ -2544,13 +2536,8 @@
   fi
   ;;
 
-aix4*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
   darwin* | rhapsody*)
-  if test "$GCC" = yes; then
+  if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     case "$host_os" in
     rhapsody* | darwin1.[[012]])
@@ -2560,20 +2547,22 @@
       test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, 
$1)='-flat_namespace -undefined suppress'
       ;;
     esac
-    output_verbose_link_cmd='echo'
+    # FIXME: Relying on posixy $() will cause problems for
+    #        cross-compilation, but unfortunately the echo tests do not
+    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
+    #         `"' quotes if we put them in here... so don't!
+               output_verbose_link_cmd='echo'
     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o 
$lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
-    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle 
$libobjs $deplibs$compiler_flags'
+    _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib 
$libobjs $deplibs$compiler_flags'
     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't 
exist in older darwin ld's
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," 
-e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  
-o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname 
$verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," 
-e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib 
-bundle $libobjs $deplibs$compiler_flags~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
+                 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e 
"s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  
-o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname 
$verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+                 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e 
"s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o 
$lib $libobjs $deplibs$compiler_flags~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
     _LT_AC_TAGVAR(hardcode_direct, $1)=no
     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-  else
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-  fi  
+    fi
     ;;  
 esac
 AC_MSG_RESULT([$enable_shared])
@@ -2739,22 +2728,6 @@
       exp_sym_flag='-Bexport'
       no_entry_flag=""
     else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-       for ld_flag in $LDFLAGS; do
-         case $ld_flag in
-         *-brtl*)
-           aix_use_runtimelinking=yes
-           break
-           ;;
-         esac
-       done
-      esac
-
       exp_sym_flag='-bexport'
       no_entry_flag='-bnoentry'
     fi
@@ -2799,48 +2772,31 @@
        # chokes on -Wl,-G. The following line is correct:
        shared_flag='-G'
       else
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag='${wl}-G'
-       else
-         shared_flag='${wl}-bM:SRE'
-       fi
+        # 
+        # The -qmkshrobj flag correctly exports mangeled c++ names
+        #
+        shared_flag='${wl}-G -qmkshrobj'
       fi
     fi
 
     # It seems that -bexpall does not export symbols beginning with
     # underscore (_), so it is better to generate a list of symbols to export.
-    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-      # Determine the default libpath from the value encoded in an empty 
executable.
-      _LT_AC_SYS_LIBPATH_AIX
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, 
$1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname 
$libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; 
then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag 
\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R 
$libdir:/usr/lib:/lib'
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o 
$output_objdir/$soname $libobjs $deplibs $compiler_flags 
${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag 
\${wl}$exp_sym_flag:\$export_symbols"
-      else
        # Determine the default libpath from the value encoded in an empty 
executable.
        _LT_AC_SYS_LIBPATH_AIX
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, 
$1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-       # Warning - without using the other run time loading flags,
+       # Warning - without using the other run time loading flags, (-brtl) 
        # -berok will link without error, but may produce a broken library.
-       _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-       # -bexpall does not export symbols beginning with underscore (_)
-       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+       _LT_AC_TAGVAR(no_undefined_flag, $1)='-bernotok'
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+
+
        # Exported symbols can be pulled into shared objects from archives
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        # AIX wont look for the .so library without the -brtl flag
+        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=' ${wl}-brtl'
        # This is similar to how AIX traditionally builds it's shared libraries.
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o 
$output_objdir/$soname $libobjs $deplibs $compiler_flags 
${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS 
$output_objdir/$libname$release.a $output_objdir/$soname'
-      fi
-    fi
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o 
$output_objdir/$soname $libobjs $deplibs $compiler_flags 
${wl}-bE:$export_symbols ${wl}-bnoentry ${wl}${allow_undefined_flag}'
     ;;
   chorus*)
     case $cc_basename in
@@ -2876,7 +2832,7 @@
   ;;
 
   darwin* | rhapsody*)
-  if test "$GXX" = yes; then
+   if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
     case "$host_os" in
     rhapsody* | darwin1.[[012]])
@@ -2886,33 +2842,31 @@
       test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, 
$1)='-flat_namespace -undefined suppress'
       ;;
     esac
-    lt_int_apple_cc_single_mod=no
-    output_verbose_link_cmd='echo'
-    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-      lt_int_apple_cc_single_mod=yes
-    fi
-    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module 
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name 
$rpath/$soname $verstring'
-    else
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load 
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib 
$allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags 
-install_name $rpath/$soname $verstring'
-    fi
-    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load 
$allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+       lt_int_apple_cc_single_mod=no
+       output_verbose_link_cmd='echo'
+       if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+         lt_int_apple_cc_single_mod=yes
+       fi
+       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module 
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name 
$rpath/$soname $verstring'
+       else
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load 
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib 
$allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags 
-install_name $rpath/$soname $verstring'
+      fi
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load 
$allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
 
     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't 
exist in older darwin ld's
-    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module 
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name 
$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym 
${lib}'
-    else
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load 
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib 
$allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags 
-install_name $rpath/$soname $verstring~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," 
-e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib 
-bundle $libobjs $deplibs$compiler_flags~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module 
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name 
$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym 
${lib}'
+      else
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load 
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib 
$allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags 
-install_name $rpath/$soname $verstring~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
+      fi
+        _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o 
$lib $libobjs $deplibs$compiler_flags~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
     _LT_AC_TAGVAR(hardcode_direct, $1)=no
     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-  else
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-  fi
+   fi 
     ;;
 
   dgux*)
@@ -3677,9 +3631,6 @@
     postinstall_cmds='$RANLIB $lib'
   fi
   ;;
-aix4*)
-  test "$enable_shared" = yes && enable_static=no
-  ;;
 esac
 AC_MSG_RESULT([$enable_shared])
 
@@ -5192,20 +5143,6 @@
        else
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs 
$convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == 
"B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > 
$export_symbols'
        fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-       esac
-
        exp_sym_flag='-bexport'
        no_entry_flag='-bnoentry'
       fi
@@ -5250,47 +5187,26 @@
        # chokes on -Wl,-G. The following line is correct:
          shared_flag='-G'
        else
-       if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-       fi
+         shared_flag='${wl}-G '
        fi
       fi
 
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to 
export.
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-       # Determine the default libpath from the value encoded in an empty 
executable.
-       _LT_AC_SYS_LIBPATH_AIX
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, 
$1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o 
$output_objdir/$soname $libobjs $deplibs $compiler_flags `if test 
"x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; 
else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols 
$shared_flag"
-       else
-       if test "$host_cpu" = ia64; then
-         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R 
$libdir:/usr/lib:/lib'
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o 
$output_objdir/$soname $libobjs $deplibs $compiler_flags 
${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag 
\${wl}$exp_sym_flag:\$export_symbols"
-       else
         # Determine the default libpath from the value encoded in an empty 
executable.
         _LT_AC_SYS_LIBPATH_AIX
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, 
$1)='${wl}-blibpath:$libdir:'"$aix_libpath"
          # Warning - without using the other run time loading flags,
          # -berok will link without error, but may produce a broken library.
-         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+#        _LT_AC_TAGVAR(no_undefined_flag, $1)='-bernotok'
+#        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
          # -bexpall does not export symbols beginning with underscore (_)
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
          # Exported symbols can be pulled into shared objects from archives
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+          # AIX wont look for the .so library without the -brtl flag
+          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=' ${wl}-brtl'
          # This is similar to how AIX traditionally builds it's shared 
libraries.
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o 
$output_objdir/$soname $libobjs $deplibs $compiler_flags 
${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS 
$output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o 
$output_objdir/$soname $libobjs $deplibs $compiler_flags 
${wl}-bE:$export_symbols ${wl}-bnoentry '
       ;;
 
     amigaos*)
@@ -5327,7 +5243,7 @@
       ;;
 
     darwin* | rhapsody*)
-    if test "$GXX" = yes ; then
+    if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
       case "$host_os" in
       rhapsody* | darwin1.[[012]])
@@ -5337,6 +5253,10 @@
        test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, 
$1)='-flat_namespace -undefined suppress'
        ;;
       esac
+      # FIXME: Relying on posixy $() will cause problems for
+      #        cross-compilation, but unfortunately the echo tests do not
+      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
+      #               `"' quotes if we put them in here... so don't!
        lt_int_apple_cc_single_mod=no
        output_verbose_link_cmd='echo'
        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
@@ -5347,21 +5267,19 @@
        else
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load 
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib 
$allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags 
-install_name $rpath/$soname $verstring'
       fi
-      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load 
$allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load 
$allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't 
exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module 
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name 
$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym 
${lib}'
         else
           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load 
-keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib 
$allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags 
-install_name $rpath/$soname $verstring~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
         fi
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib 
-bundle $libobjs $deplibs$compiler_flags~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    
]*,," -e "s,^\(..*\),_&," < $export_symbols > 
$output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o 
$lib $libobjs $deplibs$compiler_flags~nmedit -s 
$output_objdir/${libname}-symbols.expsym ${lib}'
       _LT_AC_TAGVAR(hardcode_direct, $1)=no
       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-    else  
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
     fi  
       ;;
 
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.339
diff -u -r1.339 ltmain.in
--- ltmain.in   3 Jun 2003 18:20:37 -0000       1.339
+++ ltmain.in   5 Jun 2003 20:33:55 -0000
@@ -1475,8 +1475,21 @@
          arg="\"$arg\""
          ;;
        esac
-       ;;
-
+        # Support for 32-bit and 64-bit ABI in AIX 5
+        # if the user specifies a particular ABI with a compiler flag
+        # use the AIX defined environment variable OBJECT_MODE to export that
+        # setting to NM and AR
+        case $host in
+          powerpc-*aix5*)
+           if test "$arg" = -q64 ; then
+              export OBJECT_MODE=64 ;
+            else
+             if test "$arg" = -q32 ; then
+                export OBJECT_MODE=32 ;
+              fi
+            fi
+        esac
+        ;;
       *.$objext)
        # A standard object.
        objs="$objs $arg"
@@ -1665,7 +1678,15 @@
        ;;
       esac
     fi
-
+#
+# On AIX if the old_libs are not built all links require the -brtl flag 
+#
+    case $host in
+      *aix4.3* | *aix5*)
+        if test "$build_old_libs" = no ; then
+          export_dynamic=yes
+        fi
+    esac
     if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; 
then
       eval arg=\"$export_dynamic_flag_spec\"
       compile_command="$compile_command $arg"

reply via email to

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