build: gRPC patch for static LDFLAGS

Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato
2020-01-20 20:32:10 +00:00
committed by poiana
parent 077fbea0a7
commit ff44239833

View File

@@ -0,0 +1,24 @@
diff --git a/Makefile b/Makefile
index 8fd7044dd9..428da4c6c5 100644
--- a/Makefile
+++ b/Makefile
@@ -852,6 +852,7 @@ ifneq ($(LDFLAGS_PROTOBUF_PKG_CONFIG),)
LDFLAGS_PROTOBUF_PKG_CONFIG += $(shell $(PKG_CONFIG) --libs-only-L protobuf | sed s/L/Wl,-rpath,/)
endif
endif
+LDFLAGS := $(LDFLAGS_PROTOBUF_PKG_CONFIG) $(LDFLAGS)
else
PC_LIBS_GRPCXX = -lprotobuf
endif
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 8063bd4771..eac629d1c7 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -749,6 +749,7 @@
LDFLAGS_PROTOBUF_PKG_CONFIG += $(shell $(PKG_CONFIG) --libs-only-L protobuf | sed s/L/Wl,-rpath,/)
endif
endif
+ LDFLAGS := $(LDFLAGS_PROTOBUF_PKG_CONFIG) $(LDFLAGS)
else
PC_LIBS_GRPCXX = -lprotobuf
endif