diff --git a/package/ruby/ruby.mk b/package/ruby/ruby.mk index 4c6459b74c..f0dc63b471 100644 --- a/package/ruby/ruby.mk +++ b/package/ruby/ruby.mk @@ -29,6 +29,17 @@ RUBY_CFLAGS += -O2 endif RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)" +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +# On uClibc, finite, isinf and isnan are not directly implemented as +# functions. Instead math.h #define's these to __finite, __isinf and +# __isnan, confusing the Ruby configure script. Tell it that they +# really are available. +RUBY_CONF_ENV += \ + ac_cv_func_finite=yes \ + ac_cv_func_isinf=yes \ + ac_cv_func_isnan=yes +endif + ifeq ($(BR2_bfin),y) RUBY_CONF_ENV += ac_cv_func_dl_iterate_phdr=no # Blackfin doesn't have FFI closure support, needed by the fiddle