mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
static g++: clarify pthread problems further
This commit is contained in:
@@ -3899,7 +3899,10 @@ it fails with:
|
||||
ld: cannot find -lopenblas
|
||||
....
|
||||
|
||||
`g++` and pthreads also causes issues: https://stackoverflow.com/questions/35116327/when-g-static-link-pthread-cause-segmentation-fault-why
|
||||
`g++` and pthreads also causes issues:
|
||||
|
||||
* https://stackoverflow.com/questions/35116327/when-g-static-link-pthread-cause-segmentation-fault-why
|
||||
* https://stackoverflow.com/questions/58848694/gcc-whole-archive-recipe-for-static-linking-to-pthread-stopped-working-in-rec
|
||||
|
||||
As a consequence, the following fails:
|
||||
|
||||
@@ -3916,13 +3919,13 @@ qemu-x86_64: /path/to/linux-kernel-module-cheat/submodules/qemu/accel/tcg/cpu-ex
|
||||
|
||||
and if we manually build and run natively on host it segfaults.
|
||||
|
||||
If we hack the compilation command to do instead:
|
||||
The workaround:
|
||||
|
||||
....
|
||||
-pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
|
||||
....
|
||||
|
||||
then it works. We should automate that at some point.
|
||||
fixes some of the problems, but not all, so we are just skipping those tests for now.
|
||||
|
||||
=== gem5 syscall emulation mode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user