X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fforeign-stack-alignment.impure.lisp;h=cdf88447bc9664ceeed53de38f6cf83e42434cae;hb=87cd7d9848d9beddbf74e9d56a0c0aea6e189ead;hp=0f416e3f2d0aa18834b32c75a014c858dde6ed19;hpb=4e6200853a661da5e73d0843a4afca9077a06fa8;p=sbcl.git diff --git a/tests/foreign-stack-alignment.impure.lisp b/tests/foreign-stack-alignment.impure.lisp index 0f416e3..cdf8844 100644 --- a/tests/foreign-stack-alignment.impure.lisp +++ b/tests/foreign-stack-alignment.impure.lisp @@ -35,7 +35,8 @@ #+(and ppc linux) 8 #+x86-64 16 #+mips 8 - #+x86 4 + #+(and x86 (not darwin)) 4 + #+(and x86 darwin) 16 #-(or x86 x86-64 mips (and ppc (or darwin linux))) (error "Unknown platform")) ;;;; Build the offset-tool as regular excutable, and run it with @@ -43,7 +44,8 @@ ;;;; number. (run "cc" - #+(and linux (or x86-64 ppc)) "-fPIC" + #+(and (or linux freebsd) (or x86-64 ppc mips)) "-fPIC" + #+(and x86-64 darwin) "-arch" #+(and x86-64 darwin) "x86_64" "stack-alignment-offset.c" "-o" "stack-alignment-offset") (defparameter *good-offset* @@ -53,7 +55,8 @@ ;;;; Build the tool again, this time as a shared object, and load it (run "cc" "stack-alignment-offset.c" - #+(and linux (or x86-64 ppc)) "-fPIC" + #+(and (or linux freebsd) (or x86-64 ppc mips)) "-fPIC" + #+(and x86-64 darwin) "-arch" #+(and x86-64 darwin) "x86_64" #+darwin "-bundle" #-darwin "-shared" "-o" "stack-alignment-offset.so") @@ -72,4 +75,7 @@ (assert (= *good-offset* (trampoline (alien-lambda int () (stack-alignment-offset *required-alignment*)))))) +(delete-file "stack-alignment-offset") +(delete-file "stack-alignment-offset.so") + ;;;; success!