aboutsummaryrefslogtreecommitdiffstats
path: root/main/protobuf/ruby-fix-cflags.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/protobuf/ruby-fix-cflags.patch')
-rw-r--r--main/protobuf/ruby-fix-cflags.patch10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/protobuf/ruby-fix-cflags.patch b/main/protobuf/ruby-fix-cflags.patch
index 811a66c47df..24b1d57c0d0 100644
--- a/main/protobuf/ruby-fix-cflags.patch
+++ b/main/protobuf/ruby-fix-cflags.patch
@@ -1,11 +1,13 @@
Using builder flags
+diff --git a/ruby/ext/google/protobuf_c/extconf.rb b/ruby/ext/google/protobuf_c/extconf.rb
+index b7c439b..0bbc15c 100755
--- a/ruby/ext/google/protobuf_c/extconf.rb
+++ b/ruby/ext/google/protobuf_c/extconf.rb
-@@ -3,9 +3,9 @@
- require 'mkmf'
+@@ -7,9 +7,9 @@ ext_name = "google/protobuf_c"
+ dir_config(ext_name)
- if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
+ if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ || RUBY_PLATFORM =~ /freebsd/
- $CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"
+ $CFLAGS += " -std=gnu99 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"
else
@@ -13,4 +15,4 @@ Using builder flags
+ $CFLAGS += " -std=gnu99 -DNDEBUG"
end
-
+ if RUBY_PLATFORM =~ /linux/