Cleanup a warning - if we are doing linkall and cannot find either static or dynamic libs, than that is clearly an unrecoverable error. Print a nice message and exit.
This commit was SVN r27895.
Этот коммит содержится в:
родитель
6cd56c1e87
Коммит
c7fe108601
@ -855,7 +855,7 @@ main(int argc, char *argv[])
|
|||||||
bool have_static_lib;
|
bool have_static_lib;
|
||||||
bool have_dyn_lib;
|
bool have_dyn_lib;
|
||||||
bool use_static_libs;
|
bool use_static_libs;
|
||||||
char *filename;
|
char *filename1, *filename2;
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
|
|
||||||
opal_argv_insert(&exec_argv, exec_argc, options_data[user_data_idx].link_flags);
|
opal_argv_insert(&exec_argv, exec_argc, options_data[user_data_idx].link_flags);
|
||||||
@ -877,15 +877,15 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
filename = opal_os_path( false, options_data[user_data_idx].path_libdir, options_data[user_data_idx].static_lib_file, NULL );
|
filename1 = opal_os_path( false, options_data[user_data_idx].path_libdir, options_data[user_data_idx].static_lib_file, NULL );
|
||||||
if (0 == stat(filename, &buf)) {
|
if (0 == stat(filename1, &buf)) {
|
||||||
have_static_lib = true;
|
have_static_lib = true;
|
||||||
} else {
|
} else {
|
||||||
have_static_lib = false;
|
have_static_lib = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = opal_os_path( false, options_data[user_data_idx].path_libdir, options_data[user_data_idx].dyn_lib_file, NULL );
|
filename2 = opal_os_path( false, options_data[user_data_idx].path_libdir, options_data[user_data_idx].dyn_lib_file, NULL );
|
||||||
if (0 == stat(filename, &buf)) {
|
if (0 == stat(filename2, &buf)) {
|
||||||
have_dyn_lib = true;
|
have_dyn_lib = true;
|
||||||
} else {
|
} else {
|
||||||
have_dyn_lib = false;
|
have_dyn_lib = false;
|
||||||
@ -899,6 +899,13 @@ main(int argc, char *argv[])
|
|||||||
static or dynamic form. */
|
static or dynamic form. */
|
||||||
if (have_static_lib || have_dyn_lib) {
|
if (have_static_lib || have_dyn_lib) {
|
||||||
use_static_libs = true;
|
use_static_libs = true;
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "The linkall option has failed as we were unable to find either static or dynamic libs\n"
|
||||||
|
"Files looked for:\n Static: %s\n Dynamic: %s\n",
|
||||||
|
filename1, filename2);
|
||||||
|
free(filename1);
|
||||||
|
free(filename2);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
} else if (flags & COMP_WANT_STATIC) {
|
} else if (flags & COMP_WANT_STATIC) {
|
||||||
/* If --static (or something like it) was specified, if we
|
/* If --static (or something like it) was specified, if we
|
||||||
@ -920,6 +927,8 @@ main(int argc, char *argv[])
|
|||||||
use_static_libs = true;
|
use_static_libs = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(filename1);
|
||||||
|
free(filename2);
|
||||||
|
|
||||||
if (use_static_libs) {
|
if (use_static_libs) {
|
||||||
opal_argv_insert(&exec_argv, exec_argc, options_data[user_data_idx].libs_static);
|
opal_argv_insert(&exec_argv, exec_argc, options_data[user_data_idx].libs_static);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user