Commits (10)
......@@ -86,6 +86,9 @@ following extensions:
- `SELECTABLE` If present, this project's `ENABLE_` option will be visible
(and all non-selectable projects will be hidden). May be set externally
with the `_superbuild_${NAME}_selectable` flag.
- `BUILD_SHARED_LIBS_INDEPENDENT` If present, an option to change the build
shared flags setting for the project will be exposed. By default, the value
of `<same>` is used to match the superbuild's configuration.
- `HELP_STRING`
Set the description string for the option to enable the project.
- `DEPENDS_OPTIONAL <project>...`
......@@ -109,6 +112,7 @@ function (superbuild_add_project name)
set(allow_developer_mode FALSE)
set(debuggable FALSE)
set(selectable FALSE)
set(build_shared_libs_independent FALSE)
set(help_string)
set(depends)
set(optional_depends)
......@@ -139,6 +143,9 @@ function (superbuild_add_project name)
elseif (arg STREQUAL "SELECTABLE")
set(selectable TRUE)
set(grab)
elseif (arg STREQUAL "BUILD_SHARED_LIBS_INDEPENDENT")
set(build_shared_libs_independent TRUE)
set(grab)
elseif (arg STREQUAL "HELP_STRING")
set(grab help_string)
elseif (arg STREQUAL "DEPENDS")
......@@ -262,6 +269,12 @@ function (superbuild_add_project name)
"${project}_selectable" TRUE)
endif ()
if (build_shared_libs_independent)
set_property(GLOBAL
PROPERTY
"${name}_build_shared_libs_independent" TRUE)
endif ()
set_property(GLOBAL
PROPERTY
"${name}_depends" ${depends})
......@@ -907,6 +920,24 @@ function (superbuild_process_dependencies)
endif ()
endif ()
get_property(build_shared_libs_independent GLOBAL
PROPERTY "${project}_build_shared_libs_independent" SET)
if (build_shared_libs_independent)
set("BUILD_SHARED_LIBS_${project}" "<same>"
CACHE STRING "The build type for the ${project} project.")
set_property(CACHE "BUILD_SHARED_LIBS_${project}"
PROPERTY
STRINGS "<same>;ON;OFF")
get_property(build_shared_libs_options
CACHE "BUILD_SHARED_LIBS_${project}"
PROPERTY STRINGS)
if (NOT BUILD_SHARED_LIBS_${project} IN_LIST build_shared_libs_options)
string(REPLACE ";" ", " build_shared_libs_options "${build_shared_libs_options}")
message(FATAL_ERROR "BUILD_SHARED_LIBS_${project} must be one of: ${build_shared_libs_options}.")
endif ()
endif ()
set(current_project "${project}")
set(is_buildable_project FALSE)
......@@ -1033,6 +1064,15 @@ function (_superbuild_add_project_internal name)
string(TOUPPER "${CMAKE_BUILD_TYPE}" project_build_type)
endif ()
# Handle the BUILD_SHARED_LIBS_INDEPENDENT flag setting.
if (build_shared_libs_independent)
if (NOT BUILD_SHARED_LIBS_${name} STREQUAL "<same>")
list(APPEND cmake_params "-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS_${name}}")
else ()
list(APPEND cmake_params "-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}")
endif ()
endif ()
# Set SDK and target version flags.
superbuild_osx_pass_version_flags(apple_flags)
......
......@@ -16,3 +16,6 @@ superbuild_add_project(ffi
INSTALL_COMMAND
make install
BUILD_IN_SOURCE 1)
superbuild_apply_patch(ffi powerpc.h-fix-build-failure-with-powerpc7
"Check for __HAVE_FLOAT128 before using _Float128")
From f9d8f11d60cdc656a801e0d8116101beb22e117b Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 24 Nov 2019 09:52:01 +0100
Subject: [PATCH] ffi_powerpc.h: fix build failure with powerpc7
Sicne commit 73dd43afc8a447ba98ea02e9aad4c6898dc77fb0, build on powerpc7
fails on:
In file included from ../src/powerpc/ffi.c:33:0:
../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target
typedef _Float128 float128;
^~~~~~~~~
Fix this build failure by checking for __HAVE_FLOAT128 before using
_Float128, as _Float128 is enabled only on specific conditions, see
output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h:
/* Defined to 1 if the current compiler invocation provides a
floating-point type with the IEEE 754 binary128 format, and this glibc
includes corresponding *f128 interfaces for it. */
#if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \
&& defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH
# define __HAVE_FLOAT128 1
#else
# define __HAVE_FLOAT128 0
#endif
Fixes:
- http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
src/powerpc/ffi_powerpc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h
index 5ee2a70..a5a786b 100644
--- a/src/powerpc/ffi_powerpc.h
+++ b/src/powerpc/ffi_powerpc.h
@@ -57,7 +57,7 @@ typedef union
double d;
} ffi_dblfl;
-#if defined(__FLOAT128_TYPE__)
+#if defined(__FLOAT128_TYPE__) && defined(__HAVE_FLOAT128)
typedef _Float128 float128;
#elif defined(__FLOAT128__)
typedef __float128 float128;
--
2.24.0
option(python2_FIND_LIBRARIES "Require system Python2 development files" ON)
mark_as_advanced(python2_FIND_LIBRARIES)
find_package(PythonInterp 2.7 REQUIRED)
set(python2_components
Interpreter)
if (python2_FIND_LIBRARIES)
find_package(PythonLibs 2.7 REQUIRED)
if (NOT PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING AND
NOT PYTHON_I_KNOW_WHAT_IM_DOING)
message(FATAL_ERROR
"Python interpreter version (${PYTHON_VERSION_STRING}) does "
"not match the library version (${PYTHONLIBS_VERSION_STRING})")
endif ()
list(APPEND python2_components
Development)
endif()
set(superbuild_python_version "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
find_package(Python2 REQUIRED COMPONENTS ${python2_components})
set(superbuild_python_version "${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}"
CACHE INTERNAL "")
# This will add PYTHON_LIBRARY, PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR
# variables. User can set/override these to change the Python being used.
superbuild_add_extra_cmake_args(
-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE})
-DPYTHON_EXECUTABLE:FILEPATH=${Python2_EXECUTABLE}
-DPython2_EXECUTABLE:FILEPATH=${Python2_EXECUTABLE})
if (python_FIND_LIBRARIES)
if (python2_FIND_LIBRARIES)
superbuild_add_extra_cmake_args(
-DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
-DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY})
-DPYTHON_INCLUDE_DIR:PATH=${Python2_INCLUDE_DIR}
-DPYTHON_LIBRARY:FILEPATH=${Python2_LIBRARY}
-DPython2_INCLUDE_DIR:PATH=${Python2_INCLUDE_DIR}
-DPython2_LIBRARY:FILEPATH=${Python2_LIBRARY})
endif()
set(superbuild_python_executable "${PYTHON_EXECUTABLE}"
set(superbuild_python_executable "${Python2_EXECUTABLE}"
CACHE INTERNAL "")
if (WIN32)
set(superbuild_python_pip "${PYTHON_EXECUTABLE};-m;pip"
set(superbuild_python_pip "${Python2_EXECUTABLE};-m;pip"
CACHE INTERNAL "")
else ()
if (NOT EXISTS "${superbuild_python_pip}")
unset(superbuild_python_pip CACHE)
endif ()
get_filename_component(python2_executable_dir "${PYTHON_EXECUTABLE}" DIRECTORY)
get_filename_component(python2_executable_dir "${Python2_EXECUTABLE}" DIRECTORY)
find_program(superbuild_python_pip
NAMES pip
HINTS "${python2_executable_dir}")
......
option(python3_FIND_LIBRARIES "Require system Python development files" ON)
mark_as_advanced(python3_FIND_LIBRARIES)
find_package(PythonInterp 3.3 REQUIRED)
set(python3_components
Interpreter)
if (python3_FIND_LIBRARIES)
find_package(PythonLibs 3.3 REQUIRED)
if (NOT PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING AND
NOT PYTHON_I_KNOW_WHAT_IM_DOING)
message(FATAL_ERROR
"Python interpreter version (${PYTHON_VERSION_STRING}) does "
"not match the library version (${PYTHONLIBS_VERSION_STRING})")
endif ()
list(APPEND python3_components
Development)
endif()
set(superbuild_python_version "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
find_package(Python3 3.3 REQUIRED COMPONENTS ${python3_components})
set(superbuild_python_version "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}"
CACHE INTERNAL "")
# This will add PYTHON_LIBRARY, PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR
# variables. User can set/override these to change the Python being used.
superbuild_add_extra_cmake_args(
-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE})
-DPYTHON_EXECUTABLE:FILEPATH=${Python3_EXECUTABLE}
-DPython3_EXECUTABLE:FILEPATH=${Python3_EXECUTABLE})
if (python_FIND_LIBRARIES)
if (python3_FIND_LIBRARIES)
superbuild_add_extra_cmake_args(
-DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
-DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY})
-DPYTHON_INCLUDE_DIR:PATH=${Python3_INCLUDE_DIR}
-DPYTHON_LIBRARY:FILEPATH=${Python3_LIBRARY}
-DPython3_INCLUDE_DIR:PATH=${Python3_INCLUDE_DIR}
-DPython3_LIBRARY:FILEPATH=${Python3_LIBRARY})
endif()
set(superbuild_python_executable "${PYTHON_EXECUTABLE}"
set(superbuild_python_executable "${Python3_EXECUTABLE}"
CACHE INTERNAL "")
if (WIN32)
set(superbuild_python_pip "${PYTHON_EXECUTABLE};-m;pip"
set(superbuild_python_pip "${Python3_EXECUTABLE};-m;pip"
CACHE INTERNAL "")
else ()
if (NOT EXISTS "${superbuild_python_pip}")
unset(superbuild_python_pip CACHE)
endif ()
get_filename_component(python3_executable_dir "${PYTHON_EXECUTABLE}" DIRECTORY)
get_filename_component(python3_executable_dir "${Python3_EXECUTABLE}" DIRECTORY)
find_program(superbuild_python_pip
NAMES pip
HINTS "${python3_executable_dir}")
......