From: Eric Wong Date: 2015-01-07T19:24:20+00:00 Subject: [ruby-core:67399] Re: [ruby-trunk - Bug #10710] can't compile ruby 2.2.0 with gcc versions older than 4.4.0 stkaes@googlemail.com wrote: > compilation stops because gcc before 4.4.0 does not support the flag > -Wno-packed-bitfield-compat. I'm curious what error you saw. An ancient CentOS 5.4 x86-64 machine managed to build it using: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46) --- a/configure.in +++ b/configure.in @@ -788,6 +788,9 @@ rb_cv_warnflags="$warnflags" if test "$GCC:${warnflags+set}:no" = yes::no; then if test $gcc_major -ge 4; then extra_warning=-Werror=extra-tokens + if test $gcc_major -gt 4 -o $gcc_minor -ge 4; then + extra_warning="$extra_warning -Wno-packed-bitfield-compat" + fi I think "||" is preferable to "-o" for portability. But maybe not a problem nowadays...