File: //usr/local/rvm/src/ruby-2.7.4/ext/stringio/mkmf.log
have_func: checking for rb_io_extract_modeenc() in ruby/io.h... -------------------- yes
"gcc -o conftest -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/stringio -g -O2 -fPIC conftest.c -L. -L../.. -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L/usr/local/rvm/rubies/ruby-2.7.4/lib -lruby-static -lz -lpthread -lrt -lrt -ldl -lcrypt -lm -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
"gcc -o conftest -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/stringio -g -O2 -fPIC conftest.c -L. -L../.. -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,/usr/local/rvm/rubies/ruby-2.7.4/lib -L/usr/local/rvm/rubies/ruby-2.7.4/lib -lruby-static -lz -lpthread -lrt -lrt -ldl -lcrypt -lm -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby/io.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: int (* volatile tp)(void)=(int (*)(void))&t;
11: printf("%d", (*tp)());
12: }
13:
14: return !!argv[argc];
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_io_extract_modeenc; return !p; }
/* end */
--------------------
extconf.h is:
/* begin */
1: #ifndef EXTCONF_H
2: #define EXTCONF_H
3: #define HAVE_RB_IO_EXTRACT_MODEENC 1
4: #endif
/* end */