__UPC_{PHASE,THREAD}_TYPE__ should be unsigned
Bump UPC_VERSION date to 20140623
Factor code for building upc-related link options
Add UPC link support for NetBSD

This is sufficient to compile and link a UPC "Hello, World!" program
with clang-upc on NetBSD-6.1.4/amd64.  However, the runtime fails at
startup.

BUILD NOTE:
Additionally, I needed to pass -DLIBUPC_ENABLE_BACKTRACE=FALSE to
cmake due to a lack of backtrace() and backtrace_symbols() in
NetBSD-6.  They are introduced in NetBSD-7.0, but in a separate
libexecinfo which will some require additional logic to link
conditionally.
Add UPC link support for FreeBSD

This is sufficient to compile and link a UPC "Hello, World!" program
with clang-upc on FreeBSD-10.0-RELEASE-p4/amd64.  However, the runtime
fails at startup.

BUILD NOTE:
Additionally, I needed to pass -DLIBUPC_ENABLE_BACKTRACE=FALSE to
cmake.  While backtrace() and backtrace_symbols() are present in
FreeBSD-10.0 (though missing in earlier releases), are in a separate
libexecinfo.  Some additional logic could/should be added to link
with "-lexecinfo" when an a FreeBSD erlease with backtrace support.
Add UPC link support for OpenBSD

This is sufficient to compile and link a UPC "Hello, World!" program
with clang-upc on OpenBSD-5.5/amd64.  However, the runtime fails at
startup.

BUILD NOTE:
Additionally, I needed to pass -DLIBUPC_ENABLE_BACKTRACE=FALSE to
cmake, because OpenBSD lacks backtrace() and backtrace_symbols().
Merge branch 'bsd-support'

* bsd-support:
  Add UPC link support for OpenBSD
  Add UPC link support for FreeBSD
  Add UPC link support for NetBSD
  Factor code for building upc-related link options
Add configuration checking for UPC link script support.
Fixes #57, do not use linker script if it is disabled.
Ensure "-Tupc.ld -lupc" come *after* to .o file(s)
Fix for bsd based oss (freebsd, openbsd, ...) where 'fd' argument
on mmap() is required to be -1 when MAP_ANON is requested.
Change the way how UPC link script was created without generating
an error. Fixes #31.
Bump UPC_VERSION date to 20140624
UPC linker setup for Solaris

This is sufficient to compile and run at least the intrepid tests.
However, every single upc execution prints:
  UPC Warning: There are no UPC source files compiled into this program, or <upc.h> was not included?
CMakeLists.txt
runtime/libupc/CMakeLists.txt
include/clang/Config/config.h.cmake
include/clang/Config/config.h.in
	Add configure for UPC backtracing.  On some systems (e.g. freebsd)
	and extra library (execinfo) must be placed on the UPC link line
	for backtrace and backtrace_symbl functions.
lib/Driver/Tools.cpp
	Add exexinfo library on FreeBSD/OpenBSD/NetBSD systems if UPC
	backtracing is enabled.
Fix typos in logic to auto-disable backtrace support
Bump UPC_VERSION date to 20140625
Replace REGEXP with simple TOLOWER for runtime name.
Fix issue #61 - build 32-bit builds on 64-bit host

This commit adds '-m32' to the compile command used for the
upc-crt* objects under the same conditions that llvm uses to
add this to its own compiler and linker flags.
Fix build regression introduced by my previous commit