Merge branch 'inlinec' of git://github.com/jedahu/factor

db4
Slava Pestov 2009-07-15 19:03:18 -05:00
commit a226907836
1 changed files with 11 additions and 2 deletions
basis/alien/inline/compiler

View File

@ -27,24 +27,32 @@ SYMBOL: C++
HOOK: compiler os ( lang -- str )
M: word compiler ( lang -- str )
M: word compiler
{
{ C [ "gcc" ] }
{ C++ [ "g++" ] }
} case ;
M: openbsd compiler ( lang -- str )
M: openbsd compiler
{
{ C [ "gcc" ] }
{ C++ [ "eg++" ] }
} case ;
M: windows compiler
{
{ C [ "gcc" ] }
{ C++ [ "gcc" ] }
} case ;
HOOK: compiler-descr os ( lang -- descr )
M: word compiler-descr compiler 1array ;
M: macosx compiler-descr
call-next-method cpu x86.64?
[ { "-arch" "x86_64" } append ] when ;
M: windows compiler-descr
call-next-method { "-x" "c++" } append ;
HOOK: link-descr os ( -- descr )
@ -52,6 +60,7 @@ M: word link-descr { "-shared" "-o" } ;
M: macosx link-descr
{ "-g" "-prebind" "-dynamiclib" "-o" }
cpu x86.64? [ { "-arch" "x86_64" } prepend ] when ;
M: windows link-descr { "-lstdc++" "-mno-cygwin" "-o" } ;
<PRIVATE
: src-suffix ( lang -- str )