summaryrefslogtreecommitdiff
path: root/indra/cmake/00-Common.cmake
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-09-01 12:21:51 -0400
committerbrad kittenbrink <brad@lindenlab.com>2009-09-01 12:21:51 -0400
commitbae94e434090f83d12941ca25aca13203db671b6 (patch)
treeb83d09a5eb4780c5f3077ac73b10199582f6adcd /indra/cmake/00-Common.cmake
parent3069355a6f33b7bbcfc8c493910a40e6836249e1 (diff)
parent3dc23bc1831e84b8d8288d9a4f006f9597d9443a (diff)
Merged login-api with viewer-2.0.0-3 up through r132290.
Diffstat (limited to 'indra/cmake/00-Common.cmake')
-rw-r--r--indra/cmake/00-Common.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 2a70263446..0dc0e9e80c 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -179,11 +179,17 @@ endif (LINUX)
if (DARWIN)
- add_definitions(-DLL_DARWIN=1)
+ # NOTE (per http://lists.apple.com/archives/darwin-dev/2008/Jan/msg00232.html):
+ # > Why the bus error? What am I doing wrong?
+ # This is a known issue where getcontext(3) is writing past the end of the
+ # ucontext_t struct when _XOPEN_SOURCE is not defined (rdar://problem/5578699 ).
+ # As a workaround, define _XOPEN_SOURCE before including ucontext.h.
+ add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
+ set(DARWIN_extra_cstar_flags "-mlong-branch")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
# NOTE: it's critical that the optimization flag is put in front.
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")