summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cygwin-filesystem.spec1
-rwxr-xr-xcygwin-scripts.sh9
2 files changed, 10 insertions, 0 deletions
diff --git a/cygwin-filesystem.spec b/cygwin-filesystem.spec
index b7d8df2..e826334 100644
--- a/cygwin-filesystem.spec
+++ b/cygwin-filesystem.spec
@@ -251,6 +251,7 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/cygwin/
- Add CMAKE_SYSTEM_PROCESSOR to the CMake toolchain files
- Allow verbose CMake output to be disabled
- Don't use verbose output by default in the CMake wrapper scripts
+- Prevent CFLAGS and CXXFLAGS from being set when using CMake wrappers
* Thu Jun 11 2015 Yaakov Selkowitz <yselkowi@redhat.com> - 12-1
- Add cppflags, ldflags variables
diff --git a/cygwin-scripts.sh b/cygwin-scripts.sh
index ef2345a..1a0324f 100755
--- a/cygwin-scripts.sh
+++ b/cygwin-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
+ CYGWIN32_CFLAGS=${CYGWIN32_CFLAGS:-""}
+ CYGWIN32_CXXFLAGS=${CYGWIN32_CXXFLAGS:-""}
+ CYGWIN64_CFLAGS=${CYGWIN64_CFLAGS:-""}
+ CYGWIN64_CXXFLAGS=${CYGWIN64_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