From 92b08a01ef8f4b5bca17614ea4be9a86bb5638a5 Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Sun, 13 Sep 2009 21:18:21 +0000 Subject: [PATCH] Fix GCC detection in RBuild (first check TARGET_CC). svn path=/trunk/; revision=43040 --- reactos/tools/rbuild/backend/mingw/mingw.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index 951f5170d08..4673d4dcadd 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -740,13 +740,25 @@ MingwBackend::DetectCompiler () if ( ProjectNode.configuration.Compiler == GnuGcc ) { + const string& TARGET_CCValue = Environment::GetVariable ( "TARGET_CC" ); const string& ROS_PREFIXValue = Environment::GetVariable ( "ROS_PREFIX" ); + if ( ROS_PREFIXValue.length () > 0 ) { - compilerPrefix = ROS_PREFIXValue; - compilerCommand = compilerPrefix + "-gcc"; + compilerPrefix = ""; + compilerCommand = TARGET_CCValue; detectedCompiler = TryToDetectThisCompiler ( compilerCommand ); } + + if ( !detectedCompiler ) + { + if ( ROS_PREFIXValue.length () > 0 ) + { + compilerPrefix = ROS_PREFIXValue; + compilerCommand = compilerPrefix + "-gcc"; + detectedCompiler = TryToDetectThisCompiler ( compilerCommand ); + } + } #if defined(WIN32) if ( !detectedCompiler ) { -- 2.17.1