PKGBUILDs/extra/protobuf/protobuf-25.3-ruby-disable-LTO.patch

15 lines
497 B
Diff
Raw Normal View History

2024-08-21 00:28:14 +00:00
diff --git a/ruby/ext/google/protobuf_c/extconf.rb b/ruby/ext/google/protobuf_c/extconf.rb
index 4bb49bb..37266d7 100755
--- a/ruby/ext/google/protobuf_c/extconf.rb
+++ b/ruby/ext/google/protobuf_c/extconf.rb
@@ -14,7 +14,8 @@ end
if RUBY_PLATFORM =~ /linux/
# Instruct the linker to point memcpy calls at our __wrap_memcpy wrapper.
- $LDFLAGS += " -Wl,-wrap,memcpy"
+ $CFLAGS += " -fno-lto"
+ $LDFLAGS += " -Wl,-wrap,memcpy -fno-lto"
end
$VPATH << "$(srcdir)/third_party/utf8_range"