Re: libtool issue with latest Sun cc compiler on Linux

2007-02-17 Thread Ralf Wildenhues
* Terry D. Dontje wrote on Fri, Feb 16, 2007 at 08:45:09PM CET:
 Very interesting, I think it is coming from ld look at the following:
[...]
 [EMAIL PROTECTED]:~/tmp/compissue ld --version
 GNU ld version 2.16.91.0.7-amd-sles9 20060317

Thanks, that's what I wanted to know.

Please note that currently, for portability it is necessary that you add
at least one object file to a library.  I'm slowly working towards
lifting this restriction in Libtool (and Automake), but am still a ways
away from it.  Adding such an object is also likely to be more efficient
than the worst-case fix in Libtool: extracting one of the convenience
archives and listing all its objects on the command line.  Note that
while it may be possible to have Libtool add a dummy object itself,
doing this portably is a pain.  I'd be very reluctant to go that route.

I'm removing the /dev/null, as shown below, in HEAD and branch-1-5,
and adding you to THANKS.

Cheers,
Ralf

HEAD:
2007-02-17  Ralf Wildenhues  [EMAIL PROTECTED]

* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [ linux ]
whole_archive_flag_spec: For Sun C/C++ 5.9, do not add
/dev/null as dummy object, it fails with GNU ld version
2.16.91.0.7-amd-sles9.  Report by Terry D. Dontje.
* THANKS: Update.

Index: libltdl/m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.94
diff -u -r1.94 libtool.m4
--- libltdl/m4/libtool.m4   14 Feb 2007 18:55:24 -  1.94
+++ libltdl/m4/libtool.m4   17 Feb 2007 08:14:54 -
@@ -4194,7 +4194,7 @@
esac
case `$CC -V 21 | sed 5q` in
*Sun\ C*)   # Sun C 5.9
- _LT_TAGVAR(whole_archive_flag_spec, 
$1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\\; do 
test -z \$conv\ || new_convenience=\$new_convenience,$conv\; done; $ECHO 
\$new_convenience\` ${wl}--no-whole-archive /dev/null'
+ _LT_TAGVAR(whole_archive_flag_spec, 
$1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\\; do 
test -z \$conv\ || new_convenience=\$new_convenience,$conv\; done; $ECHO 
\$new_convenience\` ${wl}--no-whole-archive'
  tmp_sharedflag='-G' ;;
*Sun\ F*)   # Sun Fortran 8.3
  tmp_sharedflag='-G' ;;

branch-1-5:
2007-02-17  Ralf Wildenhues  [EMAIL PROTECTED]

* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ linux ]
whole_archive_flag_spec: For Sun C/C++ 5.9, do not add
/dev/null as dummy object, it fails with GNU ld version
2.16.91.0.7-amd-sles9.  Report by Terry D. Dontje.
* THANKS: Update.

Index: libtool.m4
===
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.171
diff -u -r1.314.2.171 libtool.m4
--- libtool.m4  11 Feb 2007 13:37:02 -  1.314.2.171
+++ libtool.m4  17 Feb 2007 08:16:28 -
@@ -5691,7 +5691,7 @@
esac
case `$CC -V 21 | sed 5q` in
*Sun\ C*)   # Sun C 5.9
- _LT_AC_TAGVAR(whole_archive_flag_spec, 
$1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\\; do 
test -z \$conv\ || new_convenience=\$new_convenience,$conv\; done; $echo 
\$new_convenience\` ${wl}--no-whole-archive /dev/null'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, 
$1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\\; do 
test -z \$conv\ || new_convenience=\$new_convenience,$conv\; done; $echo 
\$new_convenience\` ${wl}--no-whole-archive'
  tmp_sharedflag='-G' ;;
*Sun\ F*)   # Sun Fortran 8.3
  tmp_sharedflag='-G' ;;




FYI: 1.5.23b release diff

2007-02-17 Thread Ralf Wildenhues
Here's the alpha release diff and the post-release diff.

Cheers,
Ralf

GNU libtool 1.5.23b is released.

* configure.ac: Bump version.  Adjust copyright years.
* NEWS: Updated.
* config.guess, config.sub, install-sh, texinfo.tex, INSTALL:
Updated from external sources.
* libtool.m4: Bump serial.
* ltdl.m4: Likewise.  Adjust copyright years.
* libltdl/Makefile.am: Bump library revision.

Index: NEWS
===
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.109.2.52
diff -u -r1.109.2.52 NEWS
--- NEWS28 Jan 2007 20:24:23 -  1.109.2.52
+++ NEWS17 Feb 2007 08:51:07 -
@@ -1,6 +1,6 @@
 NEWS - list of user-visible changes between releases of GNU Libtool
 
-New in 1.5.23a: 2006-??-??; CVS version 1.5.23a, Libtool team:
+New in 1.5.23b: 2007-02-17; CVS version 1.5.23a, Libtool team:
 * Initial support for RDOS.
 * Fix regression on DragonFly that disabled library hardcoding.
 * Fix regression on OpenBSD, NetBSD, DragonFly, and other systems
Index: config.guess
===
RCS file: /cvsroot/libtool/libtool/Attic/config.guess,v
retrieving revision 1.11.2.15
diff -u -r1.11.2.15 config.guess
--- config.guess15 May 2006 16:32:08 -  1.11.2.15
+++ config.guess17 Feb 2007 08:51:08 -
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
 #   Inc.
 
-timestamp='2006-05-13'
+timestamp='2007-01-15'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -161,6 +161,7 @@
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+   sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -211,7 +212,7 @@
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
 macppc:MirBSD:*:*)
-   echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+   echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
 *:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -780,7 +781,7 @@
 i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
-i*:MINGW*:*)
+*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
 i*:windows32*:*)
@@ -790,10 +791,10 @@
 i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
-x86:Interix*:[345]*)
+x86:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
-EM64T:Interix*:[345]*)
+EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
@@ -831,6 +832,9 @@
 arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+avr32*:Linux:*:*)
+   echo ${UNAME_MACHINE}-unknown-linux-gnu
+   exit ;;
 cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
@@ -947,6 +951,9 @@
 x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
+xtensa:Linux:*:*)
+   echo xtensa-unknown-linux-gnu
+   exit ;;
 i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
@@ -1205,6 +1212,15 @@
 SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+SX-7:SUPER-UX:*:*)
+   echo sx7-nec-superux${UNAME_RELEASE}
+   exit ;;
+SX-8:SUPER-UX:*:*)
+   echo sx8-nec-superux${UNAME_RELEASE}
+   exit ;;
+SX-8R:SUPER-UX:*:*)
+   echo sx8r-nec-superux${UNAME_RELEASE}
+   exit ;;
 Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
Index: config.sub
===
RCS file: /cvsroot/libtool/libtool/Attic/config.sub,v
retrieving revision 1.10.2.15
diff -u -r1.10.2.15 config.sub
--- config.sub  15 May 2006 16:32:08 -  1.10.2.15
+++ config.sub  17 Feb 2007 08:51:08 -
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
 #   Inc.
 
-timestamp='2006-05-13'
+timestamp='2007-01-18'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -241,16 +241,16 @@
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | 
alpha64pca5[67] \
| am33_2.0 \
-   | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+   | arc | arm | arm[bl]e | 

FYI: small HACKING update

2007-02-17 Thread Ralf Wildenhues
I fixed a couple of typos in HACKING.  Also, CVS_RSH is not needed for
pserver.  Also, I added a note to look in README for how to report
verbose test failures.

* HACKING: Update.

Index: HACKING
===
RCS file: /cvsroot/libtool/libtool/HACKING,v
retrieving revision 1.32
diff -u -r1.32 HACKING
--- HACKING 28 Jan 2007 12:43:36 -  1.32
+++ HACKING 17 Feb 2007 09:56:16 -
@@ -493,7 +493,7 @@
 You should download the signature named after any tarball you download,
 and then verify its integrity with, for example:
 
-  gpg --verify [EMAIL PROTECTED]
+  gpg --verify [EMAIL PROTECTED]@.tar.gz.sig
 
 Here are the MD5 and SHA1 checksums:
 
@@ -512,12 +512,11 @@
 but is useable with @COMPATIBLE_AUTOTOOL_VERSIONS@ in your own
 projects.
 
-Alternatively, you can fetch the unbootstrapped sourcecode from
-anonymous cvs by using the following commands:
+Alternatively, you can fetch the unbootstrapped source code from
+anonymous cvs by using the following command:
 
-  $ export CVS_RSH=ssh
   $ cvs -z3 -d :pserver:[EMAIL PROTECTED]:/sources/libtool \
-  co -r @CVS_RELEASE_TAG@ libtool
+co -r @CVS_RELEASE_TAG@ libtool
 
 You will then need to have recent (possibly as yet unreleased) versions
 of Automake and Autoconf installed to bootstrap the checked out
@@ -529,6 +528,7 @@
 
 Please report bugs to bug-libtool@gnu.org, along with the verbose
 output of any failed test groups, and the output from `./libtool --config.'
+The README file explains how to capture the verbose test output.
 
 
 
@@ -580,7 +580,7 @@
 You should download the signature named after any tarball you download,
 and then verify its integrity with, for example:
 
-  gpg --verify [EMAIL PROTECTED]
+  gpg --verify [EMAIL PROTECTED]@.tar.gz.sig
 
 Here are the MD5 and SHA1 checksums:
 
@@ -597,13 +597,12 @@
 but is useable with @COMPATIBLE_AUTOTOOL_VERSIONS@ in your own
 projects.
 
-Alternatively, you can fetch the unbootstrapped sourcecode from
-anonymous cvs by using the following commands (just hit return when
+Alternatively, you can fetch the unbootstrapped source code from
+anonymous cvs by using the following command (just hit return when
 you are prompted for the password):
 
-  $ export CVS_RSH=ssh
   $ cvs -z3 -d :pserver:[EMAIL PROTECTED]:/sources/libtool \
-  co -r @CVS_RELEASE_TAG@ libtool
+co -r @CVS_RELEASE_TAG@ libtool
 
 You will then need to have the latest release versions of Automake
 (@AUTOMAKE_VERSION@) and Autoconf (@AUTOCONF_VERSION@) installed to
@@ -611,6 +610,7 @@
 
 Please report bugs to bug-libtool@gnu.org, along with the verbose
 output of any failed test groups, and the output from `./libtool --config.'
+The README file explains how to capture the verbose test output.
 
 
 -- 




FYI: fix DT_RUNPATH detection code again

2007-02-17 Thread Ralf Wildenhues
Sigh, I don't know what I was thinking when I wrote this.
Trying the Sun CC compiler (where $wl contains two words)
made the glitch obvious, by outputting an ugly error during
configure.

Applied to HEAD, does not exist in branch-1-5.

Cheers,
Ralf

2007-02-17  Ralf Wildenhues  [EMAIL PROTECTED]

* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [ linux |
k*bsd*-gnu ]: Fix eval quoting in the DT_RUNPATH test.

Index: libltdl/m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.95
diff -u -r1.95 libtool.m4
--- libltdl/m4/libtool.m4   17 Feb 2007 08:22:59 -  1.95
+++ libltdl/m4/libtool.m4   17 Feb 2007 15:13:51 -
@@ -2316,8 +2316,8 @@
   # Some binutils ld are patched to set DT_RUNPATH 
   save_LDFLAGS=$LDFLAGS
   save_libdir=$libdir
-  eval libdir=/foo wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) \
-   LDFLAGS=\\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\
+  eval libdir=/foo; wl=\$_LT_TAGVAR(lt_prog_compiler_wl, $1)\; \
+   LDFLAGS=\\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\
   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2/dev/null | grep 
RUNPATH.*$libdir],
[shlibpath_overrides_runpath=yes])])




FYI: update XFAIL state

2007-02-17 Thread Ralf Wildenhues
The build tree relpaths happens to not fail on AIX, HP-UX/PA, Interix,
and OpenBSD, and the preserve duplicate convenience deps happens to
not fail on AIX.  Otherwise those two tests are XFAILS, as the
functionality hasn't been properly implemented.

The small issue here is that if test 49 runs them inside, the XPASS will
generate a nonzero exit status.  Which is kind of unhelpful.  So I'm
adding the following to omit this false failure.  There are enough real
failures, let's concentrate on those.

Cheers,
Ralf

2007-02-17  Ralf Wildenhues  [EMAIL PROTECTED]

* tests/deplibs-ident.at [aix, hppa*-*-hpux*, interix, openbsd]:
Do not XFAIL, on these systems we happen to pass.
* tests/duplicate_deps.at [aix]: Likewise.

Index: tests/deplibs-ident.at
===
RCS file: /cvsroot/libtool/libtool/tests/deplibs-ident.at,v
retrieving revision 1.5
diff -u -r1.5 deplibs-ident.at
--- tests/deplibs-ident.at  6 Feb 2007 19:02:27 -   1.5
+++ tests/deplibs-ident.at  17 Feb 2007 15:16:00 -
@@ -61,7 +61,10 @@
   AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b b.$OBJEXT 
../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere],
   [0],[stdout],[ignore])
   AT_CHECK([$EGREP 'cee.*cee' stdout], 1, [ignore], [ignore])
-  AT_XFAIL_IF([case $host_os in aix*|interix*) false;; *):;; esac])
+  AT_XFAIL_IF([case $host in
+ *-*-aix*|hppa*-*-hpux*|*-*-interix*|*-*-openbsd*) false;;
+ *):;;
+   esac])
   dnl This is currently broken in libtool
 )
 
Index: tests/duplicate_deps.at
===
RCS file: /cvsroot/libtool/libtool/tests/duplicate_deps.at,v
retrieving revision 1.1
diff -u -r1.1 duplicate_deps.at
--- tests/duplicate_deps.at 17 Sep 2006 20:02:15 -  1.1
+++ tests/duplicate_deps.at 17 Feb 2007 15:16:00 -
@@ -55,7 +55,7 @@
 LT_AT_EXEC_CHECK([./main])
 
 # This currently fails:
-AT_XFAIL_IF([:])
+AT_XFAIL_IF([case $host_os in aix*) false;; *) :;; esac])
 $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo
 AT_CHECK([$LIBTOOL --mode=link --preserve-dup-deps --tag=CC \
  $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT liba.la libb.la liba.la],




Re: preparing for 1.5.24

2007-02-17 Thread Peter O'Gorman


On Feb 17, 2007, at 6:54 PM, Ralf Wildenhues wrote:


Hi Peter, Tim, all,

* Peter O'Gorman wrote on Sun, Feb 11, 2007 at 01:20:24PM CET:

On Feb 11, 2007, at 7:24 PM, Ralf Wildenhues wrote:


Should we rather do a real prerelease, so it's archived on
alpha.gnu.org,[...]


This is good news, and great work. I'm pretty sure finch can handle
the load and bandwidth, so I think it is up to you, but I would not
bother with a formal alpha.


I've looked at the snapshot.  It uses Automake 1.9.6 and Autoconf
2.60.  Since I'd rather use 1.10 and 2.61 for 1.5.24, I preferred a
formal alpha.  I've now adjusted the URL for the branch-1-5 snapshot
to contain the string 1.5.23c in the name.  I assume the switch will
happen automatically with the next build?


Looks like I was on the ball the day I wrote that script, yeah, it  
handles the version change without modification.


Peter





Re: preparing for 1.5.24

2007-02-17 Thread Charles Wilson

Ralf Wildenhues wrote:

I would like to release 1.5.24 as soon as possible.  I've flushed my
queue now, except for the patch I just posted and whatever w32 changes
are still needed.



FWIW, I've done a test run of branch-1-5, here's some results:

PASS  SKIP  FAIL  config.guess  compiler used   notes

110 1 1   i686-pc-cygwingcc, g++, g77   fail: mdemo2-make


confirmed (1.5.23c, about two hours ago). I've diagnosed the reason and 
have a patch -- but I'm not sure if it should be applied.  I don't 
consider this a showstopper for 1.5.24, regardless of whether the 
attached patch is accepted or not.



- It would help me greatly if someone could look into the Cygwin and
  MinGW mdemo* failures; and documentation updates if needed.


I believe the mdemo2 failure on cygwin is another ripple from the ltdl 
declspec() change.  mlib uses libltdlc as convenience library, so when 
linking cygmlib-0.dll there exist symbols (lt_*) that are declared 
declspec(dllexport) -- so autoexport is turned off.  However, the 
symbols in mlib.c are NOT marked in that way (see mdemo/README snippet, 
[1]), so without autoexport, the output dll contains only lt_* symbols 
-- and mlib_func is missing.


Solution in this case is to turn auto-export back on (earlier 
suggestions conerning define LT_SCOPE before #inluding ltdl.h won't 
work, because we're linking in the ltdl.o object that was already built 
as PIC (==-DDLL_EXPORT), and LT_SCOPE has already ended up as 
declspec(dllexport) in that ltdl.o.


It'd be nice to be able to say whenever libltdl is used as a 
convenience library to build a DLL, on windows libtool should 
automatically turn on --export-all-symbols.  But that isn't true: if 
the target DLL is already doing explicit declspec(dllexport), then (1) 
the target library would work, today, without any changes, and (2) we 
don't want to override that target DLL's explicit export settings by 
saying, no, I'm going to export everything.


So, I'm not sure how to solve this, in a way that is platform-agnostic. 
(short of undoing the -DDLL_EXPORT change, like Ralf wants to.  But I 
won't rehash that argument, except to say that this problem would 
persist on mingw even if we fixed cygwin in that way)


A non-platform-agnostic mechanism could be described as:


When building a DLL on Windows (==MinGW,Cygwin) that uses libltdl as a 
convenience archive, you must do one of two things:

  (1) explicitly mark as declspec(dllexport) all symbols in _your_
  library that should be exported when building your library's
  source code -- but do NOT mark them dllexport when building
  clients; this procedure will require much macro magic in
  your library's public header files, or
  (2) use the (win32-specific) linker option
   -Xlinker --export-all-symbols
  to restore the expected auto-export behavior on windows.
  This will require some configure magic, as other platforms'
  linkers will not recognize this option. See mdemo/configure.ac
  and mdemo/Makefile.am for an example.


I used #2 in the attached patch, for the mdemo/mdemo2 issue.

FWIW, it doesn't appear that libtool's -export-dynamic will do the right 
thing here.  I thought about setting export_dynamic_flag_spec to 
'${wl}--export-all-symbols' for mingw/cygwin (currently, they inherit 
the generic '${wl}--export-dynamic' setting [3]), and then using 
'-export-dynamic' in libmlib_la_LDFLAGS for all platforms.


But I'm nervous about changing the definition of 
export_dynamic_flag_spec -- because that would have wide-ranging 
effects.  Esepcially in a release candidate, and especially especially 
in the RC for the last-ever 1.5.x libtool.



Anyway, with the attached patch, all tests pass on cygwin.

--
Chuck

[1] mdemo README:
Note that on Windows, for the purposes of illustrating ltdl, the
libraries *are* built as dll's, but do not have the __declspec
machinery to make them suitable for loading at link time.  This is
only for clarity inside this example, look at the example in ../demo
to see how the __declspec macros should be set up.

[2] BTW, ../demo does not set up any __declspec macros. I believe the 
readme snippet above is really old, and pre-dates 
auto-export/auto-import functionality.  At best, this snippet is now 
specific only to non-gcc on Windows, which is at present only barely 
supported in libtool-1.5.x anyway.  Notwithstanding my reference to this 
snippet in the context of libltdl-as-convenience-lib, I think this 
snippet should be deleted entirely.


[3] I'm not sure, but it looks like cygwin's ld simply ignores 
--export-dynamic.  From a brief look at the bfd/ld source code, this ld 
option seems to be ELF-specific.



2007-02-17  Charles Wilson  ...

* mdemo/configure.ac: add platform-specific