[gnome-build-meta/mcatanzaro/#207] Don't pass -fexceptions to C++ compiler



commit e340d6b288b7e621d241118b712d2415c7a705a7
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Oct 7 11:48:37 2019 -0500

    Don't pass -fexceptions to C++ compiler
    
    Use it only when compiling C code. Exceptions are already going to be
    enabled by default for C++ and projects that disable them are not going
    to want us overriding that.
    
    Fixes #207

 project.conf | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/project.conf b/project.conf
index b3874a1d..abf061c9 100644
--- a/project.conf
+++ b/project.conf
@@ -78,19 +78,19 @@ environment:
   PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:%{libdir}/pkgconfig
   (?):
     - arch == "x86_64":
-        CFLAGS:  "%{flags_x86_64}"
+        CFLAGS:  "%{flags_x86_64} -fexceptions"
         CXXFLAGS: "%{flags_x86_64}"
         LDFLAGS:  "%{ldflags_defaults}"
     - arch == "i686":
-        CFLAGS: "%{flags_i686}"
+        CFLAGS: "%{flags_i686} -fexceptions"
         CXXFLAGS: "%{flags_i686}"
         LDFLAGS:  "%{ldflags_defaults}"
     - arch == "arm":
-        CFLAGS:  "%{flags_arm}"
+        CFLAGS:  "%{flags_arm} -fexceptions"
         CXXFLAGS: "%{flags_arm}"
         LDFLAGS:  "%{ldflags_defaults}"
     - arch == "aarch64":
-        CFLAGS:  "%{flags_aarch64}"
+        CFLAGS:  "%{flags_aarch64} -fexceptions"
         CXXFLAGS: "%{flags_aarch64}"
         LDFLAGS:  "%{ldflags_defaults}"
 
@@ -231,7 +231,7 @@ variables:
   localstatedir: "/var"
   indep-libdir: "%{prefix}/lib"
   debugdir: "%{indep-libdir}/debug"
-  common_flags: "-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions 
-fstack-protector-strong -grecord-gcc-switches"
+  common_flags: "-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong 
-grecord-gcc-switches"
   flags_x86_64: "-march=x86-64 -mtune=generic %{common_flags} -fasynchronous-unwind-tables 
-fstack-clash-protection -fcf-protection"
   flags_i686: "-march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign %{common_flags} 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection"
   flags_aarch64: "%{common_flags} -fasynchronous-unwind-tables -fstack-clash-protection"


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