From 7350d9097ce6fb35bf1965a05f29447fdddce3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Mon, 22 Jul 2019 00:00:00 +0000 Subject: [PATCH] 0323e81bff1d55b978a4b36b9701570b59b981eb --- index.html | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/index.html b/index.html index 4bcfd3f..e867f2c 100644 --- a/index.html +++ b/index.html @@ -7303,6 +7303,40 @@ qemu: uncaught target signal 6 (Aborted) - core dumped
ld: cannot find -lopenblas
+
+

g++ and pthreads also causes issues: https://stackoverflow.com/questions/35116327/when-g-static-link-pthread-cause-segmentation-fault-why

+
+
+

As a consequence, the following fails:

+
+
+
+
./run --userland userland/cpp/atomic.cpp --static
+
+
+
+

with error:

+
+
+
+
qemu-x86_64: /path/to/linux-kernel-module-cheat/submodules/qemu/accel/tcg/cpu-exec.c:700: cpu_exec: Assertion `!have_mmap_lock()' failed.
+qemu-x86_64: /path/to/linux-kernel-module-cheat/submodules/qemu/accel/tcg/cpu-exec.c:700: cpu_exec: Assertion `!have_mmap_lock()' failed.
+
+
+
+

and if we manually build and run natively on host it segfaults.

+
+
+

If we hack the compilation command to do instead:

+
+
+
+
-pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
+
+
+
+

then it works. We should automate that at some point.

+