Commit 94a3d69a authored by Diederik van Arkel's avatar Diederik van Arkel

Use Processor info;

parent 26ce41dd
......@@ -11,7 +11,7 @@ import PmCompilerOptions
import PmTypes
//ifWindows w o :== o
standardStaticLibraries :: !LinkMethod -> List String
standardStaticLibraries :: !Processor !LinkMethod -> List String
standardObjectFiles :: !Bool !Bool !Processor -> List String
getLibs :: ![String] !*Files -> (!(![String],![String]),!*Files)
......@@ -121,7 +121,8 @@ Link :: // Links the given file:
!String // name of file containing symbols to be exported from dll
!Pathname // startup directory
!String // dynamic linker name
!Bool // add 'carb' 0 resource?
// !Bool // add 'carb' 0 resource?
!Processor // target processor
!*(PSt .l) // state
->
( !*(PSt .l) // state
......
......@@ -25,7 +25,8 @@ import Platform
KAEQueueReply :== 2
//import StdDebug,dodebug
import dodebug
//import nodebug
import nodebug
trace_n _ f :== f
fopena :== fopen
......@@ -51,8 +52,12 @@ send_command_to_clean_compiler_ca a b c
:== send_command_to_clean_compiler a b c
// = (0,0,"")
standardStaticLibraries :: !LinkMethod -> List String
standardStaticLibraries method
standardStaticLibraries :: !Processor !LinkMethod -> List String
standardStaticLibraries processor method
| ProcessorSuffix processor == ".cxo" // PowerPC Classic
= case method of
LM_Static -> ("cxo_library0" :! "cxo_library1" :! "cxo_library2" :! Nil)
LM_Dynamic -> ("cxo_library0" :! "cxo_library1" :! "cxo_library2" :! Nil)
= case method of
LM_Static -> ("library0" :! "library1" :! "library2" :! Nil)
// LM_Eager -> ("library0" :! "library1" :! "library2" :! Nil)
......@@ -483,13 +488,13 @@ where
Link :: !String !(WindowFun *(PSt .l)) !Pathname !ApplicationOptions
!Pathname !(List Pathname) !(List Pathname) !(List Pathname) !Bool
!Bool !Bool !Bool !String !Bool !String !Pathname !String !Bool !*(PSt .l)
!Bool !Bool !Bool !String !Bool !String !Pathname !String !Processor/*!Bool*/ !*(PSt .l)
-> (!*(PSt .l),!Bool)
Link linker` winfun path
applicationOptions=:{fs,fn,em,ss,hs,initial_heap_size,profiling,heap_size_multiple,o,memoryProfilingMinimumHeapSize=minheap}
optionspathname library_file_names object_file_names
static_libraries static gen_relocs gen_linkmap
link_resources resource_path gen_dll dll_names startupdir dynlinker add_carb_resource ps
link_resources resource_path gen_dll dll_names startupdir dynlinker processor/*add_carb_resource*/ ps
# (ok,linker) = mangleLinker linker` startupdir
| not ok
# ps = winfun [linker] ps
......@@ -536,7 +541,8 @@ Link linker` winfun path
| isEmpty objectFileNames
= (winfun ["Linker error: No objects to link."] ps,False)
| isMachOObject (hd objectFileNames)
// | isMachOObject (hd objectFileNames)
| ProcessorSuffix processor == ".o"
# (r1,r2) = send_command_to_application False "EXEC"
( "/usr/bin/cc "
+++ concat_object_file_names objectFileNames
......@@ -556,7 +562,7 @@ Link linker` winfun path
= (winfun ["Linker error: "+++toString r1] ps,False)
# ((link_ok,link_errors),ps)
= accFiles (link_xcoff_files objectFileNames libraryFileNames path
(fs,fn) hs heap_size_multiple ss flags em initial_heap_size minheap False add_carb_resource) ps
(fs,fn) hs heap_size_multiple ss flags em initial_heap_size minheap False (if (ProcessorSuffix processor == ".xo") True False)/*add_carb_resource*/) ps
# (errtext,errlines) = (link_errors, length link_errors);
| errlines<>0
......@@ -607,7 +613,8 @@ concat_object_file_names []
import linker_resources;
import code from
// "call_system_framework.o";
"call_system_framework.","pointer_glue."
// "call_system_framework.","pointer_glue."
"cUtilSystem."
to_unix_path p
# inpath = p +++ "\0"
......@@ -616,7 +623,7 @@ to_unix_path p
# (res,_) = hfs2posix inpath buffer bsize OSNewToolbox
| res <> 0
# posix = toString (takeWhile ((<>) '\0') [c \\ c <-: buffer])
= trace_n` ("Path",posix) posix
= trace_n ("Path",posix) posix
/*
to_unix_path p = "/Volumes/"+++ to_unix_path 0 p;
where
......@@ -862,7 +869,7 @@ send_command_to_clean_compiler0 signature command wait tb
= if (error_code6<>0) 0 v1
# output_string
= if (error_code7<>0) "" (result_string % (0,s2-1))
# tb = trace_n` ("CALL",error_code6,v1,error_code7,s2) tb
# tb = trace_n ("CALL",error_code6,v1,error_code7,s2) tb
= (os_error_code,error_n,output_string,tb)
where
loop tb
......@@ -1186,7 +1193,7 @@ where
= FindChar c line linelen (inc pos);
//////
import code from "cpathutil.xo"
//import code from "cpathutil.xo"
import code from library "winmod_library"
/*
Start
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment