monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] A branch for FreeBSD 10's clang


From: Markus Wanner
Subject: Re: [Monotone-devel] A branch for FreeBSD 10's clang
Date: Sun, 02 Feb 2014 15:32:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

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


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]