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 - 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