From 2d7acdeb8e8076954522cb9ab14cdd7bb099dab0 Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Sun, 13 Nov 2005 06:22:43 +0000 Subject: [PATCH] 0.9.6.41: Make the foreign-stack-alignment tests not fail on x86-64 (mind you, I'm convinced that the test is valid). * Pass -fPIC to cc on x86-64 * x86-64 wants 16-byte alignment * Add WITH-TESTs --- tests/foreign-stack-alignment.impure.lisp | 16 +++++++++++----- version.lisp-expr | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/foreign-stack-alignment.impure.lisp b/tests/foreign-stack-alignment.impure.lisp index 2ed55a3..9ed1a02 100644 --- a/tests/foreign-stack-alignment.impure.lisp +++ b/tests/foreign-stack-alignment.impure.lisp @@ -33,7 +33,8 @@ (defvar *required-alignment* #+(and ppc darwin) 16 #+(and ppc linux) 16 - #+(or mips x86-64) 8 + #+x86-64 16 + #+(or mips) 8 #+x86 4 #-(or x86 x86-64 mips (and ppc (or darwin linux))) (error "Unknown platform")) @@ -41,7 +42,9 @@ ;;;; fork/exec, so that no lisp is on the stack. This is our known-good ;;;; number. -(run "cc" "stack-alignment-offset.c" "-o" "stack-alignment-offset") +(run "cc" + #+x86-64 "-fPIC" + "stack-alignment-offset.c" "-o" "stack-alignment-offset") (defparameter *good-offset* (parse-integer (run "./stack-alignment-offset" @@ -50,6 +53,7 @@ ;;;; Build the tool again, this time as a shared object, and load it (run "cc" "stack-alignment-offset.c" + #+x86-64 "-fPIC" #+darwin "-bundle" #-darwin "-shared" "-o" "stack-alignment-offset.so") @@ -61,9 +65,11 @@ ;;;; Now get the offset by calling from lisp, first with a regular foreign function ;;;; call, then with an intervening callback. -(assert (= *good-offset* (stack-alignment-offset *required-alignment*))) +(with-test (:name :regular) + (assert (= *good-offset* (stack-alignment-offset *required-alignment*)))) -(assert (= *good-offset* (trampoline (alien-lambda int () - (stack-alignment-offset *required-alignment*))))) +(with-test (:name :callback) + (assert (= *good-offset* (trampoline (alien-lambda int () + (stack-alignment-offset *required-alignment*)))))) ;;;; success! diff --git a/version.lisp-expr b/version.lisp-expr index fcd86ec..381f362 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.6.40" +"0.9.6.41" -- 1.7.10.4