diff options
Diffstat (limited to 'dev-ruby/ffi-compiler/files')
-rw-r--r-- | dev-ruby/ffi-compiler/files/respect-cflags.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dev-ruby/ffi-compiler/files/respect-cflags.patch b/dev-ruby/ffi-compiler/files/respect-cflags.patch new file mode 100644 index 000000000000..3fe68f8211cb --- /dev/null +++ b/dev-ruby/ffi-compiler/files/respect-cflags.patch @@ -0,0 +1,17 @@ +diff --git a/lib/ffi-compiler/compile_task.rb b/lib/ffi-compiler/compile_task.rb +index 363c247..637fd3d 100644 +--- a/lib/ffi-compiler/compile_task.rb ++++ b/lib/ffi-compiler/compile_task.rb +@@ -26,9 +26,9 @@ module FFI + @libraries = [] + @headers = [] + @functions = [] +- @cflags = DEFAULT_CFLAGS.dup +- @cxxflags = DEFAULT_CFLAGS.dup +- @ldflags = DEFAULT_LDFLAGS.dup ++ @cflags = ENV['CFLAGS']&.split || DEFAULT_CFLAGS.dup ++ @cxxflags = ENV['CXXFLAGS']&.split || DEFAULT_CFLAGS.dup ++ @ldflags = ENV['LDFLAGS']&.split || DEFAULT_LDFLAGS.dup + @libs = [] + @platform = Platform.system + @exports = [] |