[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 5971b763 09/17: Use $(tutelary_flag) to work
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 5971b763 09/17: Use $(tutelary_flag) to work around compiler breakage |
Date: |
Sat, 2 Jul 2022 21:42:14 -0400 (EDT) |
branch: master
commit 5971b76365921e7812180f0426eb58df2ff104d8
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Use $(tutelary_flag) to work around compiler breakage
'-fno-omit-frame-pointer' should always be specified in optimization
flags. When the pernicious '-fomit-frame-pointer' default must be used,
that's an extraordinary circumstance that calls for $(tutelary_flag).
That's what has been done for years, and isn't changed here now.
Moved this exceptional condition up to the original definition of
$(tutelary_flag), for clarity.
---
compiler_gcc.make | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/compiler_gcc.make b/compiler_gcc.make
index 1a1b78ae..8897849d 100644
--- a/compiler_gcc.make
+++ b/compiler_gcc.make
@@ -71,6 +71,20 @@ endif
tutelary_flag :=
+# MinGW-w64's SEH defectively requires '-fomit-frame-pointer' until
+# gcc-10.2.1 (but as of 20220701 debian provides 10.0.0 only). See:
+# https://lists.nongnu.org/archive/html/lmi/2019-03/msg00026.html
+# https://lists.nongnu.org/archive/html/lmi/2020-12/msg00000.html
+# https://lists.nongnu.org/archive/html/lmi/2020-12/msg00002.html
+# https://lists.nongnu.org/archive/html/lmi/2021-03/msg00000.html
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99234
+
+ifneq (,$(filter $(gcc_version), 10 10.0))
+ ifeq (x86_64-w64-mingw32,$(findstring x86_64-w64-mingw32,$(LMI_TRIPLET)))
+ tutelary_flag := -fomit-frame-pointer
+ endif
+endif
+
# Build type governs
# - optimization flags
# - gprof
@@ -106,20 +120,6 @@ else
optimization_flag := -O2 -fno-omit-frame-pointer
endif
-ifneq (,$(filter $(gcc_version), 10 10.0))
- ifeq (x86_64-w64-mingw32,$(findstring x86_64-w64-mingw32,$(LMI_TRIPLET)))
-# See:
-# https://lists.nongnu.org/archive/html/lmi/2019-03/msg00026.html
-# https://lists.nongnu.org/archive/html/lmi/2020-12/msg00000.html
-# https://lists.nongnu.org/archive/html/lmi/2020-12/msg00002.html
-# https://lists.nongnu.org/archive/html/lmi/2021-03/msg00000.html
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99234
-# Fixed in gcc-10.2.1, but this makefile doesn't detect the last
-# component of major.minor.patchlevel reliably.
- tutelary_flag := -fomit-frame-pointer
- endif
-endif
-
# An overriding version of 'my_prod.cpp', which is used to create a
# nondistributable binary, contains so many large strings that, after
# consuming more than one CPU minute and 1 MiB of RAM, MinGW gcc-3.4.5
- [lmi-commits] [lmi] master f708d833 12/17: Override flags for product files more appropriately, (continued)
- [lmi-commits] [lmi] master f708d833 12/17: Override flags for product files more appropriately, Greg Chicares, 2022/07/02
- [lmi-commits] [lmi] master acfa77b0 08/17: Simplify, Greg Chicares, 2022/07/02
- [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 <=
- [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, 2022/07/02
- [lmi-commits] [lmi] master 1368400b 15/17: Deactivate old workarounds for product-file generation, Greg Chicares, 2022/07/02