[Buildroot] [git commit] package/grpc: fix build with libexecinfo
Arnout Vandecappelle (Essensium/Mind)
arnout at mind.be
Thu Mar 24 20:51:23 UTC 2022
commit: https://git.buildroot.net/buildroot/commit/?id=e3aa82ea44462862d56f6e54889741d95684dc84
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Fix the following build failure raised on uclibc and musl since the
reintroduction of the package in commit
16ff948444c3978d63f483344a3d92d994c64312:
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libabsl_stacktrace.so.2111.0.0: undefined reference to `backtrace'
Fixes:
- http://autobuild.buildroot.org/results/63ab2bc86cad03d5258492b17d1707078761d9b3
Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
---
package/grpc/grpc.mk | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/package/grpc/grpc.mk b/package/grpc/grpc.mk
index 23b92f1750..9138b4ea59 100644
--- a/package/grpc/grpc.mk
+++ b/package/grpc/grpc.mk
@@ -21,6 +21,7 @@ HOST_GRPC_DEPENDENCIES = host-protobuf
# which doesn't do this. These CARES settings trick the gRPC cmake code into
# not looking for c-ares at all and yet still linking with the library.
GRPC_CONF_OPTS = \
+ -DCMAKE_EXE_LINKER_FLAGS="$(GRPC_EXE_LINKER_FLAGS)" \
-DgRPC_ABSL_PROVIDER=package \
-D_gRPC_CARES_LIBRARIES=cares \
-DgRPC_CARES_PROVIDER=none \
@@ -36,10 +37,15 @@ GRPC_CONF_OPTS = \
-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF \
-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF
+ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
+GRPC_DEPENDENCIES += libexecinfo
+GRPC_EXE_LINKER_FLAGS += -lexecinfo
+endif
+
# grpc can use __atomic builtins, so we need to link with
# libatomic when available
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-GRPC_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
+GRPC_EXE_LINKER_FLAGS += -latomic
endif
GRPC_CFLAGS = $(TARGET_CFLAGS)
More information about the buildroot
mailing list