generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
@ -0,0 +1,38 @@
|
||||
From d170b19e500d85381369e379771be8d7816bcc92 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Duskett <Aduskett@gmail.com>
|
||||
Date: Tue, 21 Jul 2020 13:08:50 -0700
|
||||
Subject: [PATCH] force position independent code
|
||||
|
||||
Without this option, programs building for arm64 or x86-64 will fail when
|
||||
attempting to link to the built libraries with the following (abbreviated)
|
||||
error:
|
||||
|
||||
"relocation against `.rodata' can not be used when making a shared object;
|
||||
recompile with -fPIC."
|
||||
|
||||
Because libabseil-cpp builds static libraries, it is better to set the
|
||||
POSITION_INDEPENDENT_CODE to ON instead of forcing fPIC, as forcing fPIC may
|
||||
cause relocation errors when shared libraries link against the built static
|
||||
libraries.
|
||||
|
||||
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
|
||||
---
|
||||
CMake/AbseilHelpers.cmake | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
|
||||
index 86ff9eb..bdb7a89 100644
|
||||
--- a/CMake/AbseilHelpers.cmake
|
||||
+++ b/CMake/AbseilHelpers.cmake
|
||||
@@ -209,6 +209,8 @@ function(absl_cc_library)
|
||||
set_property(TARGET ${_NAME} PROPERTY CXX_STANDARD ${ABSL_CXX_STANDARD})
|
||||
set_property(TARGET ${_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
+ # Without this setting, other programs such as GRPC will fail when linking.
|
||||
+ set_property(TARGET ${_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
# When being installed, we lose the absl_ prefix. We want to put it back
|
||||
# to have properly named lib files. This is a no-op when we are not being
|
||||
# installed.
|
||||
--
|
||||
2.26.2
|
||||
|
||||
37
package/libabseil-cpp/Config.in
Normal file
37
package/libabseil-cpp/Config.in
Normal file
@ -0,0 +1,37 @@
|
||||
# see absl/debugging/internal/examine_stack.cc for the list of
|
||||
# architectures that are supported, and for which ucontext is used.
|
||||
config BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
|
||||
bool
|
||||
default y if BR2_aarch64 || BR2_aarch64_be
|
||||
default y if BR2_arm || BR2_armeb
|
||||
default y if BR2_i386
|
||||
default y if BR2_m68k
|
||||
default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
|
||||
default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
|
||||
default y if BR2_riscv
|
||||
default y if BR2_s390x
|
||||
default y if BR2_sh
|
||||
default y if BR2_sparc || BR2_sparc64
|
||||
default y if BR2_x86_64
|
||||
depends on BR2_TOOLCHAIN_HAS_UCONTEXT
|
||||
|
||||
config BR2_PACKAGE_LIBABSEIL_CPP
|
||||
bool "libabseil-cpp"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS # uses dlfcn.h
|
||||
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
|
||||
help
|
||||
Abseil is an open-source collection of C++ library code
|
||||
designed to augment the C++ standard library. The Abseil
|
||||
library code is collected from Google's own C++ code base,
|
||||
has been extensively tested and used in production, and is
|
||||
the same code we depend on in our daily coding lives.
|
||||
|
||||
https://github.com/abseil/abseil-cpp
|
||||
|
||||
comment "libabseil-cpp needs a toolchain w/ gcc >= 4.9, C++, threads, dynamic library"
|
||||
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
3
package/libabseil-cpp/libabseil-cpp.hash
Normal file
3
package/libabseil-cpp/libabseil-cpp.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 4208129b49006089ba1d6710845a45e31c59b0ab6bff9e5788a87f55c5abd602 libabseil-cpp-20220623.0.tar.gz
|
||||
sha256 c79a7fea0e3cac04cd43f20e7b648e5a0ff8fa5344e644b0ee09ca1162b62747 LICENSE
|
||||
24
package/libabseil-cpp/libabseil-cpp.mk
Normal file
24
package/libabseil-cpp/libabseil-cpp.mk
Normal file
@ -0,0 +1,24 @@
|
||||
################################################################################
|
||||
#
|
||||
# libabseil-cpp
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBABSEIL_CPP_VERSION = 20220623.0
|
||||
LIBABSEIL_CPP_SITE = $(call github,abseil,abseil-cpp,$(LIBABSEIL_CPP_VERSION))
|
||||
LIBABSEIL_CPP_LICENSE = Apache-2.0
|
||||
LIBABSEIL_CPP_LICENSE_FILES = LICENSE
|
||||
LIBABSEIL_CPP_INSTALL_STAGING = YES
|
||||
|
||||
LIBABSEIL_CPP_CONF_OPTS = \
|
||||
-DCMAKE_CXX_STANDARD=11 \
|
||||
-DABSL_ENABLE_INSTALL=ON \
|
||||
-DABSL_USE_GOOGLETEST_HEAD=OFF
|
||||
|
||||
HOST_LIBABSEIL_CPP_CONF_OPTS = \
|
||||
-DCMAKE_CXX_STANDARD=11 \
|
||||
-DABSL_ENABLE_INSTALL=ON \
|
||||
-DABSL_USE_GOOGLETEST_HEAD=OFF
|
||||
|
||||
$(eval $(cmake-package))
|
||||
$(eval $(host-cmake-package))
|
||||
Reference in New Issue
Block a user