diff --git a/bazel/com_lightstep_tracer_cpp.patch b/bazel/com_lightstep_tracer_cpp.patch new file mode 100644 index 0000000000000..42ae416cd0757 --- /dev/null +++ b/bazel/com_lightstep_tracer_cpp.patch @@ -0,0 +1,12 @@ +diff --git a/bazel/lightstep_build_system.bzl b/bazel/lightstep_build_system.bzl +index cd896c8..bdbba6d 100644 +--- a/bazel/lightstep_build_system.bzl ++++ b/bazel/lightstep_build_system.bzl +@@ -46,6 +46,7 @@ def lightstep_copts(is_3rd_party=False): + "-Wno-overloaded-virtual", + "-Wvla", + "-std=c++11", ++ "-fsigned-char", + ] + + def lightstep_linkopts(): diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index cd63791ed747c..b18a74d225373 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -411,7 +411,14 @@ def _io_opentracing_cpp(): ) def _com_lightstep_tracer_cpp(): - _repository_impl("com_lightstep_tracer_cpp") + _repository_impl( + name = "com_lightstep_tracer_cpp", + patch_args = ["-p1"], + # Workaround for GCC architecture specific optimization about 'char' type + # on different arches: arm64, ia64, ppc64, ... + # Ref: https://wiki.debian.org/ArchitectureSpecificsMemo + patches = ["@envoy//bazel:com_lightstep_tracer_cpp.patch"], + ) native.bind( name = "lightstep", actual = "@com_lightstep_tracer_cpp//:manual_tracer_lib",