Re: A branch for FreeBSD 10's clang

Markus Wanner <[email protected]>
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
Lapo,

On 01/22/2014 11:44 AM, Lapo Luchini wrote:
> Lapo Luchini wrote:
>> Tests on different platforms and suggestion are welcome.
> 
> Turned out to be easier than expected.

Thanks for making mtn work on FreeBSD.

> I'm not sure which versions of pkg-config support "--variable=pc_path",
> I only tried with FreeBSD and Cygwin, and they both do.
> Cygwin supports "--debug" (that we're currently using) too, but
> FreeBSD's doesn't. Also, it's easier this way.

The --variable thing itself works on Ubuntu 12.04 as well as on Debian
jessie (testing). However, the sed command you added strips several
required paths, here. As an example, my pc_path is:

/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:\
/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:\
/usr/lib/pkgconfig:/usr/share/pkgconfig

The '2>&1' also strikes me as odd. Why would we want to add errors to
the path? Shouldn't 'configure' better print this on stderr?

> * m4/tr1unorderedmap.m4
> * src/hash_map.hh
> 
> A simple s/std::tr1::/std::/ replace.
> I haven't checked why this work, I suppose stuff which was once
> experimental now is standard or something like that.
> Still works on Cygwin (as it wasn't using the TR1 code path anyways, and
> still doesn't).

Well, that's C++03-plus-TR1 vs. C++11. Hacking AC_CXX_TR1_UNORDERED_MAP
to actually detect a C++11 feature seems pretty misleading.

I tried adding a full-blown C++11 test macro, but it turned out that
monotone isn't particularly C++11-safe. At least CXX="g++ -std=c++11"
and CXX="clang++ -std=c++11" both fail to compile, here. Therefore, we
cannot currently enable C++11 globally. And I'm hesitant to enable it
for a 1.1 release.

I gave it a try and added a separate macro to detect the FreeBSD 10
case, where we do not have the tr1 headers, anymore. Lapo, can you
please test that?

Also, I'd be interested in a test run with CXX="clang++ -std=c++11". If
that also fails on FreeBSD, that means they are *not* shipping TR1, but
C++11 headers, but (by default) don't compile with C++11 enabled. Seems
like a weird combination to me.

> * src/automate_reader.cc
> * src/automate_reader.hh
> 
> I moved <iostream> from .cc to .hh, or std::streamsize was unrecognized
> there.
> 
> Looks to me we could probably merge all this into trunk, but I didn't
> check any platform other than FreeBSD (gcc/clang, 32/64) and Cygwin/64.

IIRC iostream is quite a heavy include, so that's probably why it got
moved to the .cc file. But if that fixes FreeBSD 10 for you, that's fine
with me.

Regards

Markus Wanner

_______________________________________________
Monotone-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/monotone-devel
signature.asc (application/pgp-signature, 1.5 KB)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQQcBAEBCgAGBQJS7lcNAAoJEOhoLRs/MemzOFcf/3X+ubUs2EgCccVH9u4ks7Lx
4Ng+5FZrC6MDXL4ovlpvehUzvinDczfPol6yF/EzDQ089UFCwqAHWUymxg151Qtq
9cMaayeaL7gMhaiskCapr43NzTyx0Ds4VLmWLwxgfLIdEk3pzg7EI+TYLeqBtgfO
BcbWSEJ2MpgMkf/H+6EfTSQRzkAUOtzkPfxpFPMI5oPO1hv3HvSY3MvM3oeoNWBJ
3vbG5IIakQNN94UaXA3rKnIs6dTlQPlJQjaRDTOZjnQlIHIyQ12BU2jBycwwohJq
nUvq5sooqztNZ2hN0XfD3eCFxXVzKDG+8xqMd6zCFNo0wMrX7lFCr0mdxPGWySp4
1vExYzcHT3BfTVBHNe6gBiVEU7OnbPO1uZG2BpBcoxNfWYxSt9qVIzf6lCxr4O4/
AoHlMwOfl7b4Zk5O9N07J80eDXjHTevRw0JXadLBG5WDqelFdqwz0P2SmtAUg4gK
5aCj3WEkEZsJ1mH2KiCkbuMWljHRF13fzrz2osNC/xAwg0GAuwDRtN9Smt81YeQq
cFXpEh5oCq57FQdVldrR2VGVNIO7v26Y8NUeh4suWe41PHK661pPNUGcsYA/Io0t
YkTrLtDX1XILmResHIjXhVExLOCMljTjaAwn9Zs3MzOYAGf6BkBUEltykOhOqenE
fnnRLF1qnOiAyROdk26+e/Q+ZyjNhkJcEV7MWxofwdSRyXVo9QhZ2hFPReUKDvrX
znCOB29/XmJ2ELIBm36nrZyRhWIXf0z1li8QxJay0vskyPAHxwT0guC2oIhInIJP
4cH2v5caqRuNfProy26HThHwSy0TWiFaWoodq6pJO24n/JpONRlqBzYT5eyMm0D/
JG3rS6gr0AGBSc0oZkcIh3thrvmSbC42u/hGnpp5WlhO+V5Cmyv28oBR6R8YE4xe
5PEmLbc3AGBiEAbZZ2WqVaujW4v6W8y94ym9Z6FUn7zCtNpcmp9GHfgJX1zPrTyL
9kuPGlJ7I5O3i02UCeLDjiAJwEds8pYIeHqU/fKGHUZ1Fm7b19jkLKWcYTvWj7dY
s37UMSL/eIxvI/jKTDQHIkltxRLl0v++QO4wnmKkntFNcJQD4UnBDKcniIrIRzWx
VixZ3t7oQta2xlySLJWWgKkJN1GLQcaQgCJVSNg2hLs2mW3U/w44I14jSBW24cm+
6hl9kHr7tjrtul3X5aUtz0tRdiUbdfdbkuYUM+9Eic37ZVDsoaz7swDF6sjquOCy
iy/HJOrYdQhS9vteHQZJMoqg1Y6Gt57lJBtInRqaa6ssTUaIUuFqKTyFMMpwTW63
8mb69gShY5paO/0IAric+Cyu66dHCqjx+sGVTLeMK26tztYg7Z6RB3wzSbanQP4=
=0gy5
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.