Tobias Heider <tobias.hei...@stusta.de> writes: > On Thu, Nov 23, 2023 at 11:02:22AM +0100, Sebastien Marie wrote: >> gkoeh...@openbsd.org writes: >> > http://build-failures.rhaalovely.net/powerpc/2023-10-31/lang/sbcl.log >> >> Could someone test the following patch for lang/sbcl on powerpc ? >> If it works, I will push it upstream. > > This fixes the first problem but after that I ran into an undefined > symbol current_thread error. > > It looks like arm64 already handles this correctly in arm64-assem.S:114 > but a simple s/current_thread/__emutls_v.current_thread/ was not enough > since it caused runtime errors later on.
oh. direct TLS seems to not be expected for powerpc: Linux code enable it only for some archs (and ppc isn't in the list). So follow the same way. Does it correct the problem ? (and does #include "validate.h" is still need ?) Thanks. diff /home/semarie/repos/openbsd/ports/mystuff/lang/sbcl commit - 665eeac5c5d6c581db4785cba6292a0e5fc1bbf2 path + /home/semarie/repos/openbsd/ports/mystuff/lang/sbcl blob - /dev/null file + patches/patch-make-config_sh (mode 640) --- /dev/null +++ patches/patch-make-config_sh @@ -0,0 +1,15 @@ +Index: make-config.sh +--- make-config.sh.orig ++++ make-config.sh +@@ -610,7 +610,10 @@ case "$sbcl_os" in + ;; + openbsd) + printf ' :openbsd' >> $ltf +- printf ' :gcc-tls' >> $ltf ++ case "$sbcl_arch" in ++ arm64 | x86 | x86-64) ++ printf ' :gcc-tls' >> $ltf ++ esac + link_or_copy Config.$sbcl_arch-openbsd Config + ;; + netbsd) blob - /dev/null file + patches/patch-src_runtime_ppc-assem_S (mode 640) --- /dev/null +++ patches/patch-src_runtime_ppc-assem_S @@ -0,0 +1,11 @@ +Index: src/runtime/ppc-assem.S +--- src/runtime/ppc-assem.S.orig ++++ src/runtime/ppc-assem.S +@@ -5,6 +5,7 @@ + + #include "sbcl.h" + #include "lispregs.h" ++#include "validate.h" + #include "genesis/closure.h" + #include "genesis/static-symbols.h" + #include "genesis/thread.h" -- Sebastien Marie