lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 372e073 3/3: Upgrade to gcc-7.2


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 372e073 3/3: Upgrade to gcc-7.2
Date: Sat, 3 Mar 2018 05:03:06 -0500 (EST)

branch: master
commit 372e0735dde7e70b95e0867fbfa91540aaf4932c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Upgrade to gcc-7.2
---
 msw_generic.make | 11 ++++++++---
 workhorse.make   | 22 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/msw_generic.make b/msw_generic.make
index b027b58..fb338b9 100644
--- a/msw_generic.make
+++ b/msw_generic.make
@@ -51,20 +51,25 @@ CXX     := $(gcc_bin_dir)$(host_prefix)g++
 LD      := $(gcc_bin_dir)$(host_prefix)g++
 RC      := $(gcc_bin_dir)$(host_prefix)windres
 
-# Identify run-time libraries for redistribution.
-
+# Identify run-time libraries for redistribution. See:
+#   https://lists.nongnu.org/archive/html/lmi/2017-05/msg00046.html
+# Perhaps gcc's '-print-sysroot' would be more suitable, but that
+# option returns an empty string with debian cross compilers.
+#
 # It might seem more robust to write something like
 #   compiler_sysroot := $(shell readlink -fn 
/usr/lib/gcc/i686-w64-mingw32/*-win32)
 # but that would actually weaken makefile portability, and there
 # is no guarantee that this directory will be named similarly in
 # future debian releases, much less on other OSs.
-compiler_sysroot := /usr/lib/gcc/i686-w64-mingw32/6.3-win32
+
+compiler_sysroot := $(dir $(shell $(CXX) -print-libgcc-file-name))
 
 # 'libwinpthread*' is no longer needed for debian cross builds--see:
 #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748353
 # | Provide compilers using Windows and POSIX threads. The default setup
 # | uses Windows threads, thus avoiding the dependency on the pthreads DLL
 # but including in this list with $(wildcard) does no harm.
+
 compiler_runtime_files := \
   $(wildcard $(compiler_sysroot)/libgcc*.dll) \
   $(wildcard $(compiler_sysroot)/libstdc++*.dll) \
diff --git a/workhorse.make b/workhorse.make
index 2b995b9..e2f0466 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -405,6 +405,28 @@ else ifneq (,$(filter $(gcc_version), 6.3.0))
   #   http://lists.nongnu.org/archive/html/lmi/2017-08/msg00045.html
   c_standard   += -frounding-math
   cxx_standard += -frounding-math
+else ifneq (,$(filter $(gcc_version), 7.2-win32))
+  # Rationale:
+  # -Wno-conversion             regrettable, but needed for wx
+  # -Wno-implicit-fallthrough   only for boost
+  # -Wno-parentheses            beyond pedantic
+  # -Wno-register               only for boost; unthinkable anyway
+  # -Wno-unused-local-typedefs  only for boost static assert
+  gcc_version_specific_warnings := \
+    -Wno-conversion \
+    -Wno-implicit-fallthrough \
+    -Wno-parentheses \
+    -Wno-register \
+    -Wno-unused-local-typedefs \
+
+  cxx_standard := -std=c++17
+
+# The default '-fno-rounding-math' means something like
+  #   #pragma STDC FENV ACCESS OFF
+  # which causes harm while bringing no countervailing benefit--see:
+  #   http://lists.nongnu.org/archive/html/lmi/2017-08/msg00045.html
+  c_standard   += -frounding-math
+  cxx_standard += -frounding-math
 endif
 
 treat_warnings_as_errors := -pedantic-errors -Werror



reply via email to

[Prev in Thread] Current Thread [Next in Thread]