Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
From a50fc9bde098e4e89584a5da9f94f620c11b6733 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 16 Aug 2020 12:31:46 +0200
|
||||
Subject: [PATCH] CMakeLists.txt: add C language to project statement
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This will fix the detection of atomic:
|
||||
|
||||
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
|
||||
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed
|
||||
-- Looking for __atomic_load_8 in atomic
|
||||
-- Looking for __atomic_load_8 in atomic - not found
|
||||
CMake Error at CMakeModules/CheckAtomic.cmake:76 (message):
|
||||
Host compiler appears to require libatomic for 64-bit operations, but
|
||||
cannot find it.
|
||||
Call Stack (most recent call first):
|
||||
CMakeLists.txt:19 (include)
|
||||
|
||||
Indeed if C language is not enabled, the test will be run with the C++
|
||||
compiler resulting in the following error:
|
||||
|
||||
Building CXX object CMakeFiles/cmTC_fad22.dir/CheckFunctionExists.cxx.o
|
||||
/tmp/instance-0/output-1/host/bin/mipsel-linux-g++ --sysroot=/tmp/instance-0/output-1/host/mipsel-buildroot-linux-gnu/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_FORTIFY_SOURCE=1 -Wall -Wconversion -pedantic -Wextra -Wno-missing-field-initializers -DCHECK_FUNCTION_EXISTS=__atomic_load_8 -DNDEBUG -o CMakeFiles/cmTC_fad22.dir/CheckFunctionExists.cxx.o -c /tmp/instance-0/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx
|
||||
<command-line>: error: new declaration 'char __atomic_load_8()' ambiguates built-in declaration 'long long unsigned int __atomic_load_8(const volatile void*, int)' [-fpermissive]
|
||||
/tmp/instance-0/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx:7:3: note: in expansion of macro 'CHECK_FUNCTION_EXISTS'
|
||||
CHECK_FUNCTION_EXISTS(void);
|
||||
^~~~~~~~~~~~~~~~~~~~~
|
||||
/tmp/instance-0/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx: In function 'int main(int, char**)':
|
||||
/tmp/instance-0/output-1/build/pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx:17:25: error: too few arguments to function 'long long unsigned int __atomic_load_8(const volatile void*, int)'
|
||||
CHECK_FUNCTION_EXISTS();
|
||||
^
|
||||
|
||||
whereas with a C compiler, we'll get:
|
||||
|
||||
Building C object CMakeFiles/cmTC_4b0f4.dir/CheckFunctionExists.c.o
|
||||
/home/fabrice/buildroot/output/host/bin/riscv32-linux-gcc --sysroot=/home/fabrice/buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DCHECK_FUNCTION_EXISTS=__atomic_load_8 -DNDEBUG -o CMakeFiles/cmTC_4b0f4.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
|
||||
<command-line>: warning: conflicting types for built-in function ‘__atomic_load_8’ [-Wbuiltin-declaration-mismatch]
|
||||
/usr/share/cmake-3.16/Modules/CheckFunctionExists.c:7:3: note: in expansion of macro ‘CHECK_FUNCTION_EXISTS’
|
||||
CHECK_FUNCTION_EXISTS(void);
|
||||
^~~~~~~~~~~~~~~~~~~~~
|
||||
Linking C executable cmTC_4b0f4
|
||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4b0f4.dir/link.txt --verbose=1
|
||||
/home/fabrice/buildroot/output/host/bin/riscv32-linux-gcc --sysroot=/home/fabrice/buildroot/output/host/riscv32-buildroot-linux-gnu/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DCHECK_FUNCTION_EXISTS=__atomic_load_8 -DNDEBUG CMakeFiles/cmTC_4b0f4.dir/CheckFunctionExists.c.o -o cmTC_4b0f4 -latomic
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/2bf06c6a9e55b449ec5875cf9415a9e55b2065d6
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index edc73c5..0286647 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
project (pistache
|
||||
- LANGUAGES CXX)
|
||||
+ LANGUAGES C CXX)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
From 45824f58b10575d8d88d4bce934aedee821a6df0 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Thu, 15 Oct 2020 22:26:55 +0200
|
||||
Subject: [PATCH] CMakeLists.txt: respect BUILD_SHARED_LIBS
|
||||
|
||||
Don't build and install pistache_shared if the standard cmake
|
||||
BUILD_SHARED_LIBS is set to OFF
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Backport from upstream:
|
||||
https://github.com/oktal/pistache/commit/c04166ca9e6420a8fbc93fef4055ee2eccdcebe4
|
||||
]
|
||||
---
|
||||
src/CMakeLists.txt | 43 +++++++++++++++++++++++++------------------
|
||||
1 file changed, 25 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 6521b20..c5b049f 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -26,31 +26,36 @@ set(include_install_dir ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
set(lib_install_dir ${CMAKE_INSTALL_LIBDIR})
|
||||
set(bin_install_dir ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
-add_library(pistache_shared SHARED $<TARGET_OBJECTS:pistache>)
|
||||
-add_library(pistache_static STATIC $<TARGET_OBJECTS:pistache>)
|
||||
+if (BUILD_SHARED_LIBS)
|
||||
+ add_library(pistache_shared SHARED $<TARGET_OBJECTS:pistache>)
|
||||
+ target_link_libraries(pistache_shared PRIVATE Threads::Threads ${CMAKE_REQUIRED_LIBRARIES})
|
||||
+ target_include_directories(pistache_shared INTERFACE ${PISTACHE_INCLUDE})
|
||||
+endif ()
|
||||
|
||||
-target_link_libraries(pistache_shared PRIVATE Threads::Threads ${CMAKE_REQUIRED_LIBRARIES})
|
||||
+add_library(pistache_static STATIC $<TARGET_OBJECTS:pistache>)
|
||||
target_link_libraries(pistache_static PRIVATE Threads::Threads ${CMAKE_REQUIRED_LIBRARIES})
|
||||
-
|
||||
-target_include_directories(pistache_shared INTERFACE ${PISTACHE_INCLUDE})
|
||||
target_include_directories(pistache_static INTERFACE ${PISTACHE_INCLUDE})
|
||||
|
||||
if (PISTACHE_USE_SSL)
|
||||
target_compile_definitions(pistache PUBLIC PISTACHE_USE_SSL)
|
||||
- target_compile_definitions(pistache_shared PUBLIC PISTACHE_USE_SSL)
|
||||
target_compile_definitions(pistache_static PUBLIC PISTACHE_USE_SSL)
|
||||
|
||||
target_include_directories(pistache PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
- target_link_libraries(pistache_shared PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||
target_link_libraries(pistache_static PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||
+ if (BUILD_SHARED_LIBS)
|
||||
+ target_compile_definitions(pistache_shared PUBLIC PISTACHE_USE_SSL)
|
||||
+ target_link_libraries(pistache_shared PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||
+ endif ()
|
||||
endif ()
|
||||
|
||||
set(Pistache_OUTPUT_NAME "pistache")
|
||||
-set_target_properties(pistache_shared PROPERTIES
|
||||
- OUTPUT_NAME ${Pistache_OUTPUT_NAME}
|
||||
- VERSION ${version}
|
||||
- SOVERSION ${VERSION_MAJOR}
|
||||
-)
|
||||
+if (BUILD_SHARED_LIBS)
|
||||
+ set_target_properties(pistache_shared PROPERTIES
|
||||
+ OUTPUT_NAME ${Pistache_OUTPUT_NAME}
|
||||
+ VERSION ${version}
|
||||
+ SOVERSION ${VERSION_MAJOR}
|
||||
+ )
|
||||
+endif ()
|
||||
|
||||
set_target_properties(pistache_static PROPERTIES
|
||||
OUTPUT_NAME ${Pistache_OUTPUT_NAME}
|
||||
@@ -60,13 +65,15 @@ if (PISTACHE_INSTALL)
|
||||
set(Pistache_CONFIG_FILE "PistacheConfig.cmake")
|
||||
set(Pistache_CONFIG_VERSION_FILE "PistacheConfigVersion.cmake")
|
||||
|
||||
- install(
|
||||
- TARGETS pistache_shared
|
||||
- EXPORT PistacheTargets
|
||||
- ARCHIVE DESTINATION ${lib_install_dir}
|
||||
- LIBRARY DESTINATION ${lib_install_dir}
|
||||
- RUNTIME DESTINATION ${bin_install_dir}
|
||||
- INCLUDES DESTINATION ${include_install_dir})
|
||||
+ if (BUILD_SHARED_LIBS)
|
||||
+ install(
|
||||
+ TARGETS pistache_shared
|
||||
+ EXPORT PistacheTargets
|
||||
+ ARCHIVE DESTINATION ${lib_install_dir}
|
||||
+ LIBRARY DESTINATION ${lib_install_dir}
|
||||
+ RUNTIME DESTINATION ${bin_install_dir}
|
||||
+ INCLUDES DESTINATION ${include_install_dir})
|
||||
+ endif()
|
||||
|
||||
install(
|
||||
DIRECTORY "${PROJECT_SOURCE_DIR}/include/pistache"
|
||||
--
|
||||
2.28.0
|
||||
|
||||
20
buildroot/package/pistache/Config.in
Normal file
20
buildroot/package/pistache/Config.in
Normal file
@@ -0,0 +1,20 @@
|
||||
config BR2_PACKAGE_PISTACHE
|
||||
bool "pistache"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
|
||||
depends on BR2_USE_WCHAR
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on !BR2_TOOLCHAIN_USES_UCLIBC
|
||||
help
|
||||
Pistache is a modern and elegant HTTP and REST framework
|
||||
for C++. It is entirely written in pure C++14 and provides
|
||||
a clear and pleasant API.
|
||||
|
||||
https://github.com/oktal/pistache
|
||||
|
||||
comment "pistache needs a glibc toolchain w/ C++, gcc >= 4.9, threads, wchar"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
BR2_TOOLCHAIN_USES_UCLIBC || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_USE_WCHAR
|
||||
3
buildroot/package/pistache/pistache.hash
Normal file
3
buildroot/package/pistache/pistache.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
#locally computed
|
||||
sha256 70aeef5f5a4603cb2ceb20a284e3239f5da520e68f39dcb572c9f21473ac0b6d pistache-f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d.tar.gz
|
||||
sha256 c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08 LICENSE
|
||||
21
buildroot/package/pistache/pistache.mk
Normal file
21
buildroot/package/pistache/pistache.mk
Normal file
@@ -0,0 +1,21 @@
|
||||
################################################################################
|
||||
#
|
||||
# pistache
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PISTACHE_VERSION = f2f5a50fbfb5b8ef6cf1d3d2a9d442a8270e375d
|
||||
PISTACHE_SITE = $(call github,oktal,pistache,$(PISTACHE_VERSION))
|
||||
PISTACHE_LICENSE = Apache-2.0
|
||||
PISTACHE_LICENSE_FILES = LICENSE
|
||||
|
||||
PISTACHE_INSTALL_STAGING = YES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
PISTACHE_DEPENDENCIES += openssl
|
||||
PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=ON
|
||||
else
|
||||
PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user