On Mon, Dec 17, 2012 at 6:50 AM, Dimitry Andric d...@freebsd.org wrote:
On 2012-12-17 09:36, Sam Fourman Jr. wrote:
No, there is no one-click merge script, it needs humanoid help, I'm
afraid. :-) Is there any reason you cannot just install the port, or
if that is too outdated, just checkout from llvm.org directly and build
it?
is it currently possible to build FreeBSD world, without clang and
then build clang from ports?
There is no real need, as you can just put /usr/local/bin before
/usr/bin in your PATH, but if you really want to do so, you can put the
following in /etc/src.conf:
CC=gcc
CXX=g++
CPP=gcpp
WITHOUT_CLANG=
From then on, you build world with gcc, which will also be installed as
/usr/bin/cc again.
I ended up generating and applying this patch, and rebuilt world again
root@www:/root # cat clang-169451.patch
Index: contrib/llvm/tools/clang/include/clang/Sema/Scope.h
===
--- contrib/llvm/tools/clang/include/clang/Sema/Scope.h (revision 244350)
+++ contrib/llvm/tools/clang/include/clang/Sema/Scope.h (working copy)
@@ -84,11 +84,18 @@
/// TryScope - This is the scope of a C++ try statement.
TryScope = 0x1000,
+/// CatchScope - This is the scope of a C++ catch statement.
+CatchScope = 0x2000,
+
+/// FnTryCatchScope - This is the scope for a function-level C++ try or
+/// catch scope.
+FnTryCatchScope = 0x4000,
+
/// FnTryScope - This is the scope of a function-level C++ try scope.
-FnTryScope = 0x3000,
+FnTryScope = TryScope | FnTryCatchScope,
/// FnCatchScope - This is the scope of a function-level C++ catch scope.
-FnCatchScope = 0x4000
+FnCatchScope = CatchScope | FnTryCatchScope
};
private:
/// The parent scope for this scope. This is null for the translation-unit
Index: contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
===
--- contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp(revision 244350)
+++ contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp(working copy)
@@ -2197,7 +2197,7 @@
// The name in a catch exception-declaration is local to the handler and
// shall not be redeclared in the outermost block of the handler.
ParseScope CatchScope(this, Scope::DeclScope | Scope::ControlScope |
- (FnCatch ? Scope::FnCatchScope : 0));
+ (FnCatch ? Scope::FnCatchScope : Scope::CatchScope));
// exception-declaration is equivalent to '...' or a parameter-declaration
// without default arguments.
Index: contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
===
--- contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
(revision 244350)
+++ contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp(working copy)
@@ -135,16 +135,13 @@
// of the controlled statement.
//
assert(S-getParent() No TUScope?);
- if (S-getFlags() Scope::FnTryScope)
-return S-getParent()-isDeclScope(D);
if (S-getParent()-getFlags() Scope::ControlScope) {
-if (S-getParent()-getFlags() Scope::FnCatchScope) {
- S = S-getParent();
- if (S-isDeclScope(D))
-return true;
-}
+S = S-getParent();
+if (S-isDeclScope(D))
+ return true;
+ }
+ if (S-getFlags() Scope::FnTryCatchScope)
return S-getParent()-isDeclScope(D);
- }
}
return false;
}
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org