static g++: clarify pthread problems further

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-11-15 00:00:00 +00:00
parent adf3ab1288
commit 730eb8e991
2 changed files with 10 additions and 4 deletions

View File

@@ -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

View File

@@ -561,7 +561,10 @@ path_properties_tuples = (
},
{
'abort.c': {'signal_received': signal.Signals.SIGABRT},
'atomic.c': {'baremetal': False},
'atomic.c': {
'baremetal': False,
'test_run_args': {'cpus': 3},
},
'assert_fail.c': {'signal_received': signal.Signals.SIGABRT},
# This has complex failure modes, too hard to assert.
'smash_stack.c': {'skip_run_unclassified': True},