Prevent CFLAGS and CXXFLAGS from being set when using CMake wrappers (RHBZ #1136069)

This commit is contained in:
Erik van Pienbroek 2015-04-10 21:30:49 +02:00
parent f185f58985
commit 7daa010253
2 changed files with 12 additions and 0 deletions

View File

@ -324,6 +324,9 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
environment variable MINGW_CMAKE_NO_VERBOSE (RHBZ #987644) environment variable MINGW_CMAKE_NO_VERBOSE (RHBZ #987644)
* When calling the mingw32-cmake and mingw64-cmake wrapper * When calling the mingw32-cmake and mingw64-cmake wrapper
scripts don't use verbose CMake output by default 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@lists.fedoraproject.org> * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View File

@ -30,6 +30,15 @@ else
NAME="`basename $0|tr -- - _`" NAME="`basename $0|tr -- - _`"
fi 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 # NOTE: The use of 'eval' in combination with '$@' is a potential security risk
# We should find a more safe replacement for this command # We should find a more safe replacement for this command
# Suggestions are welcome at the Fedora MinGW mailing list # Suggestions are welcome at the Fedora MinGW mailing list