uti: integrate libuti and redirect to mck/libuti.so

Change-Id: I74e0f677ea8e1cd06e8ab05d92f1d38f9be8fd7a
This commit is contained in:
Masamichi Takagi
2021-02-22 12:11:57 +09:00
parent 0848b64c1d
commit 82056961cd
10 changed files with 356 additions and 15 deletions

View File

@@ -9,8 +9,41 @@ if (ENABLE_UTI)
set(SYSCALL_INTERCEPT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/syscall_intercept" CACHE STRINGS "relative path to syscalL_intercept source directory")
endif()
# syscall_intercept
# change cmake options only in this directory
SET(CMAKE_BUILD_TYPE Release CACHE STRING "release build" FORCE)
SET(TREAT_WARNINGS_AS_ERRORS OFF CACHE BOOL "ignore warnings" FORCE)
add_subdirectory(${SYSCALL_INTERCEPT_SOURCE_DIR} syscall_intercept)
# libuti
find_path(LIBCAP_INCLUDE_DIRS
capability.h
PATHS /usr/include/sys
NO_DEFAULT_PATH)
find_library(LIBCAP_LIBRARIES
NAME cap
PATHS /usr/lib64
NO_DEFAULT_PATH)
if (NOT LIBCAP_INCLUDE_DIRS OR NOT LIBCAP_LIBRARIES)
message(FATAL_ERROR "error: couldn't find libcap")
endif()
include(ExternalProject)
# Install libuti.so.* into <prefix>/mck/ so that mcexec can
# redirect ld*.so's access to it. In this way, a.out created
# by Fujitsu MPI and linked to libuti.so in the standard path
# can use the McKernel version when invoked through mcexec.
ExternalProject_Add(libuti
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/uti
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/uti
INSTALL_DIR ${prefix}
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/uti/configure --prefix=<INSTALL_DIR> --libdir=<INSTALL_DIR>/lib64 --disable-static --with-rm=mckernel
BUILD_COMMAND ${MAKE}
BUILD_IN_SOURCE FALSE
INSTALL_COMMAND ${MAKE} install && bash -c "rm ${prefix}/include/uti.h ${prefix}/lib64/libuti.la && [[ -d ${prefix}/lib64/mck ]] || mkdir ${prefix}/lib64/mck && mv ${prefix}/lib64/libuti.* ${prefix}/lib64/mck"
)
endif()

1
executer/user/lib/uti Submodule

Submodule executer/user/lib/uti added at 8c5a556814