commit | e04c1173c1d76575fd1cf968d421bdf1dec82606 | [log] [tgz] |
---|---|---|
author | Andrew Geissler <geissonator@yahoo.com> | Mon Jun 14 11:27:35 2021 -0500 |
committer | Andrew Geissler <geissonator@yahoo.com> | Wed Jun 16 15:33:34 2021 +0000 |
tree | 1193955ac8eda450bc4533a59c1856643b787c1d | |
parent | 0d369c6311a574db312f4a55469d3eed75da1186 [diff] |
meson: fix static initialization order race condition When moving over to meson, openpower-proc-control started seg faulting whenever it was run. It was not even making it to the main() function. Upon investigation, it was found that when moving to meson, this code started hitting an issue where the hw procedure registration code was hitting a common static initialization race condition. Whether you hit this issue is pretty much at the whim of the compiler and the build system so Automake did not hit it, but meson does. The following has a pretty good write up on the issue and how to avoid it: https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use-members This commit utilizes the solution proposed in that doc Tested: - Verified that openpower-proc-control built via meson now works as expected. Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I0ea5ef68e73fe4fa08e9cf8e4e3f1dbc8476a2de
Contains procedures that interact with the OpenPower nest chipset.
To build this package, do the following steps: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make To build with phal feature: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} --enable-phal --enable-openfsi 3. make To clean the repository run `./bootstrap.sh clean`.