[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 9a5cf902 16/17: Repeat '-fno-omit-frame-point
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 9a5cf902 16/17: Repeat '-fno-omit-frame-pointer' less often |
Date: |
Sat, 2 Jul 2022 21:42:15 -0400 (EDT) |
branch: master
commit 9a5cf90212182bb5a50752580f11c8c201a81bf1
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Repeat '-fno-omit-frame-pointer' less often
---
compiler_clang.make | 17 +++++++++++------
compiler_gcc.make | 20 +++++++++++---------
2 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/compiler_clang.make b/compiler_clang.make
index 17f4b469..2f5c010a 100644
--- a/compiler_clang.make
+++ b/compiler_clang.make
@@ -94,17 +94,22 @@ ubsan_options := \
debug_flag := -ggdb
-# Apparently '-fomit-frame-pointer' is a clang default. Turn it off.
+# '-fomit-frame-pointer' is an infelicitous default. Turn it off,
+# as it makes debugging difficult and has no measurable benefit.
+
+analyzer_flag :=
+optimization_flag := -fno-omit-frame-pointer
ifeq (gprof,$(build_type))
- optimization_flag := -O0 -fno-omit-frame-pointer
- analyzer_flag := -pg
+ analyzer_flag += -pg
+ optimization_flag += -O0
else ifeq (ubsan,$(build_type))
- analyzer_flag := $(ubsan_options) -O3 -fno-omit-frame-pointer
+ analyzer_flag += $(ubsan_options)
+ optimization_flag += -O3
else ifeq (safestdlib,$(build_type))
- optimization_flag := -O0 -fno-omit-frame-pointer
+ optimization_flag += -O0
else
- optimization_flag := -O2 -fno-omit-frame-pointer
+ optimization_flag += -O2
endif
# Compiler-and-linker flags.
diff --git a/compiler_gcc.make b/compiler_gcc.make
index 4cfab8bd..7d61068d 100644
--- a/compiler_gcc.make
+++ b/compiler_gcc.make
@@ -112,20 +112,22 @@ ubsan_options := \
debug_flag := -ggdb
-# Since gcc version 4.6, '-fomit-frame-pointer' has apparently been
-# the default. Don't use that because it makes debugging difficult.
-# See:
-# https://lists.gnu.org/archive/html/lmi/2016-06/msg00091.html
+# '-fomit-frame-pointer' is an infelicitous default. Turn it off,
+# as it makes debugging difficult and has no measurable benefit.
+
+analyzer_flag :=
+optimization_flag := -fno-omit-frame-pointer
ifeq (gprof,$(build_type))
- optimization_flag := -O0 -fno-omit-frame-pointer
- analyzer_flag := -pg
+ analyzer_flag += -pg
+ optimization_flag += -O0
else ifeq (ubsan,$(build_type))
- analyzer_flag := $(ubsan_options) -O3 -fno-omit-frame-pointer
+ analyzer_flag += $(ubsan_options)
+ optimization_flag += -O3
else ifeq (safestdlib,$(build_type))
- optimization_flag := -O0 -fno-omit-frame-pointer
+ optimization_flag += -O0
else
- optimization_flag := -O2 -fno-omit-frame-pointer
+ optimization_flag += -O2
endif
# Historical workarounds for product-file-generating binaries.
- [lmi-commits] [lmi] master 6896ec57 03/17: Explain uniformly why pointer-{compare, subtract} aren't used, (continued)
- [lmi-commits] [lmi] master 6896ec57 03/17: Explain uniformly why pointer-{compare, subtract} aren't used, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master 05ef210f 01/17: Remove obsolete '.patch' files, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master be64abf0 11/17: Establish general compiler flags earlier, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master 0e3c2fbb 02/17: Don't let makefiles end in an empty line, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master adcaef29 06/17: Establish a framework for clang warnings, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master e4abb6e1 14/17: Don't specify nonempty $CFLAGS or $CXXFLAGS, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master ec379f81 17/17: Use an updated XRC schema, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master 89e37e40 13/17: Resolve a latent makefile issue, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master 5971b763 09/17: Use $(tutelary_flag) to work around compiler breakage, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master 8ece241a 10/17: Fix defect introduced 20190327T2239Z: incomplete override, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master 9a5cf902 16/17: Repeat '-fno-omit-frame-pointer' less often,
Greg Chicares <=
- [lmi-commits] [lmi] master 1368400b 15/17: Deactivate old workarounds for product-file generation, Greg Chicares, 2022/07/02