When compiling ruby from source on Smart OS, which uses gcc-4.7, the configure script fails to correctly detect a compatible debug flag. It chooses "-ggdb3" which doesn't work, and this causes all of the conftest.c compilations to fail at build without executing.
Running configure like "./configure ac_cv_func_dl_iterate_phdr=no" fails to complete the configure script.
Running configure like this: ./configure ac_cv_func_dl_iterate_phdr=no debugflags="-ggdb" works. Configure completes and ruby compiles and runs fine.
I'm not sure if this is a SmartOS specific problem, or gcc 4.7, so I'm writing it here to see if others have seen the same thing.
This issue was solved with changeset r40364.
Matt, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
configure.in: -g and -fstack-protector flags can't work
together on SmartOS
configure.in (stack_protector): control use of -fstack-protector.
configure.in (debugflags): let -fstack-protector precede and disable
debugflags, because they can't work together on SmartOS. [Bug #8268]