diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-01-02 17:43:20 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-01-02 17:43:20 +0000 |
commit | 325a87e3fd6808b76a667af8b1af41c2ecf82fc6 (patch) | |
tree | 267c45e65f7592c91d72eda85fbefa3dd144735f | |
parent | 4a1e5c09bbea6df0cbe35e8a2be21b5c870db5d8 (diff) |
Avoid use of -fomit-frame-pointer on FreeBSD platforms. It causes thrown
exceptions to abort() in cases where it should not.
Many thanks to Duraid Madina for doing the heavy lifting on the analysis
of this problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19256 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile.rules | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile.rules b/Makefile.rules index ed29614397..65790880be 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -180,6 +180,7 @@ install-bytecode:: install-bytecode-local # Variables derived from configuration we are building #-------------------------------------------------------------------- + ifdef ENABLE_PROFILING BuildMode := Profile CXX.Flags := -O3 -DNDEBUG -felide-constructors -finline-functions -pg @@ -188,9 +189,13 @@ ifdef ENABLE_PROFILING else ifdef ENABLE_OPTIMIZED BuildMode := Release - CXX.Flags := -O3 -DNDEBUG -finline-functions \ - -felide-constructors -fomit-frame-pointer - C.Flags := -O3 -DNDEBUG -fomit-frame-pointer + # Don't use -fomit-frame-pointer on FreeBSD + ifneq ($(OS),FreeBSD) + OmitFramePointer := -fomit-frame-pointer + endif + CXX.Flags := -O3 -DNDEBUG -finline-functions -felide-constructors \ + $(OmitFramePointer) + C.Flags := -O3 -DNDEBUG $(OmitFramePointer) LD.Flags := -O3 -DNDEBUG else BuildMode := Debug |