[PATCH] tests: fix $EXEEXT typo.
Hi! I have pushed the below as obvious. Cheers, Peter >From 89986f448ced00ac213ec1e54fef7a146804caea Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Thu, 14 Oct 2010 14:19:21 +0200 Subject: [PATCH] tests: fix $EXEEXT typo. * tests/depdemo-relink.test (func_restore_files): Use $EXEEXT instead of $EXEXT. Signed-off-by: Peter Rosin --- ChangeLog |6 ++ tests/depdemo-relink.test |8 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0492fe..22b175d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-14 Peter Rosin + + tests: fix $EXEEXT typo. + * tests/depdemo-relink.test (func_restore_files): Use $EXEEXT + instead of $EXEXT. + 2010-10-04 Peter Rosin cwrapper: split long lines when dumping the wrapper script. diff --git a/tests/depdemo-relink.test b/tests/depdemo-relink.test index dab51b3..cf5c695 100755 --- a/tests/depdemo-relink.test +++ b/tests/depdemo-relink.test @@ -31,10 +31,10 @@ func_restore_files () test "`echo _fnord/temp/libs/*`" = "_fnord/temp/libs/*" \ || mv -f _fnord/temp/libs/* "l3/$objdir" mv -f "_fnord/temp/libl3.la" "l3" -test -f "_fnord/temp/lt-depdemo$EXEXT" \ - && mv -f "_fnord/temp/lt-depdemo$EXEXT" "$objdir" -test -f "_fnord/temp/depdemo$EXEXT" \ - && mv -f "_fnord/temp/depdemo$EXEXT" "$objdir" +test -f "_fnord/temp/lt-depdemo$EXEEXT" \ + && mv -f "_fnord/temp/lt-depdemo$EXEEXT" "$objdir" +test -f "_fnord/temp/depdemo$EXEEXT" \ + && mv -f "_fnord/temp/depdemo$EXEEXT" "$objdir" rm -rf "_fnord" } -- 1.7.1
Fix linking from only convenience archives with gfortran on Darwin. (was: [libtool 2.2.10] testsuite: 28 29 102 failed)
* Ralf Wildenhues wrote on Wed, Oct 13, 2010 at 08:35:52PM CEST: > > Thanks for the report. The failures are fairly benign, the only real > > issue being that the GNU Fortran compiler version on your system doesn't > > like being handed convenience archives but no plain objects on the > > command line: > > > > * Paul Laight wrote on Mon, Aug 23, 2010 at 01:27:07PM CEST: > > > ./convenience.at:151: $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS > > > $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist > > > stderr: > > > i686-apple-darwin8-gfortran-4.2: no input files; unwilling to write > > > output files > > > stdout: > > > libtool: link: gfortran -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o > > > .libs/liba12.0.dylib -Wl,-force_load,./.libs/liba1.a > > > -Wl,-force_load,./.libs/liba2.a -install_name > > > /notexist/liba12.0.dylib -compatibility_version 1 -current_version 1.0 > > > -Wl,-single_module > > > ./convenience.at:151: exit code was 1, expected 0 > > > 28. convenience.at:109: 28. F77 convenience archives > > > (convenience.at:109): FAILED (convenience.at:151) Looking at this again, it isn't the gfortran version that differs here from other reports where test doesn't fail, but rather the system: it fails on darwin because $whole_archive_flag_spec doesn't pass any archive names without -Wl,... prefix, which in turn makes gfortran think there is a problem. The actual issue seems to be present even in current GCC. The following patch should fix this. Paul, any chance you could try out the patch on your system? OK to add your name&email to THANKS? OK to commit? (I do have access to a darwin system, but no gfortran installed there, so I cannot test this.) Thanks, Ralf Fix linking from only convenience archives with gfortran on Darwin. * libltdl/m4/libtool.m4 (_LT_DARWIN_LINKER_FEATURES): Update macro comment header. [darwin, F77, FC] : Set to yes if whole_archive_flag_spec is nonempty. Fixes convenience.at test suite failures with gfortran 4.2 on Darwin. * THANKS: Update. Report by Paul Laight. diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 5c4e29c..de417b6 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -1035,8 +1035,8 @@ _LT_EOF ]) -# _LT_DARWIN_LINKER_FEATURES -# -- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# - # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1047,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' +m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi
Re: bindir.at takes forever.
[ moving from libtool@ to -patches ] Hi Dave, * Dave Korn wrote on Sun, Oct 03, 2010 at 01:15:46PM CEST: > On 28/09/2010 21:36, Ralf Wildenhues wrote: > > * Peter Rosin wrote on Tue, Sep 28, 2010 at 02:28:48PM CEST: > >> I have been looking at the loops in tests/bindir.at and I see > >> this: > > > > bindir.at has several problems. > > Argh. Sorry for the mess, it's the first and only libtool test I've ever > written and I didn't have much to go on except copying from the others that > seemed nearest what I wanted to do. It certainly wouldn't hurt to cut down > that inner loop down to a half or third of what it currently tests, I was just > erring on the side of thoroughness. Cool. And no need to apologize, those are all things we should have caught during review, or we can just fix now. It's great that you have provided a test case at all! Anyway, here we go with bindir cleanup. I have tested the following couple of patches on native MinGW, Cygwin, GNU/Linux, and AIX (where it fixes a spurious testsuite failure), as well as a GNU/Linux -> MinGW cross. All pass the bindir tests now. Changes over the previous patch version: - removed some loop iterations in the inner test, for efficiency, to address Peter's report, - correctly SKIP the test if tempdir creation fails. OK to commit both patches? Thanks, Ralf tests: remove unneeded 'bindir compile check' test. * tests/bindir.at (bindir compile check): Remove. diff --git a/tests/bindir.at b/tests/bindir.at index 40e67cc..ebe1baa 100644 --- a/tests/bindir.at +++ b/tests/bindir.at @@ -1,6 +1,6 @@ # bindir.at - Test the -bindir option # -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010 Free Software Foundation, Inc. # Written by Dave Korn, 2009 # # This file is part of GNU Libtool. @@ -58,25 +58,8 @@ # statement in libtool.m4sh around where the 'tdlname' variable is set. -# Verify compiling works, and skip remaining tests if not. -# - -AT_SETUP([bindir compile check]) - -AT_DATA([simple.c] ,[[ -int main() { return 0;} -]]) - -$CC $CPPFLAGS $CFLAGS -o simple simple.c || noskip=false -rm -f simple - -AT_CHECK([$noskip || (exit 77)]) - -AT_CLEANUP - - -# Now run the tests themselves. First a simple test that we can -# build and run an executable with a couple of tiny libraries. +# First a simple test that we can build and run an executable with a couple of +# tiny libraries. AT_SETUP([bindir basic lib test]) Fix bindir check logic, and relax non-bindir case for AIX. * tests/bindir.at (bindir install tests): Rewrite checks for place of the installed shared library in two separate tests, depending on whether -bindir is supposed to have an effect or not. In the positive case, make the test stricter so that we reject libraries in $libdir. In the negative case, do not require a major version number in the $libdir file name, for AIX without runtimelinking. If tmpdir creation fails, skip the test. Use fewer bindir directory names for testing, to speed up the test. Report by Peter Rosin. diff --git a/tests/bindir.at b/tests/bindir.at index ebe1baa..3fa185c 100644 --- a/tests/bindir.at +++ b/tests/bindir.at @@ -138,14 +138,14 @@ AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LD # here, that will be covered by the later tests; we've rpath'd things # so that they can all be run in situ. -LT_AT_NOINST_EXEC_CHECK([$LIBTOOL], [], [0], [ignore], [ignore], [--mode=execute ./main$EXEEXT]) +LT_AT_NOINST_EXEC_CHECK([./main]) # Ensure libraries can be found on PATH, if we are on one # of the affected platforms, before testing the shared version. func_save_and_prepend_path $curdir/$objdir $bindirneeded && { - LT_AT_NOINST_EXEC_CHECK([$LIBTOOL], [], [0], [ignore], [ignore], [--mode=execute $objdir/main$EXEEXT]) + LT_AT_NOINST_EXEC_CHECK([$objdir/main]) } # In fact, prepending the PATH as above is superfluous on the windows @@ -182,7 +182,7 @@ case "$host_os" in esac eval "`$LIBTOOL --config | grep '^build_libtool_libs='`" -AT_CHECK([test "$build_libtool_libs" = yes || (exit 77)]) +AT_CHECK([test "$build_libtool_libs" = yes || exit 77]) # These routines save the PATH before a test and restore it after, @@ -275,7 +275,11 @@ do # 'libfoo-0.dll', or 'libfoo.so.0'. We'll simplify this check by taking advantage # of the fact that if it's a DLL, it has to go in bindir, so we'll not check for # both forms in libdir. - AT_CHECK([$bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null], [], [ignore], [ignore]) + if $bindirneeded; then +AT_CHECK([test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0*], [], [ignore], [ignore]) + else +AT_CHECK([ls $libdir/*foo*], [], [ignore], [ignore]) + fi # And that it can be executed. extrapath= @@ -287,18 +291,10 @@ do for
Re: Fix linking from only convenience archives with gfortran on Darwin.
On 10/14/2010 02:27 PM, Ralf Wildenhues wrote: The following patch should fix this. Paul, any chance you could try out the patch on your system? OK to add your name&email to THANKS? OK to commit? (I do have access to a darwin system, but no gfortran installed there, so I cannot test this.) Hi Ralf, With this patch, and make check TESTS= TESTSUITEFLAGS="-k convenience", I get: ... 33: C convenience archives ok 34: C++ convenience archivesok 35: F77 convenience archivesok 36: FC convenience archives ok ... Java conveninece archives failed, I think that's a bug in my install of gcc, will check. Ok with me to commit this. Peter
Re: Fix linking from only convenience archives with gfortran on Darwin.
Hi Peter, thanks for the quick feedback! * Peter O'Gorman wrote on Thu, Oct 14, 2010 at 10:49:00PM CEST: > On 10/14/2010 02:27 PM, Ralf Wildenhues wrote: > > >The following patch should fix this. Paul, any chance you could try out > >the patch on your system? OK to add your name&email to THANKS? > > > >OK to commit? (I do have access to a darwin system, but no gfortran > >installed there, so I cannot test this.) > With this patch, and make check TESTS= TESTSUITEFLAGS="-k > convenience", I get: > ... > 33: C convenience archives ok > 34: C++ convenience archivesok > 35: F77 convenience archivesok > 36: FC convenience archives ok Do these last two fail without the patch tho? If not, which gfortran version do you have, and what is ./libtool --tag=FC --config ? Thanks, Ralf
Re: bindir.at takes forever.
Den 2010-10-14 21:48 skrev Ralf Wildenhues: > [ moving from libtool@ to -patches ] > > Hi Dave, > > * Dave Korn wrote on Sun, Oct 03, 2010 at 01:15:46PM CEST: >> On 28/09/2010 21:36, Ralf Wildenhues wrote: >>> * Peter Rosin wrote on Tue, Sep 28, 2010 at 02:28:48PM CEST: I have been looking at the loops in tests/bindir.at and I see this: >>> >>> bindir.at has several problems. >> >> Argh. Sorry for the mess, it's the first and only libtool test I've ever >> written and I didn't have much to go on except copying from the others that >> seemed nearest what I wanted to do. It certainly wouldn't hurt to cut down >> that inner loop down to a half or third of what it currently tests, I was >> just >> erring on the side of thoroughness. > > Cool. And no need to apologize, those are all things we should have > caught during review, or we can just fix now. It's great that you have > provided a test case at all! > > Anyway, here we go with bindir cleanup. I have tested the following > couple of patches on native MinGW, Cygwin, GNU/Linux, and AIX (where it > fixes a spurious testsuite failure), as well as a GNU/Linux -> MinGW > cross. All pass the bindir tests now. > > Changes over the previous patch version: > - removed some loop iterations in the inner test, for efficiency, to > address Peter's report, > - correctly SKIP the test if tempdir creation fails. > > OK to commit both patches? Thanks for doing this! I have one minor nit with these patches which I have included inline. Other than that, the patches seem to cut the test time in about half. Still long, but this shaves off many minutes. BTW, the bindir tests still pass on MSYS/MSVC. *snip* > Fix bindir check logic, and relax non-bindir case for AIX. > > * tests/bindir.at (bindir install tests): Rewrite checks for > place of the installed shared library in two separate tests, > depending on whether -bindir is supposed to have an effect or > not. In the positive case, make the test stricter so that we > reject libraries in $libdir. In the negative case, do not > require a major version number in the $libdir file name, for AIX > without runtimelinking. If tmpdir creation fails, skip the > test. Use fewer bindir directory names for testing, to speed > up the test. > Report by Peter Rosin. > > diff --git a/tests/bindir.at b/tests/bindir.at > index ebe1baa..3fa185c 100644 > --- a/tests/bindir.at > +++ b/tests/bindir.at > @@ -138,14 +138,14 @@ AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC -o > main$EXEEXT $CPPFLAGS $CFLAGS $LD > # here, that will be covered by the later tests; we've rpath'd things > # so that they can all be run in situ. > > -LT_AT_NOINST_EXEC_CHECK([$LIBTOOL], [], [0], [ignore], [ignore], > [--mode=execute ./main$EXEEXT]) > +LT_AT_NOINST_EXEC_CHECK([./main]) > > # Ensure libraries can be found on PATH, if we are on one > # of the affected platforms, before testing the shared version. > > func_save_and_prepend_path $curdir/$objdir > $bindirneeded && { > - LT_AT_NOINST_EXEC_CHECK([$LIBTOOL], [], [0], [ignore], [ignore], > [--mode=execute $objdir/main$EXEEXT]) > + LT_AT_NOINST_EXEC_CHECK([$objdir/main]) > } > > # In fact, prepending the PATH as above is superfluous on the windows > @@ -182,7 +182,7 @@ case "$host_os" in > esac > > eval "`$LIBTOOL --config | grep '^build_libtool_libs='`" > -AT_CHECK([test "$build_libtool_libs" = yes || (exit 77)]) > +AT_CHECK([test "$build_libtool_libs" = yes || exit 77]) > > > # These routines save the PATH before a test and restore it after, > @@ -275,7 +275,11 @@ do ># 'libfoo-0.dll', or 'libfoo.so.0'. We'll simplify this check by taking > advantage Can you please throw in 'foo-0.dll' in the sentence that ends in the beginning of the above line? ># of the fact that if it's a DLL, it has to go in bindir, so we'll not > check for ># both forms in libdir. > - AT_CHECK([$bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls > $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null], > [], [ignore], [ignore]) > + if $bindirneeded; then > +AT_CHECK([test -f $libdir/../bin/???foo-0.dll || ls > $libdir/../bin/*foo*0*], [], [ignore], [ignore]) > + else > +AT_CHECK([ls $libdir/*foo*], [], [ignore], [ignore]) > + fi > *snip* Cheers, Peter
Re: Fix linking from only convenience archives with gfortran on Darwin.
On 10/14/2010 04:19 PM, Ralf Wildenhues wrote: Hi Peter, thanks for the quick feedback! * Peter O'Gorman wrote on Thu, Oct 14, 2010 at 10:49:00PM CEST: On 10/14/2010 02:27 PM, Ralf Wildenhues wrote: The following patch should fix this. Paul, any chance you could try out the patch on your system? OK to add your name&email to THANKS? OK to commit? (I do have access to a darwin system, but no gfortran installed there, so I cannot test this.) With this patch, and make check TESTS= TESTSUITEFLAGS="-k convenience", I get: ... 33: C convenience archives ok 34: C++ convenience archivesok 35: F77 convenience archivesok 36: FC convenience archives ok Do these last two fail without the patch tho? If not, which gfortran version do you have, and what is ./libtool --tag=FC --config ? Yes, they fail without the patch. Peter
Re: bindir.at takes forever.
* Peter Rosin wrote on Thu, Oct 14, 2010 at 11:32:20PM CEST: > Den 2010-10-14 21:48 skrev Ralf Wildenhues: > > Changes over the previous patch version: > > - removed some loop iterations in the inner test, for efficiency, to > > address Peter's report, > > - correctly SKIP the test if tempdir creation fails. > > > > OK to commit both patches? > > Thanks for doing this! I have one minor nit with these patches which > I have included inline. Other than that, the patches seem to cut the > test time in about half. Still long, but this shaves off many minutes. > > BTW, the bindir tests still pass on MSYS/MSVC. Cool, thanks for the review. I have squashed in this incremental diff before pushing. Cheers, Ralf diff --git a/ChangeLog b/ChangeLog index 379e609..b071b92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,7 +9,7 @@ require a major version number in the $libdir file name, for AIX without runtimelinking. If tmpdir creation fails, skip the test. Use fewer bindir directory names for testing, to speed - up the test. + up the test. Also mention MSVC style DLL name in comment. Report by Peter Rosin. tests: remove unneeded 'bindir compile check' test. diff --git a/tests/bindir.at b/tests/bindir.at index 3fa185c..4e2fecc 100644 --- a/tests/bindir.at +++ b/tests/bindir.at @@ -271,10 +271,10 @@ do AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir], [], [ignore], [ignore]) AT_CHECK([$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT], [], [ignore], [ignore]) - # And ensure it went where we expect. Could be looking for any of 'cygfoo-0.dll', - # 'libfoo-0.dll', or 'libfoo.so.0'. We'll simplify this check by taking advantage - # of the fact that if it's a DLL, it has to go in bindir, so we'll not check for - # both forms in libdir. + # And ensure it went where we expect. Could be looking for any of + # 'cygfoo-0.dll', 'libfoo-0.dll', 'foo-0.dll', or 'libfoo.so.0'. We'll + # simplify this check by taking advantage of the fact that if it's a DLL, + # it has to go in bindir, so we'll not check for both forms in libdir. if $bindirneeded; then AT_CHECK([test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0*], [], [ignore], [ignore]) else
libtool-next patch queue
Hi Gary, I promised I would look at your patch queue for rewriting bootstrap. You pushed it to the libtool-next branch, so let me go through the patches in that queue in order (re-stating this so everybody is on the same page here, some of the messages involved unfortunately went off-list for completely unrelated reasons; apologies for that). The patch queue goes from dd5b4f06557a4c5ec7b06d7814b95ecd63ab63b8^ to 0280c3687962199479258741cef4f32a2ccb8ffd and for reference, I will just quote patches one by one here and/or in followup mails, as appropriate. The first three patches in the queue have previously been reviewed already and their re-roll looks good to me. I have merged these three into master now: > From dd5b4f06557a4c5ec7b06d7814b95ecd63ab63b8 Mon Sep 17 00:00:00 2001 > From: Gary V. Vaughan > Date: Wed, 1 Sep 2010 14:41:52 +0700 > Subject: [PATCH 01/17] maint: rearrange Makefile.am in preparation for a > follow-up patch. > > * Makefile.am (Libtool scripts.): Move this section below the > `Bootstrap.' section... > (libtoolize.in): ...except this one which is generated at > bootstrap time, and was added into the `Bootstrap.' section. > (Libltdl.): Move this section below the `Libtool scripts.' > section. > From c9497cc81cc46ce8848452240a323266440c4cb9 Mon Sep 17 00:00:00 2001 > From: Gary V. Vaughan > Date: Thu, 23 Sep 2010 17:00:08 +0700 > Subject: [PATCH 02/17] maint: don't leak developer GREP, SED etc into > distribution file. > > * Makefile.am: Having rearranged the file, now apply the actual > changes to follow-up. > (edit): Split into two parts... > (bootstrap_edit): ...substitutions that should happen at bootstrap > time... > (configure_edit): ...and substitutions that should not happen until > configure time. > * Makefile.am (libltdl/m4/ltversion.m4, libltdl/config/ltmain.sh) > (libtoolize.in, tests/package.m4): Use bootstrap_edit. > (libtoolize, tests/defs): Use configure_edit. > * HACKING (Release Procedure): Remove the note to workaround the > bug fixed by this changeset. > * NEWS (Bug fixes): Mention that this bug is now fixed. > Reported by Joerg Sonnenberger. > From a2bb0c980f2b50ab31fedd18bb4890843b3d399a Mon Sep 17 00:00:00 2001 > From: Gary V. Vaughan > Date: Fri, 24 Sep 2010 12:51:36 +0700 > Subject: [PATCH 03/17] libtool: remove redundant unsubstituted shell var > defaults. > > * Makefile.am (libltdl/config/ltmain.sh): Boilerplate code from > libltdl/config/general.m4 sets some default shell variables > designed to be substituted by `$(configure_edit)'. Actually, > `libtool' uses the language tag values for those variables, and > `ltmain.m4sh' is not passed through `$(configure_edit)', so they > are just noise. Edit them out at bootstrap time. The next patch needs fixes. I'll followup. Cheers, Ralf