This adds a new -sbcl-libs flag to tests/run-compiler.sh for adding
flags necessary to link the runtime and uses it in elfcore.test.sh.
Ideally the makefiles from src/runtime/ would be used to avoid
duplication, but this is a simpler and less invasive change.
Additionally, don't try to execute an sbcl from /tmp on OpenBSD, RWX
mmap() restrictions mean that anywhere outside the source directory is
unlikely to work.
It's assumed that the C stack grows upward everywhere but X86oids,
which is not true. Define two new conditions,
ALIEN_STACK_GROWS_DOWNWARD and ALIEN_STACK_GROWS_UPWARD.
This fixes FFI issues on PPC.
a.) support for Solaris /bin/sh in sh-based tests (`...` for $(...), and no
test -e)
b.) Make run-compiler.sh obey $CC, if set, and teach it about Solaris
arch support.
Patch by Josh Elsasser, lp#615499.
In his words:
"Attached is a patch which moves all the duplicated, out-of-sync C
compiler flag selection in the tests into a single wrapper script.
When passed a flag like -sbcl-pic or -sbcl-shared, the script will
decided if -fPIC or -shared/-bundle is needed based on SOFTWARE-TYPE
and MACHINE-TYPE which SBCL has passed in the environment.
I tested this on several x86 OSes and a couple PowerPC, as well as
SunOS on SPARC and OpenBSD on x86-64. For the -sbcl-pic case I have
verified that -fPIC is needed on OpenBSD-PowerPC, OpenBSD-X86-64,
SunOS-SPARC and SunOS-X86; the other cases are guesses based on the
existing reader conditionals. It is not needed on Darwin or Linux on
PowerPC, or on any x86 OSes I tested aside from SunOS.
I haven't verified that -arch x86_64 is actually needed on
Darwin-X86-64, or that something like -m64 isn't needed on other
X86-64 OSes (aside from OpenBSD)."