1
1
remove requirements on .la files on wrapper scripts

Ticket: #374
  extend compilers to support 32 bit and 64 bit in one version of the wrapper

Submitted by: Dan Lacher
Reviewed by: Rolf Vandevaart

This commit was SVN r11908.
Этот коммит содержится в:
Dan Lacher 2006-09-29 23:58:58 +00:00
родитель 17539dc154
Коммит ba0389723e
11 изменённых файлов: 318 добавлений и 60 удалений

Просмотреть файл

@ -10,6 +10,8 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
dnl Use is subject to license terms.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@ -42,6 +44,11 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[
USER_WRAPPER_EXTRA_LDFLAGS=
USER_WRAPPER_EXTRA_LIBS=
WRAPPER_32_BIT_INCDIR=
WRAPPER_32_BIT_LIBDIR=
WRAPPER_64_BIT_INCDIR=
WRAPPER_64_BIT_LIBDIR=
AC_ARG_WITH([wrapper-cflags],
[AC_HELP_STRING([--with-wrapper-cflags],
[Extra flags to add to CFLAGS when using mpicc])])
@ -95,6 +102,52 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_INIT],[
elif test ! -z "$with_wrapper_libs" ; then
USER_WRAPPER_EXTRA_LIBS="$with_wrapper_libs"
fi
AC_ARG_WITH([wrapper-32-bit-incdir],
AC_HELP_STRING([--with-wrapper-32-bit-incdir=include],
[defined where the 32 bit header files are located in relation to prefix]))
if test "$with_wrapper_32_bit_incdir" = "yes" -o "$with_wrapper_32_bit_incdir" = "no"; then
AC_MSG_ERROR([--with-wrapper-32-bit-incdir must have an argument. Aborting])
elif test ! -z "$with_wrapper_32_bit_incdir" ; then
WRAPPER_32_BIT_INCDIR="$with_wrapper_32_bit_incdir"
fi
AC_ARG_WITH([wrapper-32-bit-libdir],
AC_HELP_STRING([--with-wrapper-32-bit-libdir=lib],
[defined where the 32 bit library files are located in relation to prefix]))
if test "$with_wrapper_32_bit_libdir" = "yes" -o "$with_wrapper_32_bit_libdir" = "no"; then
AC_MSG_ERROR([--with-wrapper-32-bit-libdir must have an argument. Aborting])
elif test ! -z "$with_wrapper_32_bit_libdir" ; then
WRAPPER_32_BIT_LIBDIR="$with_wrapper_32_bit_libdir"
fi
if (test "${with_wrapper_32_bit_incdir+set}" != set && test "${with_wrapper_32_bit_libdir+set}" = set ) ||
(test "${with_wrapper_32_bit_incdir+set}" = set && test "${with_wrapper_32_bit_libdir+set}" != set ) ; then
AC_MSG_ERROR([Using --with-wrapper-32-bit-incdir or --with-wrapper-32-bit-libdir requires the setting of both values. Aborting])
fi
AC_ARG_WITH([wrapper-64-bit-incdir],
AC_HELP_STRING([--with-wrapper-64-bit-incdir=include],
[defined where the 64 bit header files are located in relation to prefix]))
if test "$with_wrapper_64_bit_incdir" = "yes" -o "$with_wrapper_64_bit_incdir" = "no"; then
AC_MSG_ERROR([--with-wrapper-64-bit-incdir must have an argument. Aborting])
elif test ! -z "$with_wrapper_64_bit_incdir" ; then
WRAPPER_64_BIT_INCDIR="$with_wrapper_64_bit_incdir"
fi
AC_ARG_WITH([wrapper-64-bit-libdir],
AC_HELP_STRING([--with-wrapper-64-bit-libdir=lib],
[defined where the 64 bit library files are located in relation to prefix]))
if test "$with_wrapper_64_bit_libdir" = "yes" -o "$with_wrapper_64_bit_libdir" = "no"; then
AC_MSG_ERROR([--with-wrapper-64-bit-libdir must have an argument. Aborting])
elif test ! -z "$with_wrapper_64_bit_libdir" ; then
WRAPPER_64_BIT_LIBDIR="$with_wrapper_64_bit_libdir"
fi
if (test "${with_wrapper_64_bit_incdir+set}" != set && test "${with_wrapper_64_bit_libdir+set}" = set ) ||
(test "${with_wrapper_64_bit_incdir+set}" = set && test "${with_wrapper_64_bit_libdir+set}" != set ) ; then
AC_MSG_ERROR([Using --with-wrapper-64-bit-incdir or --with-wrapper-64-bit-libdir requires the setting of both values. Aborting])
fi
])
@ -146,6 +199,25 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
AC_SUBST([OPAL_WRAPPER_EXTRA_INCLUDES])
AC_MSG_RESULT([$OPAL_WRAPPER_EXTRA_INCLUDES])
AC_MSG_CHECKING([for OPAL 32 BIT INCS])
OPAL_WRAPPER_32_BIT_INCDIR="$WRAPPER_32_BIT_INCDIR"
AC_SUBST([OPAL_WRAPPER_32_BIT_INCDIR])
AC_MSG_RESULT([$OPAL_WRAPPER_32_BIT_INCDIR])
AC_MSG_CHECKING([for OPAL 32 BIT LIBS])
OPAL_WRAPPER_32_BIT_LIBDIR="$WRAPPER_32_BIT_LIBDIR"
AC_SUBST([OPAL_WRAPPER_32_BIT_LIBDIR])
AC_MSG_RESULT([$OPAL_WRAPPER_32_BIT_LIBDIR])
AC_MSG_CHECKING([for OPAL 64 BIT INCS])
OPAL_WRAPPER_64_BIT_INCDIR="$WRAPPER_64_BIT_INCDIR"
AC_SUBST([OPAL_WRAPPER_64_BIT_INCDIR])
AC_MSG_RESULT([$OPAL_WRAPPER_64_BIT_INCDIR])
AC_MSG_CHECKING([for OPAL 64 BIT LIBS])
OPAL_WRAPPER_64_BIT_LIBDIR="$WRAPPER_64_BIT_LIBDIR"
AC_SUBST([OPAL_WRAPPER_64_BIT_LIBDIR])
AC_MSG_RESULT([$OPAL_WRAPPER_64_BIT_LIBDIR])
#
# ORTE
@ -183,6 +255,25 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
AC_SUBST([ORTE_WRAPPER_EXTRA_INCLUDES])
AC_MSG_RESULT([$ORTE_WRAPPER_EXTRA_INCLUDES])
AC_MSG_CHECKING([for ORTE 32 BIT INCS])
ORTE_WRAPPER_32_BIT_INCDIR="$OPAL_WRAPPER_32_BIT_INCDIR"
AC_SUBST([ORTE_WRAPPER_32_BIT_INCDIR])
AC_MSG_RESULT([$ORTE_WRAPPER_32_BIT_INCDIR])
AC_MSG_CHECKING([for ORTE 32 BIT LIBS])
ORTE_WRAPPER_32_BIT_LIBDIR="$OPAL_WRAPPER_32_BIT_LIBDIR"
AC_SUBST([ORTE_WRAPPER_32_BIT_LIBDIR])
AC_MSG_RESULT([$ORTE_WRAPPER_32_BIT_LIBDIR])
AC_MSG_CHECKING([for ORTE 64 BIT INCS])
ORTE_WRAPPER_64_BIT_INCDIR="$OPAL_WRAPPER_64_BIT_INCDIR"
AC_SUBST([ORTE_WRAPPER_64_BIT_INCDIR])
AC_MSG_RESULT([$ORTE_WRAPPER_64_BIT_INCDIR])
AC_MSG_CHECKING([for ORTE 64 BIT LIBS])
ORTE_WRAPPER_64_BIT_LIBDIR="$OPAL_WRAPPER_64_BIT_LIBDIR"
AC_SUBST([ORTE_WRAPPER_64_BIT_LIBDIR])
AC_MSG_RESULT([$ORTE_WRAPPER_64_BIT_LIBDIR])
#
# OMPI
@ -225,6 +316,26 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
AC_SUBST([OMPI_WRAPPER_EXTRA_LIBS])
AC_MSG_RESULT([$OMPI_WRAPPER_EXTRA_LIBS])
AC_MSG_CHECKING([for OMPI 32 BIT INCS])
OMPI_WRAPPER_32_BIT_INCDIR="$ORTE_WRAPPER_32_BIT_INCDIR"
AC_SUBST([OMPI_WRAPPER_32_BIT_INCDIR])
AC_MSG_RESULT([$OMPI_WRAPPER_32_BIT_INCDIR])
AC_MSG_CHECKING([for OMPI 32 BIT LIBS])
OMPI_WRAPPER_32_BIT_LIBDIR="$ORTE_WRAPPER_32_BIT_LIBDIR"
AC_SUBST([OMPI_WRAPPER_32_BIT_LIBDIR])
AC_MSG_RESULT([$OMPI_WRAPPER_32_BIT_LIBDIR])
AC_MSG_CHECKING([for OMPI 64 BIT INCS])
OMPI_WRAPPER_64_BIT_INCDIR="$ORTE_WRAPPER_64_BIT_INCDIR"
AC_SUBST([OMPI_WRAPPER_64_BIT_INCDIR])
AC_MSG_RESULT([$OMPI_WRAPPER_64_BIT_INCDIR])
AC_MSG_CHECKING([for OMPI 64 BIT LIBS])
OMPI_WRAPPER_64_BIT_LIBDIR="$ORTE_WRAPPER_64_BIT_LIBDIR"
AC_SUBST([OMPI_WRAPPER_64_BIT_LIBDIR])
AC_MSG_RESULT([$OMPI_WRAPPER_64_BIT_LIBDIR])
AC_MSG_CHECKING([for OMPI extra include dirs])
if test "$WANT_INSTALL_HEADERS" = "1" ; then
# Always include openmpi in case C++ bindings get installed
@ -239,7 +350,7 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
# compiler should work even if there is no language support.
if test "$WANT_MPI_CXX_SUPPORT" = "1" ; then
OMPI_WRAPPER_CXX_LIB="-lmpi_cxx"
OMPI_WRAPPER_CXX_REQUIRED_FILE="libmpi_cxx.la"
OMPI_WRAPPER_CXX_REQUIRED_FILE=""
else
OMPI_WRAPPER_CXX_LIB=""
OMPI_WRAPPER_CXX_REQUIRED_FILE=""
@ -255,7 +366,7 @@ AC_DEFUN([OMPI_SETUP_WRAPPER_FINAL],[
AC_SUBST([OMPI_WRAPPER_F77_REQUIRED_FILE])
if test "$OMPI_WANT_F90_BINDINGS" = "1" ; then
OMPI_WRAPPER_F90_REQUIRED_FILE="libmpi_f90.la"
OMPI_WRAPPER_F90_REQUIRED_FILE=""
else
OMPI_WRAPPER_F90_REQUIRED_FILE="not supported"
fi

Просмотреть файл

@ -11,3 +11,7 @@ compiler_flags=@OMPI_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=@OMPI_WRAPPER_CXX_LIB@ -lmpi -lorte -lopal @OMPI_WRAPPER_EXTRA_LIBS@
required_file=@OMPI_WRAPPER_CXX_REQUIRED_FILE@
libdir32=@OMPI_WRAPPER_32_BIT_LIBDIR@
incdir32=@OMPI_WRAPPER_32_BIT_INCDIR@
libdir64=@OMPI_WRAPPER_64_BIT_LIBDIR@
incdir64=@OMPI_WRAPPER_64_BIT_INCDIR@

Просмотреть файл

@ -11,3 +11,7 @@ compiler_flags=@OMPI_WRAPPER_EXTRA_CFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=-lmpi -lorte -lopal @OMPI_WRAPPER_EXTRA_LIBS@
required_file=
libdir32=@OMPI_WRAPPER_32_BIT_LIBDIR@
incdir32=@OMPI_WRAPPER_32_BIT_INCDIR@
libdir64=@OMPI_WRAPPER_64_BIT_LIBDIR@
incdir64=@OMPI_WRAPPER_64_BIT_INCDIR@

Просмотреть файл

@ -11,3 +11,7 @@ compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=-lmpi_f77 -lmpi -lorte -lopal @OMPI_WRAPPER_EXTRA_LIBS@
required_file=@OMPI_WRAPPER_F77_REQUIRED_FILE@
libdir32=@OMPI_WRAPPER_32_BIT_LIBDIR@
incdir32=@OMPI_WRAPPER_32_BIT_INCDIR@
libdir64=@OMPI_WRAPPER_64_BIT_LIBDIR@
incdir64=@OMPI_WRAPPER_64_BIT_INCDIR@

Просмотреть файл

@ -12,3 +12,7 @@ compiler_flags=@OMPI_WRAPPER_EXTRA_FFLAGS@
linker_flags=@OMPI_WRAPPER_EXTRA_LDFLAGS@
libs=-lmpi_f90 -lmpi_f77 -lmpi -lorte -lopal @OMPI_WRAPPER_EXTRA_LIBS@
required_file=@OMPI_WRAPPER_F90_REQUIRED_FILE@
libdir32=@OMPI_WRAPPER_32_BIT_LIBDIR@
incdir32=@OMPI_WRAPPER_32_BIT_INCDIR@
libdir64=@OMPI_WRAPPER_64_BIT_LIBDIR@
incdir64=@OMPI_WRAPPER_64_BIT_INCDIR@

Просмотреть файл

@ -10,6 +10,8 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -22,6 +24,7 @@
[no-language-support]
Unfortunately, this installation of Open MPI was not compiled with
%s support. As such, the %s compiler is non-functional.
[no-profiling-support]
warning: "-lpmpi" was included on the command line indicating use of MPI
warning: profiling layer. However, Open MPI was not compiled with support
@ -32,8 +35,10 @@ The Open MPI wrapper compiler was unable to find the specified compiler
Note that this compiler was either specified at configure time or in
one of several possible environment variables.
[version]
%s: %s %s (Language: %s)
[usage]
%s [-showme[:<command,compile,link,incdirs,
libdirs,libs,version>]] args
@ -58,3 +63,6 @@ The failed command was [%s].
[compiler-failed]
The child process (%s) exit with error %d.
The failed command was [%s].
[multiple-bit-flags]
%s: options -32 and -64 must be used independently

Просмотреть файл

@ -9,6 +9,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -59,6 +61,7 @@ extern char **environ;
#define OPAL_INCLUDE_PATTERN "/I"
#define OPAL_LIBDIR_PATTERN "/LIBPATH:"
#endif /* !defined(__WINDOWS__) */
#define POINTER_SIZE_64_BIT 8 /* Used to determine if binary is 32-bit or 64-bit */
struct {
char *language;
@ -73,6 +76,10 @@ struct {
char **comp_flags;
char **link_flags;
char **libs;
char *incdir32;
char *libdir32;
char *incdir64;
char *libdir64;
char *req_file;
} data;
@ -83,6 +90,8 @@ struct {
#define COMP_WANT_COMPILE 0x010
#define COMP_WANT_LINK 0x020
#define COMP_WANT_PMPI 0x040
#define COMP_WANT_32_BIT 0x100
#define COMP_WANT_64_BIT 0x200
static void
data_callback(const char *key, const char *value)
@ -139,6 +148,14 @@ data_callback(const char *key, const char *value)
opal_argv_count(data.libs),
values);
opal_argv_free(values);
} else if (0 == strcmp(key, "incdir32")) {
if (NULL != value) data.incdir32 = strdup(value);
} else if (0 == strcmp(key, "libdir32")) {
if (NULL != value) data.libdir32 = strdup(value);
} else if (0 == strcmp(key, "incdir64")) {
if (NULL != value) data.incdir64 = strdup(value);
} else if (0 == strcmp(key, "libdir64")) {
if (NULL != value) data.libdir64 = strdup(value);
} else if (0 == strcmp(key, "required_file")) {
if (NULL != value) data.req_file = strdup(value);
} else if (0 == strcmp(key, "project_short")) {
@ -172,33 +189,12 @@ data_init(const char *appname)
data.link_flags[0] = NULL;
data.libs = malloc(sizeof(char*));
data.libs[0] = NULL;
data.incdir32 = NULL;
data.libdir32 = NULL;
data.incdir64 = NULL;
data.libdir64 = NULL;
data.req_file = NULL;
/* load the default -I<incdir> and -L<libdir> */
if (0 != strcmp(OPAL_INCLUDEDIR, "/usr/include")) {
char *line;
#if defined(__WINDOWS__)
asprintf(&line, OPAL_INCLUDE_PATTERN"\"%s\"", OPAL_INCLUDEDIR);
#else
asprintf(&line, OPAL_INCLUDE_PATTERN"%s", OPAL_INCLUDEDIR);
#endif /* defined(__WINDOWS__) */
opal_argv_append_nosize(&data.preproc_flags, line);
free(line);
}
#if defined(__WINDOWS__)
opal_argv_append_nosize( &data.link_flags, "/link" );
#endif /* defined(__WINDOWS__) */
if (0 != strcmp(OPAL_LIBDIR, "/usr/lib")) {
char *line;
#if defined(__WINDOWS__)
asprintf(&line, OPAL_LIBDIR_PATTERN"\"%s\"", OPAL_LIBDIR);
#else
asprintf(&line, OPAL_LIBDIR_PATTERN"%s", OPAL_LIBDIR);
#endif /* defined(__WINDOWS__) */
opal_argv_append_nosize(&data.link_flags, line);
free(line);
}
/* now load the data */
asprintf(&datafile, "%s%s%s-wrapper-data.txt",
OPAL_PKGDATADIR, OPAL_PATH_SEP, appname);
@ -227,6 +223,10 @@ data_finalize(void)
opal_argv_free(data.comp_flags);
opal_argv_free(data.link_flags);
opal_argv_free(data.libs);
if (NULL != data.incdir32) free(data.incdir32);
if (NULL != data.libdir32) free(data.libdir32);
if (NULL != data.incdir64) free(data.incdir64);
if (NULL != data.libdir64) free(data.libdir64);
if (NULL != data.req_file) free(data.req_file);
return OPAL_SUCCESS;
@ -355,7 +355,6 @@ main(int argc, char *argv[])
/* libs */
load_env_data_argv(data.project_short, "LIBS", &data.libs);
/****************************************************
*
* Sanity Checks
@ -451,7 +450,6 @@ main(int argc, char *argv[])
disable_flags = false;
break;
}
} else if (0 == strcmp(user_argv[i], "-c")) {
flags &= ~COMP_WANT_LINK;
real_flag = true;
@ -472,11 +470,119 @@ main(int argc, char *argv[])
disable_flags = false;
flags |= COMP_SHOW_ERROR;
real_flag = true;
} else if (0 == strcmp(user_argv[i], "-32")) {
flags |= COMP_WANT_32_BIT;
real_flag = true;
/* remove element from user_argv */
opal_argv_delete(&user_argc, &user_argv, i, 1);
--i;
} else if (0 == strcmp(user_argv[i], "-64")) {
flags |= COMP_WANT_64_BIT;
real_flag = true;
/* remove element from user_argv */
opal_argv_delete(&user_argc, &user_argv, i, 1);
--i;
} else {
real_flag = true;
}
}
/* If the user has not specified -32 or -64 then set the appropriate bit
flag based on the bitness of the wrapper.
The value of POINTER_SIZE_64_BIT is being compared to the size of a pointer to
determine if the wrapper was compiled as a 32 or 64 bit app. If the
size of a pointer is equal to POINTER_SIZE_64_BIT (eight) then we are assuming the
wrapper was compiled as a 64 bit app
*/
if ( ! (flags & COMP_WANT_64_BIT) && ! (flags & COMP_WANT_32_BIT) ) {
int ptr_size = sizeof(void*);
if (POINTER_SIZE_64_BIT == ptr_size) {
flags |= COMP_WANT_64_BIT;
} else {
flags |= COMP_WANT_32_BIT;
}
}
/* conflicting options, -32 and -64 can not both be defined */
if ( (flags & COMP_WANT_64_BIT) && (flags & COMP_WANT_32_BIT) ) {
opal_show_help("help-opal-wrapper.txt", "multiple-bit-flags", true,
argv[0], NULL);
errno = 0;
exit_status = 1;
}
if ( (flags & COMP_WANT_64_BIT) && (NULL != data.incdir64) && (NULL != data.libdir64) ) {
char *line;
load_env_data(data.project_short, "INCDIR64", &data.incdir64);
load_env_data(data.project_short, "LIBDIR64", &data.libdir64);
#if defined(__WINDOWS__)
asprintf(&line, OPAL_INCLUDE_PATTERN OPAL_PREFIX "\"\\%s\"", data.incdir64);
#else
asprintf(&line, OPAL_INCLUDE_PATTERN OPAL_PREFIX"/%s", data.incdir64);
#endif /* defined(__WINDOWS__) */
opal_argv_append_nosize(&data.preproc_flags, line);
free(line);
#if defined(__WINDOWS__)
opal_argv_append_nosize( &data.link_flags, "/link" );
asprintf(&line, OPAL_LIBDIR_PATTERN OPAL_PREFIX "\"\\%s\"", data.libdir64);
#else
asprintf(&line, OPAL_LIBDIR_PATTERN OPAL_PREFIX"/%s", data.libdir64);
#endif /* defined(__WINDOWS__) */
opal_argv_append_nosize(&data.link_flags, line);
free(line);
} else if ( (flags & COMP_WANT_32_BIT) && (NULL != data.incdir32) && (NULL != data.libdir32) ) {
char *line;
load_env_data(data.project_short, "INCDIR32", &data.incdir32);
load_env_data(data.project_short, "LIBDIR32", &data.libdir32);
#if defined(__WINDOWS__)
asprintf(&line, OPAL_INCLUDE_PATTERN OPAL_PREFIX "\"\\%s\"", data.incdir32);
#else
asprintf(&line, OPAL_INCLUDE_PATTERN OPAL_PREFIX"/%s", data.incdir32);
#endif /* defined(__WINDOWS__) */
opal_argv_append_nosize(&data.preproc_flags, line);
free(line);
#if defined(__WINDOWS__)
opal_argv_append_nosize( &data.link_flags, "/link" );
asprintf(&line, OPAL_LIBDIR_PATTERN OPAL_PREFIX "\"\\%s\"", data.libdir32);
#else
asprintf(&line, OPAL_LIBDIR_PATTERN OPAL_PREFIX"/%s", data.libdir32);
#endif /* defined(__WINDOWS__) */
opal_argv_append_nosize(&data.link_flags, line);
free(line);
} else {
/* load the default -I<incdir> and -L<libdir> */
if (0 != strcmp(OPAL_INCLUDEDIR, "/usr/include")) {
char *line;
#if defined(__WINDOWS__)
asprintf(&line, OPAL_INCLUDE_PATTERN OPAL_PREFIX "\"\\%s\"", OPAL_INCLUDEDIR);
#else
asprintf(&line, OPAL_INCLUDE_PATTERN OPAL_PREFIX"/%s", OPAL_INCLUDEDIR);
#endif /* defined(__WINDOWS__) */
opal_argv_append_nosize(&data.preproc_flags, line);
free(line);
}
#if defined(__WINDOWS__)
opal_argv_append_nosize( &data.link_flags, "/link" );
#endif /* defined(__WINDOWS__) */
if (0 != strcmp(OPAL_LIBDIR, "/usr/lib")) {
char *line;
#if defined(__WINDOWS__)
asprintf(&line, OPAL_LIBDIR_PATTERN OPAL_PREFIX "\"\\%s\"", OPAL_LIBDIR);
#else
asprintf(&line, OPAL_LIBDIR_PATTERN OPAL_PREFIX"/%s", OPAL_LIBDIR);
#endif /* defined(__WINDOWS__) */
opal_argv_append_nosize(&data.link_flags, line);
free(line);
}
}
/* clear out the want_flags if we got no arguments not starting
with a - (dash) and -showme wasn't given OR -showme was given
and we had at least one more non-showme argument that started
@ -503,7 +609,6 @@ main(int argc, char *argv[])
}
#endif
/****************************************************
*
* Assemble the command line
@ -560,44 +665,46 @@ main(int argc, char *argv[])
*
****************************************************/
if (flags & COMP_DRY_RUN) {
exec_command = opal_argv_join(exec_argv, ' ');
printf("%s\n", exec_command);
} else {
char *tmp;
if (0 == exit_status) {
if (flags & COMP_DRY_RUN) {
exec_command = opal_argv_join(exec_argv, ' ');
printf("%s\n", exec_command);
} else {
char *tmp;
#if 0
exec_command = opal_argv_join(exec_argv, ' ');
printf("command: %s\n", exec_command);
exec_command = opal_argv_join(exec_argv, ' ');
printf("command: %s\n", exec_command);
#endif
tmp = opal_path_findv(exec_argv[0], 0, environ, NULL);
if (NULL == tmp) {
opal_show_help("help-opal-wrapper.txt", "no-compiler-found", true,
exec_argv[0], NULL);
errno = 0;
exit_status = 1;
} else {
int status;
tmp = opal_path_findv(exec_argv[0], 0, environ, NULL);
if (NULL == tmp) {
opal_show_help("help-opal-wrapper.txt", "no-compiler-found", true,
exec_argv[0], NULL);
errno = 0;
exit_status = 1;
} else {
int status;
free(exec_argv[0]);
exec_argv[0] = tmp;
ret = opal_few(exec_argv, &status);
exit_status = WIFEXITED(status) ? WEXITSTATUS(status) :
(WIFSIGNALED(status) ? WTERMSIG(status) :
(WIFSTOPPED(status) ? WSTOPSIG(status) : 255));
if( (OPAL_SUCCESS != ret) || ((0 != exit_status) && (flags & COMP_SHOW_ERROR)) ) {
char* exec_command = opal_argv_join(exec_argv, ' ');
if( OPAL_SUCCESS != ret ) {
opal_show_help("help-opal-wrapper.txt", "spawn-failed", true,
exec_argv[0], strerror(status), exec_command, NULL);
} else {
free(exec_argv[0]);
exec_argv[0] = tmp;
ret = opal_few(exec_argv, &status);
exit_status = WIFEXITED(status) ? WEXITSTATUS(status) :
(WIFSIGNALED(status) ? WTERMSIG(status) :
(WIFSTOPPED(status) ? WSTOPSIG(status) : 255));
if( (OPAL_SUCCESS != ret) || ((0 != exit_status) && (flags & COMP_SHOW_ERROR)) ) {
char* exec_command = opal_argv_join(exec_argv, ' ');
if( OPAL_SUCCESS != ret ) {
opal_show_help("help-opal-wrapper.txt", "spawn-failed", true,
exec_argv[0], strerror(status), exec_command, NULL);
} else {
#if 0
opal_show_help("help-opal-wrapper.txt", "compiler-failed", true,
exec_argv[0], exit_status, exec_command, NULL);
opal_show_help("help-opal-wrapper.txt", "compiler-failed", true,
exec_argv[0], exit_status, exec_command, NULL);
#endif
}
free(exec_command);
}
free(exec_command);
}
}
}

Просмотреть файл

@ -11,3 +11,7 @@ compiler_flags=@OPAL_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@OPAL_WRAPPER_EXTRA_LDFLAGS@
libs=-lopal @OPAL_WRAPPER_EXTRA_LIBS@
required_file=
libdir32=@OPAL_WRAPPER_32_BIT_LIBDIR@
incdir32=@OPAL_WRAPPER_32_BIT_INCDIR@
libdir64=@OPAL_WRAPPER_64_BIT_LIBDIR@
incdir64=@OPAL_WRAPPER_64_BIT_INCDIR@

Просмотреть файл

@ -11,3 +11,7 @@ compiler_flags=@OPAL_WRAPPER_EXTRA_CFLAGS@
linker_flags=@OPAL_WRAPPER_EXTRA_LDFLAGS@
libs=-lopal @OPAL_WRAPPER_EXTRA_LIBS@
required_file=
libdir32=@OPAL_WRAPPER_32_BIT_LIBDIR@
incdir32=@OPAL_WRAPPER_32_BIT_INCDIR@
libdir64=@OPAL_WRAPPER_64_BIT_LIBDIR@
incdir64=@OPAL_WRAPPER_64_BIT_INCDIR@

Просмотреть файл

@ -11,3 +11,7 @@ compiler_flags=@ORTE_WRAPPER_EXTRA_CXXFLAGS@
linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@
libs=-lorte -lopal @ORTE_WRAPPER_EXTRA_LIBS@
required_file=
libdir32=@ORTE_WRAPPER_32_BIT_LIBDIR@
incdir32=@ORTE_WRAPPER_32_BIT_INCDIR@
libdir64=@ORTE_WRAPPER_64_BIT_LIBDIR@
incdir64=@ORTE_WRAPPER_64_BIT_INCDIR@

Просмотреть файл

@ -11,3 +11,7 @@ compiler_flags=@ORTE_WRAPPER_EXTRA_CFLAGS@
linker_flags=@ORTE_WRAPPER_EXTRA_LDFLAGS@
libs=-lorte -lopal @ORTE_WRAPPER_EXTRA_LIBS@
required_file=
libdir32=@ORTE_WRAPPER_32_BIT_LIBDIR@
incdir32=@ORTE_WRAPPER_32_BIT_INCDIR@
libdir64=@ORTE_WRAPPER_64_BIT_LIBDIR@
incdir64=@ORTE_WRAPPER_64_BIT_INCDIR@