]> Zhao Yanbai Git Server - minix.git/commitdiff
force C++ executables to be dynamic
authorBen Gras <ben@minix3.org>
Wed, 11 Jun 2014 15:06:15 +0000 (17:06 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:08 +0000 (17:05 +0200)
. for C++ exceptions when built with llvm and using libunwind

Change-Id: I22fe6a1fd0b2af7323c7deecce919764e2354614

share/mk/bsd.prog.mk

index d4a39015801773134b4b1ddf895ca4d9bf081395..dc41895dbdc4bf94ac61aa64d5aa6f0754251b08 100644 (file)
@@ -354,6 +354,11 @@ _CCLINKFLAGS=
 .if defined(PROG_CXX)
 PROG=          ${PROG_CXX}
 _CCLINK=       ${CXX} ${_CCLINKFLAGS}
+
+.if defined(__MINIX)
+# BJG - stack unwinding (for C++ exceptions) doesn't work on static executables when built with llvm.
+LDSTATIC=      -dynamic
+.endif # defined(__MINIX)
 .endif
 
 .if defined(RUMPPRG)