[Bug 193528] New: [PATCH] lang/gcc*: c++11 support is broken
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Sep 10 16:22:11 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193528
Bug ID: 193528
Summary: [PATCH] lang/gcc*: c++11 support is broken
Product: Ports Tree
Version: Latest
Hardware: Any
OS: Any
Status: Needs Triage
Severity: Affects Some People
Priority: Normal
Component: Individual Port(s)
Assignee: freebsd-ports-bugs at FreeBSD.org
Reporter: amdmi3 at amdmi3.ru
C++11 support is broken in lang/gcc* from ports. The problem is that gcc
doesn't define _GLIBCXX_USE_C99 macro, which unhides C++11 features.
Maybe that's related to the problem I've reported before, in which gcc disables
whole C99 support after not detecting certain math functions in our math
library - I don't remember details and status of that problem.
If this is too hard to properly fix in the compilers, we may instead just
hardcode -D_GLIBCXX_USE_C99 into macros which gcc defines or into CXXFLAGS in
compiler.mk.
This will enable most of c++11 on pre-clang FreeBSD versions.
Port maintainer (gerald at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 1.02 (mode: change, diff: SVN)
How-To-Repeat:
% cat test.cc
#include <string>
int main() {
std::to_string(1);
return 0;
}
% clang++ -std=c++11 test.cc
% g++47 -std=c++11 test.cc
test.cc: In function 'int main()'
test.cc:4:2: error: 'to_string' is not a member of 'std'
% g++47 -std=c++11 -D_GLIBCXX_USE_C99 test.cc
%
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list