Re: [PATCH 0/9] configurator: Support for Windows and MSVC
David Gibson <[email protected]> Tue, 20 Sep 2016 14:48:22 +1000
| Newsgroups | org.ozlabs.lists.ccan |
|---|---|
| Message-ID | <20160920044822.GJ20488@umbus> |
On Sun, Sep 18, 2016 at 06:51:57PM -0600, Kevin Locke wrote:
> Hi all,
>
> This patch series adds support for building configurator with Microsoft
> Visual C++ and running it on Windows. The motivation is to add
> sufficient support for Windows to allow using header-only modules
> with minimal hassle. For me, this patch series is sufficient, so I
> don't have any further plans for changes to other files or the build
> system at the moment.
First, thanks for this. ccan isn't supposed to be platform specific,
but it kind of is at the moment, simply because most of the
contributions have been from Linux developers. I'm really happy to
see some work to make it useful on different platforms.
Second, because I'm not and have never been a Windows dev, my ability
to review these is limited - so I'm inclined to apply anything that
doesn't break builds on Linux / POSIX.
Third, because most of the main ccan contributors are not Windows
devs, I'm a bit worried about bitrot. If you can think of any way of
making some kind of automated smoke test form builds on Windows, that
would be terrific. Otherwise, I guess we'll just hope for the best.
> The two patches that are particularly likely to raise objections are
> patch 3 and 8:
>
> Patch 3 adds a copy of the err.h functions used by configurator to work
> around the lack of err.h on Windows. If this is too much code to lump
> into configurator.c, I can split it out (and copy err.{c,h} verbatim
> from musl) or call fprintf+exit directly.
>
> Patch 8 adds the output cflag (-o) to DEFAULT_CFLAGS and the expected
> configurator cflags argument. This changes both the configurator API
> and the config.h API and will break existing code which depend on these.
> If that is unacceptable, I'd be open to implementing a
> backwards-compatible alternative. One idea would be to add an
> --output-cflag option to configurator, although it will require quite a
> bit of argument parsing code. I'm open to other alternatives as well.
>
> Thanks for considering,
> Kevin
>
> Kevin Locke (9):
> configurator: Replace unlink with remove
> configurator: Reimplement run using popen
> configurator: Inline err.h functions from musl libc
> configurator: Use native directory separator
> configurator: Mark non-Windows tests MAY_NOT_COMPILE
> configurator: Print test source without cat
> configurator: Fix compiler warning with compare
> configurator: Pass output cflag to configurator
> configurator: DEFAULT_{COMPILER,FLAGS} for MSVC
>
> Makefile | 2 +-
> tools/configurator/configurator.c | 197 +++++++++++++++++++++++++-------------
> 2 files changed, 131 insertions(+), 68 deletions(-)
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4L+QAAoJEGw4ysog2bOSuHUQAM9Ynsmc7XXj8fxpArKaKdMV omDYI6X/BWMz9xjR1JpOrTt1/EvQ8Tr17/sbbvHDqwviYP2tlkmClhg6/sd+isaO fvHTwUcR1vzud6hMscPjsvcO7kMIH/GIHx+TPqJx9BHBNQma5bxCdmLmV2iCWPee iB+IW2cdK8YUHqCdSqqaD6Mw6F/XH0gxmIQDj+gLAW9ffo8MACjBlPPOKsK5RJiU gxU1RrP0WOsleb6q06mfF9cZsYMv8FOPZrsuQEx+rDghtUoZbmnxk5O5pE8wT6y2 MX9ZNGqjS1ZWQP2PxydW79AWOVJz1VqKV/c1QFoOEEBfvaz9e2T3hSs3reustCMQ 6zTKbI385kzKhHSRri6q7EGEXT0tAqyUZrP3bws6iczrr1iAB7UtZL7HggZvnRr/ YmfrlGMqr6VYMwdR8iom5Tky5gZ14KVOMUCTFFgwTWqB/bQEZBdp7QLH5x0XOsSG 5PwcglX0IiSrToKaq9HzpOSPqpGcEfO1gHtSLnWOQhAVIPw6z0BL0/VYb1TOUh+N bhEGM2nZs7G0Hw6BLxQbmonJmiBoiMRJrv0pFYq1s+8SSUO6NmLHE5CWq+NLZOcm pMEt1JLqNdeWW0IXt+4/XrnvbJ77FboRRf0MoEAbEbJc8iLAkg4Qpi8DgXBtmTIy Gv1h3C6pjESNWG1sZGzK =eCNA -----END PGP SIGNATURE-----