Forráskód Böngészése

Cross-compile improvements.

Brucey 2 éve
szülő
commit
fcb52ba738
3 módosított fájl, 14 hozzáadás és 7 törlés
  1. 5 1
      bmk_make.bmx
  2. 3 3
      bmk_ng.bmx
  3. 6 3
      bmk_util.bmx

+ 5 - 1
bmk_make.bmx

@@ -1845,7 +1845,11 @@ Type TArcTask
 				EndIf
 				If Not cmd Then
 					Local prefix:String = processor.MinGWExePrefix()
-					cmd= processor.Option("path_to_ar", processor.MinGWBinPath() + "/" + prefix + "ar.exe") + " -rc "+CQuote(path)
+					Local ext:String = ""
+					If processor.OSPlatform() = "win32" Then
+						ext = ".exe"
+					End If
+					cmd= processor.Option("path_to_ar", processor.MinGWBinPath() + "/" + prefix + "ar" + ext) + " -rc "+CQuote(path)
 				End If
 				cmd:+" "+CQuote(t)
 			Next

+ 3 - 3
bmk_ng.bmx

@@ -527,7 +527,7 @@ Type TBMK
 
 		Local process:TProcess
 		If Platform() = "win32" Then
-			process = CreateProcess(MinGWBinPath() + "/gcc.exe --version", HIDECONSOLE)
+			process = CreateProcess(Option("path_to_gcc", MinGWBinPath() + "/gcc.exe") + " --version", HIDECONSOLE)
 		Else	
 			process = CreateProcess("gcc --version")
 		End If
@@ -564,7 +564,7 @@ Type TBMK
 
 		' get version
 		If Platform() = "win32" Then
-			process = CreateProcess(MinGWBinPath() + "/gcc.exe -dumpversion -dumpfullversion", HIDECONSOLE)
+			process = CreateProcess(Option("path_to_gcc", MinGWBinPath() + "/gcc.exe") + " -dumpversion -dumpfullversion", HIDECONSOLE)
 		Else	
 			process = CreateProcess("gcc -dumpversion -dumpfullversion")
 		End If
@@ -689,7 +689,7 @@ Type TBMK
 		End If
 
 		Local exe:String = "bcc"
-		If Platform() = "win32" Then
+		If OSPlatform() = "win32" Then
 			exe :+ ".exe"
 		End If
 

+ 6 - 3
bmk_util.bmx

@@ -274,7 +274,10 @@ Function LinkApp( path$,lnk_files:TList,makelib:Int,opts$ )
 	End If
 	
 	If processor.Platform() = "win32"
-
+		Local ext:String = ""
+?win32
+		ext = ".exe"
+?
 		Local version:Int = Int(processor.GCCVersion(True))
 		Local usingLD:Int = False
 
@@ -299,7 +302,7 @@ Function LinkApp( path$,lnk_files:TList,makelib:Int,opts$ )
 		End If
 
 		If usingLD Then
-			sb.Append(CQuote(processor.Option("path_to_ld", processor.MinGWBinPath()+ "/ld.exe"))).Append(" -stack 4194304")
+			sb.Append(CQuote(processor.Option("path_to_ld", processor.MinGWBinPath()+ "/ld" + ext))).Append(" -stack 4194304")
 
 			If Not opt_debug And Not opt_gdbdebug Then
 				sb.Append(processor.option("strip.debug", " -s "))
@@ -310,7 +313,7 @@ Function LinkApp( path$,lnk_files:TList,makelib:Int,opts$ )
 			End If
 		Else
 			Local prefix:String = processor.MinGWExePrefix()
-			sb.Append(CQuote(processor.Option("path_to_gpp", processor.MinGWBinPath() + "/" + prefix + "g++.exe")))
+			sb.Append(CQuote(processor.Option("path_to_gpp", processor.MinGWBinPath() + "/" + prefix + "g++" + ext)))
 
 			If Not processor.HasClang() Then
 				If version < 60000 Then