initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
From 4bb57da5fb0bb0d7e747b9e325e9ec0876ffc1f9 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sat, 31 Jul 2021 16:36:50 +0200
|
||||
Subject: [PATCH] add BUILD_WITH_STACK_PROTECTOR option
|
||||
|
||||
Add BUILD_WITH_STACK_PROTECTOR to avoid the following build failure with
|
||||
toolchains that don't support stack-protector:
|
||||
|
||||
/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/9.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: utils.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xd0): undefined reference to `__stack_chk_fail'
|
||||
|
||||
Indeed, support for -fstack-protector-strong can't be detected through
|
||||
check_cxx_compiler_flag as some toolchains need to link with -lssp to
|
||||
enable SSP support
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/ae4635899124c602c70d2b342a76f95c34aa4a3d
|
||||
|
||||
Upstream: https://github.com/Exiv2/exiv2/commit/f31c0eba098889899d29b7b0da830aee2b62a7b8
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
cmake/compilerFlags.cmake | 4 ++--
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6f0da06a..0746ee14 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -47,6 +47,7 @@ mark_as_advanced(
|
||||
EXIV2_TEAM_USE_SANITIZERS
|
||||
)
|
||||
|
||||
+option( BUILD_WITH_STACK_PROTECTOR "Build with stack protector" ON )
|
||||
option( BUILD_WITH_CCACHE "Use ccache to speed up compilations" OFF )
|
||||
option( BUILD_WITH_COVERAGE "Add compiler flags to generate coverage stats" OFF )
|
||||
|
||||
diff --git a/cmake/compilerFlags.cmake b/cmake/compilerFlags.cmake
|
||||
index 35faf501..0a646e50 100644
|
||||
--- a/cmake/compilerFlags.cmake
|
||||
+++ b/cmake/compilerFlags.cmake
|
||||
@@ -33,8 +33,8 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
|
||||
endif()
|
||||
if(HAS_FCF_PROTECTION)
|
||||
add_compile_options(-fcf-protection)
|
||||
- endif()
|
||||
- if(HAS_FSTACK_PROTECTOR_STRONG)
|
||||
+ endif()
|
||||
+ if(BUILD_WITH_STACK_PROTECTOR AND HAS_FSTACK_PROTECTOR_STRONG)
|
||||
add_compile_options(-fstack-protector-strong)
|
||||
endif()
|
||||
endif()
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
comment "exiv2 needs a uClibc or glibc toolchain w/ C++, wchar, dynamic library, threads"
|
||||
depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \
|
||||
|| !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS \
|
||||
|| BR2_TOOLCHAIN_USES_MUSL
|
||||
|
||||
config BR2_PACKAGE_EXIV2
|
||||
bool "exiv2"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_TOOLCHAIN_USES_MUSL # PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
|
||||
depends on BR2_USE_WCHAR
|
||||
help
|
||||
Exiv2 is a C++ library and a command line utility to manage
|
||||
image metadata. It provides fast and easy read and write
|
||||
access to the Exif, IPTC and XMP metadata of images in
|
||||
various formats.
|
||||
|
||||
http://www.exiv2.org/
|
||||
|
||||
if BR2_PACKAGE_EXIV2
|
||||
|
||||
config BR2_PACKAGE_EXIV2_PNG
|
||||
bool "PNG image support"
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Build with PNG image support
|
||||
|
||||
config BR2_PACKAGE_EXIV2_XMP
|
||||
bool "XMP support"
|
||||
select BR2_PACKAGE_EXPAT
|
||||
help
|
||||
Build with XMP support
|
||||
|
||||
config BR2_PACKAGE_EXIV2_LENSDATA
|
||||
bool "Nikon lens name database"
|
||||
help
|
||||
Integrate Nikon lens name database.
|
||||
|
||||
This database comes from a thirdparty and is free to use in
|
||||
non-commercial, GPL or open source software only.
|
||||
For more informations src/nikonmn_int.cpp.
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 35a58618ab236a901ca4928b0ad8b31007ebdc0386d904409d825024e45ea6e2 exiv2-0.27.5-Source.tar.gz
|
||||
sha256 a7ba75cb966aca374711e2af49e5f3aea6a4443a803440f5d93e73a5a1222f66 COPYING
|
||||
@@ -0,0 +1,47 @@
|
||||
################################################################################
|
||||
#
|
||||
# exiv2
|
||||
#
|
||||
################################################################################
|
||||
|
||||
EXIV2_VERSION = 0.27.5
|
||||
EXIV2_SOURCE = exiv2-$(EXIV2_VERSION)-Source.tar.gz
|
||||
EXIV2_SITE = https://exiv2.org/builds
|
||||
EXIV2_INSTALL_STAGING = YES
|
||||
EXIV2_LICENSE = GPL-2.0+
|
||||
EXIV2_LICENSE_FILES = COPYING
|
||||
EXIV2_CPE_ID_VENDOR = exiv2
|
||||
|
||||
EXIV2_CONF_OPTS += \
|
||||
-DBUILD_WITH_STACK_PROTECTOR=OFF \
|
||||
-DEXIV2_BUILD_SAMPLES=OFF
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EXIV2_LENSDATA),y)
|
||||
EXIV2_CONF_OPTS += -DEXIV2_ENABLE_LENSDATA=ON
|
||||
else
|
||||
EXIV2_CONF_OPTS += -DEXIV2_ENABLE_LENSDATA=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EXIV2_PNG),y)
|
||||
EXIV2_CONF_OPTS += -DEXIV2_ENABLE_PNG=ON
|
||||
EXIV2_DEPENDENCIES += zlib
|
||||
else
|
||||
EXIV2_CONF_OPTS += -DEXIV2_ENABLE_PNG=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EXIV2_XMP),y)
|
||||
EXIV2_CONF_OPTS += -DEXIV2_ENABLE_XMP=ON
|
||||
EXIV2_DEPENDENCIES += expat
|
||||
else
|
||||
EXIV2_CONF_OPTS += -DEXIV2_ENABLE_XMP=OFF
|
||||
endif
|
||||
|
||||
EXIV2_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
|
||||
|
||||
ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
|
||||
EXIV2_CONF_OPTS += -DEXIV2_ENABLE_NLS=ON
|
||||
else
|
||||
EXIV2_CONF_OPTS += -DEXIV2_ENABLE_NLS=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user