patchGNU Libtool - Patches: patch #9341, testsuite.at: prefer diff...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9341: testsuite.at: prefer diff --strip-trailing-cr

Submitter:  Michael Haubenwallner <haubi>
Submitted:  Wed 10 May 2017 02:24:08 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Tue 16 May 2017 01:06:31 PM UTC, comment #2: 

Then I'm wondering why libtool does actually support the cc_basename=cl with host_os=cygwin at all.

Anyway, my final goal is beyond the MSVC toolchain: I'm about to rework the old patches (http://lists.gnu.org/archive/html/libtool-patches/2008-02/msg00014.html) adding support for the MSVC wrapper called "Parity" (at https://github.com/haubi/parity/ for now), which does:

  • not require specific environment variables for MSVC, but can find MSVC from the Registry
  • convert Unix to Windows path names as necessary
  • provide GCC like commandline options
  • provide gcc3-style dependency tracking
  • set up the final binary's std-stream mode to O_BINARY
  • provide some additional system headers (stdint.h, dlfcn.h, ...)
  • emulate some runtime loader features, on Linux known as embedded runpath, embedded soname, LD_BIND_NOW, LD_LIBRARY_PATH, LD_PRELOAD
  • probably more


We do use it on Cygwin (now, since Interix is gone) within Gentoo Prefix, to maintain an ecosystem using the native MSVC toolchain, configured in the "lying" way with --build=i586-pc-winnt --host=i586-pc-winnt - which is similar to "multilib" actually.

That is, I'm about to prepare libtool patches to support the --winnt host triplet, which feels a lot more correct for MSVC than using --host=mingw32 - and should support unwrapped cl.exe as well.

But as the application's O_BINARY setting may vary for host_os=winnt then, I prefer to 'diff --strip-trailing-cr' rather than testing for another host_os - or even current binary setting.

Thus the idea is to have the testsuite setup not depend on $host_os, but just ignore CR if possible - as the test programs all have textual output only.

Thanks!
/haubi/

Michael Haubenwallner <haubi>
Tue 16 May 2017 08:00:31 AM UTC, comment #1: 

[copying my msg from the ML to the patch tracker]

I think these testsuite problems goes away if you configure with something like ".../configure --build=i686-pc-cygwin --host=mingw32" as indicated in the manual [1]. Or maybe it's x86_64-pc-cygwin in your case?

The rationale is that when Cygwin is used to drive a MSVC build, I have considered it a Cygwin to MinGW cross, because that is much closer to the truth than a native Cygwin build (which is what is assumed if you just override CC).

But I haven't tested recently, YMMV...

Cheers,
Peter

[1] https://www.gnu.org/software/libtool/manual/libtool.html#Cygwin-to-MinGW-Cross

Peter Rosin <pekberg>
Group Member
Wed 10 May 2017 02:24:08 PM UTC, original submission:  

On Cygwin, when using CC=cl.exe (MSVC) as the compiler, some test cases fail just because of unexpected carriage return output from test binaries.

Fortunately, with GNU diff there is the --strip-trailing-cr flag, which allows to easily get the libtool test suite agnostic to CR, independent of any host triplet used:

If 'diff --help' tells about the --strip-trailing-cr flag, attached patch does wrap the host diff command to add that flag for when run as 'diff -u' via $at_diff in the test suite, in addition to stop adding CR to expected output files for mingw.

This allows to succeed following test cases when run on Cygwin with MSVC environment and these configure options: CC=cl CXX="cl /TP" GCJ=no GOC=no F77=no FC=no NM=no CFLAGS= CXXFLAGS=

  27: link against a preloaded static library
  30: deplibs_check_method
  40: build and link against a static library
  41: build and link against a dynamic library
  42: build both static and dynamic
  43: allow_undefined_flag
  49: static library interdependencies
 112: dlloader API

Thanks!
/haubi/

Michael Haubenwallner <haubi>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #40648:  0001-testsuite.at-prefer-diff-strip-trailing-cr.patch added by haubi (3KiB - text/x-patch - [PATCH] testsuite.at: prefer diff --strip-trailing-cr)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pekberg (Posted a comment)
  • -email is unavailable- added by haubi (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-10 haubi Attached File- Added 0001-testsuite.at-prefer-diff-strip-trailing-cr.patch, #40648

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code