pmix_base: fix global opal_pmix symbol for static linking on OS X
OS X has weirdness when static linking. If a symbol is not initialized, it is put into the common block section, and Weird Things happen (linking when trying to using that global symbol will fail). If you initialize the variable, it goes into a different section (and linking to it will work). This link (that might go stale someday) has some information about OS X linker scope and treatment of symbol definitions: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/MachOTopics/1-Articles/executing_files.html#//apple_ref/doc/uid/TP40001829-98432-TPXREF120 Fixes #375.
Этот коммит содержится в:
родитель
2762ef870d
Коммит
621af3aa07
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -15,6 +16,7 @@
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/mca/base/base.h"
|
||||
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
|
||||
|
||||
@ -26,7 +28,11 @@
|
||||
|
||||
#include "opal/mca/pmix/base/static-components.h"
|
||||
|
||||
opal_pmix_base_module_t opal_pmix;
|
||||
/* Note that this initializer is important -- do not remove it! See
|
||||
https://github.com/open-mpi/ompi/issues/375 for details. */
|
||||
opal_pmix_base_module_t opal_pmix = {
|
||||
.init = (opal_pmix_base_module_init_fn_t) NULL
|
||||
};
|
||||
bool opal_pmix_use_collective = false;
|
||||
bool opal_pmix_base_allow_delayed_server = false;
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user