epienbro pushed to mingw-filesystem (master). "Prevent CFLAGS and CXXFLAGS from being set when using CMake wrappers (RHBZ #1136069)"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Apr 11 18:39:00 UTC 2015


>From 7daa0102535b1ab53bc40d97bb5aa0e30489e00e Mon Sep 17 00:00:00 2001
From: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Fri, 10 Apr 2015 21:30:49 +0200
Subject: Prevent CFLAGS and CXXFLAGS from being set when using CMake wrappers
 (RHBZ #1136069)


diff --git a/mingw-filesystem.spec b/mingw-filesystem.spec
index cbba17d..5f2b18a 100644
--- a/mingw-filesystem.spec
+++ b/mingw-filesystem.spec
@@ -324,6 +324,9 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
     environment variable MINGW_CMAKE_NO_VERBOSE (RHBZ #987644)
   * When calling the mingw32-cmake and mingw64-cmake wrapper
     scripts don't use verbose CMake output by default
+  * When using the CMake wrappers, prevent CFLAGS and CXXFLAGS
+    from being set unless they're already set in the current
+    environment (RHBZ #1136069)
 
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org>
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/mingw-scripts.sh b/mingw-scripts.sh
index a748fcf..929a901 100755
--- a/mingw-scripts.sh
+++ b/mingw-scripts.sh
@@ -30,6 +30,15 @@ else
     NAME="`basename $0|tr -- - _`"
 fi
 
+# When using the CMake wrappers, prevent CFLAGS and CXXFLAGS from being set
+# unless they're already set in the current environment (RHBZ #1136069)
+if [[ $NAME == *cmake* ]] ; then
+    MINGW32_CFLAGS=${MINGW32_CFLAGS:-""}
+    MINGW32_CXXFLAGS=${MINGW32_CXXFLAGS:-""}
+    MINGW64_CFLAGS=${MINGW64_CFLAGS:-""}
+    MINGW64_CXXFLAGS=${MINGW64_CXXFLAGS:-""}
+fi
+
 # NOTE: The use of 'eval' in combination with '$@' is a potential security risk
 #       We should find a more safe replacement for this command
 #       Suggestions are welcome at the Fedora MinGW mailing list
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/mingw-filesystem.git/commit/?h=master&id=7daa0102535b1ab53bc40d97bb5aa0e30489e00e


More information about the scm-commits mailing list