Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475728 - sys-devel/llvm-3.3 and sys-devel/clang-3.3 - add USE=c++11
Summary: sys-devel/llvm-3.3 and sys-devel/clang-3.3 - add USE=c++11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Clang Team (OBSOLETE)
URL:
Whiteboard:
Keywords: PATCH
Depends on: 464354
Blocks:
  Show dependency tree
 
Reported: 2013-07-04 11:01 UTC by Alex Turbov
Modified: 2014-10-22 13:21 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
add c++0x to llvm 3.3 ebuild (llvm-3.3-add-c++0x-use-flag.patch,832 bytes, patch)
2013-07-04 11:02 UTC, Alex Turbov
Details | Diff
add c++0x to clang 3.3 ebuild (clang-3.3-add-c++0x-and-doc-use-flags.patch,1.27 KB, patch)
2013-07-04 11:02 UTC, Alex Turbov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Turbov 2013-07-04 11:01:27 UTC
llvm and clang actually can be compiled w/ C++11 support.
attached patches will add a corresponding USE flag to both ebuilds.



Reproducible: Always
Comment 1 Alex Turbov 2013-07-04 11:02:04 UTC
Created attachment 352592 [details, diff]
add c++0x to llvm 3.3 ebuild
Comment 2 Alex Turbov 2013-07-04 11:02:29 UTC
Created attachment 352594 [details, diff]
add c++0x to clang 3.3 ebuild
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-12 13:04:27 UTC
As far as I can see, the only thing the configure switch does is adding '-std=c++11' to the compiler command-line.
Comment 4 Alex Turbov 2013-10-12 15:19:02 UTC
(In reply to Michał Górny from comment #3)
> As far as I can see, the only thing the configure switch does is adding
> '-std=c++11' to the compiler command-line.

which is may affect both -- compile and run time performance.
anyway effect of this option can be only positive or nothing, so why do you think it doesn't deserve to be a configurable?
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-12 15:50:31 UTC
(In reply to Alex Turbov from comment #4)
> (In reply to Michał Górny from comment #3)
> > As far as I can see, the only thing the configure switch does is adding
> > '-std=c++11' to the compiler command-line.
> 
> which is may affect both -- compile and run time performance.
> anyway effect of this option can be only positive or nothing, so why do you
> think it doesn't deserve to be a configurable?

Because we don't use flags to control -std=. As far as I understand, new enough gcc enables C++11 features by default, doesn't it?
Comment 6 Alex Turbov 2013-10-12 15:57:22 UTC
> 
> Because we don't use flags to control -std=. As far as I understand, new
> enough gcc enables C++11 features by default, doesn't it?

no! default is a C++03.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-12 17:56:27 UTC
(In reply to Alex Turbov from comment #6)
> > 
> > Because we don't use flags to control -std=. As far as I understand, new
> > enough gcc enables C++11 features by default, doesn't it?
> 
> no! default is a C++03.

But it will be the default in a future version, correct?

Anyway, doesn't changing the standard change ABI as well? I'm ready to add the flag but I'm wondering about the consequences. It may be necessary e.g. to enable it on all rev-deps (like Mesa) as well then.
Comment 8 Alex Turbov 2013-10-12 18:08:07 UTC
 
> But it will be the default in a future version, correct?

I suppose it will be a really far future...
 
> Anyway, doesn't changing the standard change ABI as well? I'm ready to add
> the flag but I'm wondering about the consequences. It may be necessary e.g.
> to enable it on all rev-deps (like Mesa) as well then.

I'm using this flag around a year already w/o any ABI clash...
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-12 19:14:40 UTC
Hmm, I'll do a run with abi-compliance-checker and report back.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-13 08:44:58 UTC
I've just consulted the C++11 compatibility gcc doc [1] and checked the library ABI. Sadly, LLVM built with C++11 is partially ABI-incompatible with C++98 apps which means we can't 'simply' add it.

If we're to enable the C++11 support, we will need to enable it on all reverse dependencies as well, and add USE=c++11 for them too, with sys-devel/llvm[c++11=] deps.

[1]:http://gcc.gnu.org/wiki/Cxx11AbiCompatibility
Comment 11 David Heidelberg (okias) 2014-03-01 14:16:41 UTC
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-February/070772.html

Well, we can't escape this ;)
Comment 12 David Heidelberg (okias) 2014-03-04 20:30:20 UTC
Starting with llvm-3.5svn r202574, LLVM expects C+11 mode. [1]

[1] http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2d724c68662668b7c232ae0e5f018a82dfa0b3d

I'd like to see C++11 enabled as soon as possible, to be possible verify C++11 support before final releases :)
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-04 20:43:45 UTC
I don't know if there's a point for USE=c++11 anymore. I guess we can just require C++11 starting with llvm-3.5.
Comment 14 David Heidelberg (okias) 2014-03-04 20:47:14 UTC
Personally I'm not aware disadvantages using C++11.

I'd guess few KBytes increase in size, maybe?

I didn't found any interesting information about differences between llvm w/ and w/out C++11.
Comment 15 David Heidelberg (okias) 2014-03-08 13:09:37 UTC
Since I had to recompile llvm on numerous machines, I'll temporarily force c++11 support and retest.
Comment 16 Bernard Cafarelli gentoo-dev 2014-10-22 13:21:25 UTC
llvm-3.5 requires c++11 and the ebuild has a check for proper support, so I guess we can marked this one fixed with =llvm-3.5.0 :)