[prev in list] [next in list] [prev in thread] [next in thread]
List: sbcl-commits
Subject: Re: [Sbcl-commits] master: Teach elfcore.test.sh about non-linux OSes and reenable.
From: Stas Boukarev <stassats () gmail ! com>
Date: 2020-05-28 16:52:43
Message-ID: CAF63=11ELHVGqGx44L=b5-P26y9p7oHC0gdySF9WVFCD7RU8Nw () mail ! gmail ! com
[Download RAW message or body]
I'm getting on Linux
2020-05-28T16:48:58.1072786Z /tmp/ccryO643.o: In function `sap-foreign-symbol':
2020-05-28T16:48:58.1073858Z
/tmp/elfcore-test-71463/elfcore-test.s:46668: undefined reference to
`dladdr'
2020-05-28T16:48:58.1074491Z /tmp/ccryO643.o: In function `DLERROR':
2020-05-28T16:48:58.1075086Z
/tmp/elfcore-test-71463/elfcore-test.s:46704: undefined reference to
`dlerror'
2020-05-28T16:48:58.1075804Z /tmp/ccryO643.o: In function `DLOPEN':
2020-05-28T16:48:58.1076811Z
/tmp/elfcore-test-71463/elfcore-test.s:109476: undefined reference to
`dlopen'
2020-05-28T16:48:58.1077300Z /tmp/ccryO643.o: In function `DLCLOSE':
2020-05-28T16:48:58.1077603Z
/tmp/elfcore-test-71463/elfcore-test.s:109497: undefined reference to
`dlclose'
2020-05-28T16:48:58.1077929Z /tmp/ccryO643.o: In function `DLSYM':
2020-05-28T16:48:58.1078218Z
/tmp/elfcore-test-71463/elfcore-test.s:109519: undefined reference to
`dlsym'
2020-05-28T16:48:58.1078498Z /tmp/ccryO643.o: In function `lisp_linkage_values':
On Thu, May 28, 2020 at 7:31 PM Joshua Elsasser via Sbcl-commits
<sbcl-commits@lists.sourceforge.net> wrote:
>
> The branch "master" has been updated in SBCL:
> via 75b031363a82f10636cde7d5a0f9017cb065badb (commit)
> from 4340486fe5b631936233b7f3c519869a10feca0a (commit)
>
> - Log -----------------------------------------------------------------
> commit 75b031363a82f10636cde7d5a0f9017cb065badb
> Author: Joshua Elsasser <joshua@elsasser.org>
> Date: Thu May 28 09:17:55 2020 -0700
>
> Teach elfcore.test.sh about non-linux OSes and reenable.
>
> 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.
> ---
> tests/elfcore.test.sh | 48 ++++++++++++++++++++++++++++--------------------
> tests/run-compiler.sh | 12 ++++++++++++
> 2 files changed, 40 insertions(+), 20 deletions(-)
>
> diff --git a/tests/elfcore.test.sh b/tests/elfcore.test.sh
> index 132056ff3..d04002418 100755
> --- a/tests/elfcore.test.sh
> +++ b/tests/elfcore.test.sh
> @@ -13,11 +13,17 @@
> # absolutely no warranty. See the COPYING and CREDITS files for
> # more information.
>
> -export TEST_BASEDIR=${TMPDIR:-/tmp}
> +. ../find-gnumake.sh
> +find_gnumake
> +
> +# sbcl likely won't run from /tmp on OpenBSD due to RWX mmap() restrictions
> +if [ "x$SBCL_SOFTWARE_TYPE" != xOpenBSD ]; then
> + export TEST_BASEDIR=${TMPDIR:-/tmp}
> +fi
> . ./subr.sh
>
> run_sbcl --noinform <<EOF
> - #+(and linux elf sb-thread)
> + #+(and elf sb-thread)
> (let ((s (find-symbol "IMMOBILE-SPACE-OBJ-P" "SB-KERNEL")))
> (when (and s (funcall s #'car)) (exit :code 0))) ; good
> (exit :code 2) ; otherwise
> @@ -31,7 +37,7 @@ fi
> set -e # exit on error
>
> # Ensure that we're not running a stale shrinkwrap-sbcl
> -(cd $SBCL_PWD/../src/runtime ; rm -f shrinkwrap-sbcl ; make shrinkwrap-sbcl)
> +(cd $SBCL_PWD/../src/runtime ; rm -f shrinkwrap-sbcl ; $GNUMAKE shrinkwrap-sbcl)
>
> $SBCL_PWD/../src/runtime/shrinkwrap-sbcl --disable-debugger --noprint <<EOF
> (dotimes (i 100000) (sb-vm::alloc-immobile-fdefn))
> @@ -61,35 +67,37 @@ EOF
>
> m_arg=`run_sbcl --eval '(progn #+sb-core-compression (princ " -lz") #+x86 (princ " -m32"))' --quit`
>
> -(cd $SBCL_PWD/../src/runtime ; rm -f libsbcl.a; make libsbcl.a)
> +(cd $SBCL_PWD/../src/runtime ; rm -f libsbcl.a; $GNUMAKE libsbcl.a)
> run_sbcl --script ../tools-for-build/editcore.lisp split \
> ${tmpcore} $TEST_DIRECTORY/elfcore-test.s
> # I guess we're going to have to hardwire the system libraries
> # until I can figure out how to get a Makefile to work, which is fine
> # for now because elfination is only supported on linux/x86-64.
> -./run-compiler.sh -no-pie -g -o $TEST_DIRECTORY/elfcore-test \
> +./run-compiler.sh -sbcl-libs -no-pie -g -o $TEST_DIRECTORY/elfcore-test \
> $TEST_DIRECTORY/elfcore-test.s \
> $TEST_DIRECTORY/elfcore-test-core.o \
> - $SBCL_PWD/../src/runtime/libsbcl.a -ldl -lm -lpthread ${m_arg}
> + $SBCL_PWD/../src/runtime/libsbcl.a -lm -lpthread ${m_arg}
>
> $TEST_DIRECTORY/elfcore-test $SBCL_ARGS --eval '(assert (zerop (f 1 2 3)))' --quit
> echo Custom core: PASS
>
> -./run-compiler.sh -no-pie -g -o $TEST_DIRECTORY/relocating-elfcore-test \
> - $TEST_DIRECTORY/elfcore-test.s \
> - $TEST_DIRECTORY/elfcore-test-core.o \
> - $SBCL_PWD/../tests/heap-reloc/fake-mman.c \
> - $SBCL_PWD/../src/runtime/libsbcl.a -ldl -lm -lpthread ${m_arg}
> +if [ "x$SBCL_SOFTWARE_TYPE" = xLinux ]; then
> + ./run-compiler.sh -sbcl-libs -no-pie -g -o $TEST_DIRECTORY/relocating-elfcore-test \
> + $TEST_DIRECTORY/elfcore-test.s \
> + $TEST_DIRECTORY/elfcore-test-core.o \
> + $SBCL_PWD/../tests/heap-reloc/fake-mman.c \
> + $SBCL_PWD/../src/runtime/libsbcl.a -lm -lpthread ${m_arg}
>
> -(cd $SBCL_PWD/../src/runtime ; rm -f libsbcl.a)
> + (cd $SBCL_PWD/../src/runtime ; rm -f libsbcl.a)
>
> -export SBCL_FAKE_MMAP_INSTRUCTION_FILE=heap-reloc/fakemap
> -i=1
> -while [ $i -le 6 ]
> -do
> - echo Trial $i
> - i=`expr $i + 1`
> - $TEST_DIRECTORY/relocating-elfcore-test $SBCL_ARGS --eval '(assert (zerop (f 1 2 3)))' --quit
> -done
> + export SBCL_FAKE_MMAP_INSTRUCTION_FILE=heap-reloc/fakemap
> + i=1
> + while [ $i -le 6 ]
> + do
> + echo Trial $i
> + i=`expr $i + 1`
> + $TEST_DIRECTORY/relocating-elfcore-test $SBCL_ARGS --eval '(assert (zerop (f 1 2 3)))' --quit
> + done
> +fi
>
> exit $EXIT_TEST_WIN
> diff --git a/tests/run-compiler.sh b/tests/run-compiler.sh
> index bff44c110..9ce33557c 100755
> --- a/tests/run-compiler.sh
> +++ b/tests/run-compiler.sh
> @@ -20,6 +20,14 @@ case "$platform" in
> FreeBSD-X86) args="-m32" ;;
> esac
>
> +libs=
> +case "$platform" in
> + Linux-*) libs=-ldl ;;
> + FreeBSD-*) libs=-lutil ;;
> + OpenBSD-*) libs="-Wl,-z,wxneeded -lutil" ;;
> + NetBSD-*) libs=-lutil ;;
> +esac
> +
> while [ $# -gt 0 ]; do
> arg="$1"
> new=
> @@ -28,6 +36,10 @@ while [ $# -gt 0 ]; do
> new=-fPIC
> ;;
>
> + -sbcl-libs)
> + new="$libs"
> + ;;
> +
> -sbcl-shared)
> case "$platform" in
> Darwin-*) new=-bundle ;;
>
> -----------------------------------------------------------------------
>
>
> hooks/post-receive
> --
> SBCL
>
>
> _______________________________________________
> Sbcl-commits mailing list
> Sbcl-commits@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sbcl-commits
_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic