diff options
author | Lennart Brinkmann <lebrinkma@gmail.com> | 2014-08-23 15:35:45 +0200 |
---|---|---|
committer | Lennart Brinkmann <lebrinkma@gmail.com> | 2014-08-23 15:35:45 +0200 |
commit | f1b78f4b0df6e6da53db2e35a3eb5fd925757ec4 (patch) | |
tree | 89c6c571aa5fb9cca592184a9648ee052a721c6e /ext | |
parent | 3a4bc4259fd67af0ff4a8c1d3d71cfbaed9c112f (diff) | |
download | ffi-yajl-f1b78f4b0df6e6da53db2e35a3eb5fd925757ec4.tar.gz |
extconf.rb: remove "-Wl,--no-undefined" from ldflags
Remove ldflag "-Wl,--no-undefined" if existent to allow for loading
libyajl with dlopen.
This fixes building the native extensions on systems like gentoo which
set the ldflag "-Wl,--no-undefined" by default.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ffi_yajl/ext/encoder/extconf.rb | 3 | ||||
-rw-r--r-- | ext/ffi_yajl/ext/parser/extconf.rb | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ext/ffi_yajl/ext/encoder/extconf.rb b/ext/ffi_yajl/ext/encoder/extconf.rb index 0107112..bf9c839 100644 --- a/ext/ffi_yajl/ext/encoder/extconf.rb +++ b/ext/ffi_yajl/ext/encoder/extconf.rb @@ -8,6 +8,9 @@ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC'] $CFLAGS = " -I#{Libyajl2.include_path} #{$CFLAGS}" $LDFLAGS = " -L#{Libyajl2.opt_path} #{$LDFLAGS}" +# remove "-Wl,--no-undefined" flag if existent to allow for loading with dlopen +$LDFLAGS.slice!("-Wl,--no-undefined") + puts $CFLAGS puts $LDFLAGS diff --git a/ext/ffi_yajl/ext/parser/extconf.rb b/ext/ffi_yajl/ext/parser/extconf.rb index 3154142..d090638 100644 --- a/ext/ffi_yajl/ext/parser/extconf.rb +++ b/ext/ffi_yajl/ext/parser/extconf.rb @@ -8,6 +8,9 @@ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC'] $CFLAGS = "-I#{Libyajl2.include_path} #{$CFLAGS}" $LDFLAGS = "-L#{Libyajl2.opt_path} #{$LDFLAGS}" +# remove "-Wl,--no-undefined" flag if existent to allow for loading with dlopen +$LDFLAGS.slice!("-Wl,--no-undefined") + puts $CFLAGS puts $LDFLAGS |