FYI: branch-1-5: SCO/bugfix patch 7 of 10: Improve SCO platform support

2005-11-13 Thread Ralf Wildenhues
Hi Kean,

* Kean Johnston wrote on Sat, Nov 12, 2005 at 07:15:24PM CET:
 Since this is really for a dying libtool branch, what the heck, repost
 as above.  At least it would match your usage pattern with
 -absolute-soname, too.
 
 Ok attached please find the revised patch. I was unable to
 avoid the test in the setting of hardcode_libdir_flag_spec
 but I think you'll agree this looks a great deal cleaner.

OK, thanks.  Yes, that's better.  I had thought to avoid the extra
quoting `\$SCOABSPATH' so that it would be invisible to the user from
the libtool output, but the way that is now is ok with me.  However,
it's a good idea not to carry this into CVS HEAD for another reason:
Sometime after 2.0 I may want to reform the quoting stuff a bit, both
to allow file names with spaces and possibly for efficiency.  Above
may not work any more then.


I went over the patch once, and installed it after a few small
modifications:
- use `test' instead of `[ ]'
- reformat comments a bit, fix typo execurity - security
- fixed quoting of allow_undefined_flag (use single quotes so the
  expansion occurs in libtool, not in configure).

A couple of open questions remain:
- was the quoting for allow_undefined_flag different on purpose
  (i.e., because of some bug in ltmain)?
- the archive_cmds and archive_expsyms_cmds do not make use of
  allow_undefined_flag at all (they used to do so before),
  that makes its setting ineffective.
  Could you be bothered to post a followup patch to fix this
  (including ChangeLog entry, if possible)?

Here's what I installed.  In a followup patch, I'll remove the
now-unnecessary cruft from AC_LIBTOOL_LANG_C_CONFIG.  :)

Cheers, and thank you,
Ralf

2005-11-13  Kean Johnston  [EMAIL PROTECTED],
Tim Rice [EMAIL PROTECTED]

* libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER)
(AC_DEPLIBS_CHECK_METHOD, AC_LIBTOOL_LANG_C_CONFIG)
(AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_PROG_COMPILER_PIC)
(AC_LIBTOOL_PROG_LD_SHLIBS)
[ sco3.2v5, sysv4, sysv4.3, sysv5, sco3.2v5, sco5v6, unixware,
OpenUNIX, sysv4*uw2 ]: Complete overhaul of SCO support.
* THANKS: Updated.

Index: THANKS
===
RCS file: /cvsroot/libtool/libtool/THANKS,v
retrieving revision 1.34.2.12
diff -u -r1.34.2.12 THANKS
--- THANKS  4 Nov 2005 16:46:54 -   1.34.2.12
+++ THANKS  13 Nov 2005 17:32:59 -
@@ -59,6 +59,7 @@
   Noah Jeffrey Misch   [EMAIL PROTECTED] 2004-07-05
   Thorsten Glaser  [EMAIL PROTECTED] 
2004-10-11 
   Peter Ekberg [EMAIL PROTECTED] 2005-04-12
+  Tim Rice [EMAIL PROTECTED] 2005-11-10
 
 
 * The following additional people made especially gracious contributions of
@@ -105,7 +106,6 @@
   Steven M. Schultz[EMAIL PROTECTED]
   Sven Verdoolaege [EMAIL PROTECTED]
   Tim Mooney   [EMAIL PROTECTED]
-  Tim Rice [EMAIL PROTECTED]
   Todd Vierling[EMAIL PROTECTED]
   Tom Tromey   [EMAIL PROTECTED]
   Tor Lillqvist[EMAIL PROTECTED]
Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.132
diff -u -r1.314.2.132 libtool.m4
--- libtool.m4  13 Nov 2005 15:09:27 -  1.314.2.132
+++ libtool.m4  13 Nov 2005 17:21:14 -
@@ -1657,13 +1657,6 @@
   sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix 
${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
 solaris*)
   version_type=linux
   need_lib_prefix=no
@@ -1689,7 +1682,7 @@
   need_version=yes
   ;;
 
-sysv4 | sysv4.2uw2* | sysv4.3*)
+sysv4 | sysv4.3*)
   version_type=linux
   library_names_spec='${libname}${release}${shared_ext}$versuffix 
${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
@@ -1722,17 +1715,27 @@
   fi
   ;;
 
-sysv5*)
-  version_type=linux
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix 
${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix 
${libname}${release}${shared_ext} $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  if test 

Re: FYI: branch-1-5: SCO/bugfix patch 7 of 10: Improve SCO platform support

2005-11-13 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Sun, Nov 13, 2005 at 08:06:42PM CET:
 * Kean Johnston wrote on Sat, Nov 12, 2005 at 07:15:24PM CET:
  
  Ok attached please find the revised patch.
 
 A couple of open questions remain:
 - was the quoting for allow_undefined_flag different on purpose
   (i.e., because of some bug in ltmain)?
 - the archive_cmds and archive_expsyms_cmds do not make use of
   allow_undefined_flag at all (they used to do so before),
   that makes its setting ineffective.
   Could you be bothered to post a followup patch to fix this
   (including ChangeLog entry, if possible)?

Another one (sorry, I thought I had it listed):

- You change shlibpath_overrides_runpath depending on the linker.
  This makes little sense, as this is a rtld feature, not a ld one.
  Is there a rationale to this?

Cheers,
Ralf




Re: FYI: branch-1-5: SCO/bugfix patch 7 of 10: Improve SCO platform support

2005-11-13 Thread Kean Johnston

OK, thanks.  Yes, that's better.  I had thought to avoid the extra
quoting `\$SCOABSPATH' so that it would be invisible to the user from
the libtool output, but the way that is now is ok with me.  However,
it's a good idea not to carry this into CVS HEAD for another reason:
Sometime after 2.0 I may want to reform the quoting stuff a bit, both
to allow file names with spaces and possibly for efficiency.  Above
may not work any more then.

Right, ans I'm sure we will craft an entirely different mechanism
for supporting absolute pathnames.


A couple of open questions remain:
- was the quoting for allow_undefined_flag different on purpose
  (i.e., because of some bug in ltmain)?

Almost certainly not. Most likely just habbit. I'll check to make
sure though.


- the archive_cmds and archive_expsyms_cmds do not make use of
  allow_undefined_flag at all (they used to do so before),
  that makes its setting ineffective.
  Could you be bothered to post a followup patch to fix this
  (including ChangeLog entry, if possible)?

Absolutely. I think it was an oversight, but I will test and
make sure and ocrrect it.


Here's what I installed.  In a followup patch, I'll remove the

Most excelent, thank you Ralf.

Kean




Re: FYI: branch-1-5: SCO/bugfix patch 7 of 10: Improve SCO platform support

2005-11-13 Thread Kean Johnston

- You change shlibpath_overrides_runpath depending on the linker.
  This makes little sense, as this is a rtld feature, not a ld one.
  Is there a rationale to this?

Yes indeed :)

And the interpretation of LD_LIBRARY_PATH is an RTLD feature,
but both the SVR4 and GNU ld use it during actual library creation.
See the man page Tim pointed you at, and the code in
binutils/ld/emultempl/elf32.em. The reason it changes based on
link editor is that the SVR4/OSR5 ld looks at LD_LIBRARY_PATH
first, then at any DT_RUNPATH or DT_RPATH entries its found
along the way. In GNU ld, that order is reversed, hence with
GNU ld, setting LD_LIBRARY_PATH really doesn't override
DT_RUNPATH whereas on OSR5/SVR4, it really does. Without this,
two tests, I believe the rebuild ones, fail, and tell you to
set shlibpath_overrides_runpath to no (when using GNU ld).

Kean