mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-11-15 05:39:28 +00:00
* 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
59 lines
2.5 KiB
Diff
59 lines
2.5 KiB
Diff
From 2f6d2e5795382f0d6e22f5aea52e8104110d24ad Mon Sep 17 00:00:00 2001
|
|
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
|
Date: Sun, 19 Jul 2020 16:29:15 +0200
|
|
Subject: [PATCH] cmake/compilerFlags.cmake: properly detect availability of
|
|
flags
|
|
|
|
Instead of relying on fragile and complex logic to decide if a
|
|
compiler flag is available or not, use the check_c_compiler_flag()
|
|
macro provided by the CMake standard library.
|
|
|
|
This for example avoids using -fcf-protection on architectures that
|
|
don't support this option.
|
|
|
|
[Upstream: https://github.com/Exiv2/exiv2/pull/1252. The submitted
|
|
patch is slightly different than this one, due to other changes
|
|
between 0.27.3 and master.]
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
|
---
|
|
cmake/compilerFlags.cmake | 18 +++++++++++-------
|
|
1 file changed, 11 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/cmake/compilerFlags.cmake b/cmake/compilerFlags.cmake
|
|
index 0418aa61..be430977 100644
|
|
--- a/cmake/compilerFlags.cmake
|
|
+++ b/cmake/compilerFlags.cmake
|
|
@@ -1,4 +1,5 @@
|
|
# These flags applies to exiv2lib, the applications, and to the xmp code
|
|
+include(CheckCCompilerFlag)
|
|
|
|
if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
|
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
|
@@ -25,13 +26,16 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
|
|
|
|
# This fails under Fedora, MinGW GCC 8.3.0 and CYGWIN/MSYS 9.3.0
|
|
if (NOT (MINGW OR CMAKE_HOST_SOLARIS OR CYGWIN OR MSYS) )
|
|
- if (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
|
|
- add_compile_options(-fstack-clash-protection -fcf-protection)
|
|
- endif()
|
|
-
|
|
- if( (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5.0) # Not in GCC 4.8
|
|
- OR (COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 3.7) # Not in Clang 3.4.2
|
|
- )
|
|
+ check_c_compiler_flag(-fstack-clash-protection HAS_FSTACK_CLASH_PROTECTION)
|
|
+ check_c_compiler_flag(-fcf-protection HAS_FCF_PROTECTION)
|
|
+ check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG)
|
|
+ if(HAS_FSTACK_CLASH_PROTECTION)
|
|
+ add_compile_options(-fstack-clash-protection)
|
|
+ endif()
|
|
+ if(GCC_HAS_FCF_PROTECTION)
|
|
+ add_compile_options(-fcf-protection)
|
|
+ endif()
|
|
+ if(GCC_HAS_FSTACK_PROTECTOR_STRONG)
|
|
add_compile_options(-fstack-protector-strong)
|
|
endif()
|
|
endif()
|
|
---
|
|
2.26.2
|
|
|