Revert r34346, it didn't work the way I thought because of different CRT's on every...
[reactos.git] / reactos / tools / rbuild / backend / mingw / modulehandler.cpp
index ae638e2..2a06f29 100644 (file)
@@ -2462,10 +2462,15 @@ MingwBuildToolModuleHandler::GenerateBuildToolModuleTarget ()
        string objectsMacro = GetObjectsMacro ( module );
        string linkDepsMacro = GetLinkingDependenciesMacro ();
        string libsMacro = GetLibsMacro ();
-    string linker = "${host_ld}";
 
        GenerateRules ();
 
+       string linker;
+       if ( module.cplusplus )
+               linker = "${host_gpp}";
+       else
+               linker = "${host_gcc}";
+
        const FileLocation *target_file = GetTargetFilename ( module, NULL );
        fprintf ( fMakefile, "%s: %s %s | %s\n",
                  targetMacro.c_str (),